[PATCH 008/117] fc: Add a compile-time structure size check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Before changing the definition of struct fc_bsg_reply, add a compile-time
structure size check.

Cc: James Smart <james.smart@xxxxxxxxxxxx>
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
 drivers/scsi/scsi_transport_fc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index da5b503dc7a1..2d4db2ae45db 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -948,6 +948,8 @@ static __init int fc_transport_init(void)
 {
 	int error;
 
+	BUILD_BUG_ON(offsetof(struct fc_bsg_reply, reply_data) != 8);
+
 	atomic_set(&fc_event_seq, 0);
 
 	error = transport_class_register(&fc_host_class);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux