sym53c8xx_2: warning: "BYTE_ORDER" is not defined
PATCH 1/1 sym53c8xx_2: warning: "BYTE_ORDER" is not defined
Hi,
when compiling 2.6.2-mm1 (this problem doesn't seem to be specific to -mm)) with -Wundef I got many of the following warnings:
<-- snip -->
...
CC drivers/scsi/sym53c8xx_2/sym_fw.o
In file included from drivers/scsi/sym53c8xx_2/sym_glue.h:80,
from drivers/scsi/sym53c8xx_2/sym_fw.c:56:
drivers/scsi/sym53c8xx_2/sym_misc.h:227:9: warning: "BYTE_ORDER" is not defined drivers/scsi/sym53c8xx_2/sym_misc.h:227:23: warning: "BIG_ENDIAN" is not defined
...
<-- snip -->
I don't see a BYTE_ORDER defined anywhere.
And it seems that the whole #ifdef'ed block isn't used anywhere. Is it OK to remove it (patch below)?
cu
Adrian
drivers/scsi/sym53c8xx_2/sym_misc.h renamed from drivers/scsi/sym53c8xx_2/sym_misc.h.old +0 -36
@@ -222,42 +222,6 @@#define sym_is_bit (p, n) (((u32 *)(p))[(n)>>5] & (1<<((n)&0x1f)))/* -* Portable but silly implemented byte order primitives. -*/ -#if BYTE_ORDER ==BIG_ENDIAN - -#define __revb16 (x) ( (((u16)(x) & (u16)0x00ffU) << 8) | \ - (((u16)(x) & (u16)0xff00U) >> 8) ) -#define __revb32 (x) ( (((u32)(x) & 0x000000ffU) << 24) | \ - (((u32)(x) & 0x0000ff00U) << 8) | \ - (((u32)(x) & 0x00ff0000U) >> 8) | \ - (((u32)(x) & 0xff000000U) >> 24) ) - -#define __htole16 (v) __revb16(v) -#define __htole32 (v) __revb32(v) -#define __le16toh (v) __htole16(v) -#define __le32toh (v) __htole32(v) - -static __inlineu16 _htole16 (u16 v) {return __htole16 (v); } -static __inlineu32 _htole32 (u32 v) {return __htole32 (v); } -#define _le16toh _htole16 -#define _le32toh _htole32 - -#else /* LITTLE ENDIAN */ - -#define __htole16 (v) (v) -#define __htole32 (v) (v) -#define __le16toh (v) (v) -#define __le32toh (v) (v) - -#define _htole16 (v) (v) -#define _htole32 (v) (v) -#define _le16toh (v) (v) -#define _le32toh (v) (v) - -#endif /* BYTE_ORDER */ - -/* * The below round up/down macros are to be used with a constant * as argument (sizeof(...) for example), for the compiler to * optimize the whole thing.
Quoted 4 lines · Adrian Bunk
Hi,
when compiling 2.6.2-mm1 (this problem doesn't seem to be specific to -mm)) with -Wundef I got many of the following warnings:
Thanks for the patch; I've taken it into my tree.
Signature · 6 lines
"Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain