[PATCH 010/117] ufs: Add a compile-time structure size check

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

 



Before modifying the definition of struct ufs_bsg_reply, add a compile-time
structure size check.

Cc: Can Guo <cang@xxxxxxxxxxxxxx>
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
 drivers/scsi/ufs/ufshcd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 0625da7a42ee..fa596cf66c23 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -9455,6 +9455,8 @@ EXPORT_SYMBOL_GPL(ufshcd_init);
 
 static int __init ufshcd_core_init(void)
 {
+	BUILD_BUG_ON(offsetof(struct ufs_bsg_reply, upiu_rsp) != 8);
+
 	ufs_debugfs_init();
 	return 0;
 }



[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