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; }