The patch titled crc32: use __BYTE_ORDER macro for endian detection. has been added to the -mm tree. Its filename is crc32-use-__byte_order-macro-for-endian-detection.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: crc32: use __BYTE_ORDER macro for endian detection. From: Joakim Tjernlund <Joakim.Tjernlund@xxxxxxxxxxxx> Since crc32.c contains a nifty test program that can be executed in user space, make sure endian detection works reliably in user space too. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/crc32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN lib/crc32.c~crc32-use-__byte_order-macro-for-endian-detection lib/crc32.c --- a/lib/crc32.c~crc32-use-__byte_order-macro-for-endian-detection +++ a/lib/crc32.c @@ -50,7 +50,7 @@ MODULE_LICENSE("GPL"); static inline u32 crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 (*tab)[256]) { -# ifdef __LITTLE_ENDIAN +# if __BYTE_ORDER == __LITTLE_ENDIAN # define DO_CRC(x) crc = tab[0][(crc ^ (x)) & 255] ^ (crc >> 8) # define DO_CRC4 crc = tab[3][(crc) & 255] ^ \ tab[2][(crc >> 8) & 255] ^ \ _ Patches currently in -mm which might be from Joakim.Tjernlund@xxxxxxxxxxxx are linux-next.patch endian-define-__byte_order.patch crc32-major-optimization.patch crc32-major-optimization-checkpatch-fixes.patch crc32-use-__byte_order-macro-for-endian-detection.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html