From: Bart Van Assche Date: Tue, 20 Jul 2010 22:19:15 +0000 (-0700) Subject: [SCSI] fcoe: make it possible to verify fcoe with sparse X-Git-Tag: v2.6.36-rc1~570^2~72 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d058fd31c7f44960b00566bda39c85377f461a7b;p=pandora-kernel.git [SCSI] fcoe: make it possible to verify fcoe with sparse Analyzing fcoe with sparse currently fails. This is because struct fcoe_rcv_info contains two enum members that have been declared with __attribute__((packed)). Apparently gcc honors this attribute while sparse ignores it. The result is that sizeof(struct fcoe_rcv_info) == sizeof(struct sk_buff::cb) == 48 on a 64-bit system according to gcc, but not according to sparse. The patch below modifies the definition of struct fcoe_rcv_info such that gcc and sparse interpret this structure definition in the same way. The current sparse output is as follows: $ cd linux-2.6.34 $ make C=2 M=drivers/scsi/fcoe modules CHECK drivers/scsi/fcoe/fcoe.c include/scsi/fc_frame.h:81:9: error: invalid bitfield width, -1. CC [M] drivers/scsi/fcoe/fcoe.o CHECK drivers/scsi/fcoe/libfcoe.c include/scsi/fc_frame.h:81:9: error: invalid bitfield width, -1. drivers/scsi/fcoe/libfcoe.c:56:37: error: invalid initializer Signed-off-by: Bart Van Assche Cc: jeykholt@cisco.com Signed-off-by: Robert Love Signed-off-by: James Bottomley --- Reading git-diff-tree failed