]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 7 Jul 2008 00:50:25 +0000 (10:50 +1000)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 12 Jul 2008 13:22:37 +0000 (08:22 -0500)
The sym53c8xx driver, for some reason, seems to mostly re-implement
linux/list.h with added bogosity. The main one is it's implementation
of sym_que_entry which spits warnings with recent gcc's on some
64 bits architectures.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/sym53c8xx_2/sym_misc.h

index 0433d5d0caf37b3511e85d1bd86adf724af923ac..430537183c1851a22c6fbee9cf95bc3ae13663dd 100644 (file)
@@ -121,9 +121,7 @@ static __inline void sym_que_move(struct sym_quehead *orig,
        }
 }
 
-#define sym_que_entry(ptr, type, member) \
-       ((type *)((char *)(ptr)-(unsigned int)(&((type *)0)->member)))
-
+#define sym_que_entry(ptr, type, member) container_of(ptr, type, member)
 
 #define sym_insque(new, pos)           __sym_que_add(new, pos, (pos)->flink)