On Mon, Jul 23, 2012 at 05:42:38PM +0800, wei_w...@realsil.com.cn wrote: > + > +#define wait_timeout_x(task_state, msecs) \ > +do { \ > + set_current_state((task_state)); \ > + schedule_timeout(msecs_to_jiffies(msecs)); \ > +} while (0) > + > +#define wait_timeout(msecs) wait_timeout_x(TASK_INTERRUPTIBLE, (msecs)) > + > +#define GET_BE32(ptr) (((u32)((ptr)[0]) << 24) | ((u32)((ptr)[1]) << > 16) | \ > + ((u32)((ptr)[2]) << 8) | (ptr)[3]) > +
This will break on big endian systems. Use be32_to_cpu(). Use Sparse to check your work: http://lwn.net/Articles/205624/ regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/