mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] sym53c8xx_2: warning: "BYTE_ORDER" is not defined
@ 2004-02-07 19:00 Adrian Bunk
  2004-02-07 20:41 ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2004-02-07 19:00 UTC (permalink / raw)
  To: Gerard Roudier; +Cc: matthew, linux-scsi, James.Bottomley, linux-kernel

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

--- linux-2.6.2-mm1/drivers/scsi/sym53c8xx_2/sym_misc.h.old	2004-02-07 19:43:05.000000000 +0100
+++ linux-2.6.2-mm1/drivers/scsi/sym53c8xx_2/sym_misc.h	2004-02-07 19:54:37.000000000 +0100
@@ -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 __inline u16	_htole16(u16 v) { return __htole16(v); }
-static __inline u32	_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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] sym53c8xx_2: warning: "BYTE_ORDER" is not defined
  2004-02-07 19:00 [patch] sym53c8xx_2: warning: "BYTE_ORDER" is not defined Adrian Bunk
@ 2004-02-07 20:41 ` Matthew Wilcox
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox @ 2004-02-07 20:41 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Gerard Roudier, matthew, linux-scsi, James.Bottomley, linux-kernel

On Sat, Feb 07, 2004 at 08:00:51PM +0100, Adrian Bunk wrote:
> 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.

-- 
"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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-07 20:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-07 19:00 [patch] sym53c8xx_2: warning: "BYTE_ORDER" is not defined Adrian Bunk
2004-02-07 20:41 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®