From: Benjamin Herrenschmidt Date: Mon, 7 Jul 2008 00:50:25 +0000 (+1000) Subject: [SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of X-Git-Tag: v2.6.27-rc1~1059^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7f305e9a08040649b0800245e67708df58cdb55;p=linux-2.6 [SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of 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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/sym53c8xx_2/sym_misc.h b/drivers/scsi/sym53c8xx_2/sym_misc.h index 0433d5d0ca..430537183c 100644 --- a/drivers/scsi/sym53c8xx_2/sym_misc.h +++ b/drivers/scsi/sym53c8xx_2/sym_misc.h @@ -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)