The patch titled Subject: byteorder: sanity check toolchain vs kernel endianness has been removed from the -mm tree. Its filename was byteorder-sanity-check-toolchain-vs-kernel-endianess.patch This patch was dropped because it had testing failures ------------------------------------------------------ From: Christoph Hellwig <hch@xxxxxx> Subject: byteorder: sanity check toolchain vs kernel endianness When removing some dead big endian checks in the RISC-V code Nick suggested that we should have some generic sanity checks. I don't think we should have thos inside the RISC-V code, but maybe it might make sense to have these in the generic byteorder headers. Note that these are UAPI headers and some compilers might not actually define __BYTE_ORDER__, so we first check that it actually exists. [akpm@xxxxxxxxxxxxxxxxxxxx: coding style fixes] Link: http://lkml.kernel.org/r/20190412143538.11780-1-hch@xxxxxx Signed-off-by: Christoph Hellwig <hch@xxxxxx> Suggested-by: Nick Kossifidis <mick@xxxxxxxxxxxx> Acked-by: Arnd Bergmann <arnd@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/uapi/linux/byteorder/big_endian.h | 4 ++++ include/uapi/linux/byteorder/little_endian.h | 4 ++++ 2 files changed, 8 insertions(+) --- a/include/uapi/linux/byteorder/big_endian.h~byteorder-sanity-check-toolchain-vs-kernel-endianess +++ a/include/uapi/linux/byteorder/big_endian.h @@ -2,6 +2,10 @@ #ifndef _UAPI_LINUX_BYTEORDER_BIG_ENDIAN_H #define _UAPI_LINUX_BYTEORDER_BIG_ENDIAN_H +#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ != __ORDER_BIG_ENDIAN__ +#error "Unsupported endianness, check your toolchain" +#endif + #ifndef __BIG_ENDIAN #define __BIG_ENDIAN 4321 #endif --- a/include/uapi/linux/byteorder/little_endian.h~byteorder-sanity-check-toolchain-vs-kernel-endianess +++ a/include/uapi/linux/byteorder/little_endian.h @@ -2,6 +2,10 @@ #ifndef _UAPI_LINUX_BYTEORDER_LITTLE_ENDIAN_H #define _UAPI_LINUX_BYTEORDER_LITTLE_ENDIAN_H +#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ +#error "Unsupported endianness, check your toolchain" +#endif + #ifndef __LITTLE_ENDIAN #define __LITTLE_ENDIAN 1234 #endif _ Patches currently in -mm which might be from hch@xxxxxx are mm-remove-the-account_page_dirtied-export.patch mm-fix-an-overly-long-line-in-read_cache_page.patch mm-dont-cast-readpage-to-filler_t-for-do_read_cache_page.patch jffs2-pass-the-correct-prototype-to-read_cache_page.patch 9p-pass-the-correct-prototype-to-read_cache_page.patch