Commit a7f47454 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

scsi: qla2xxx: Check the size of struct fcp_hdr at compile time

Since struct fcp_hdr is used to exchange data with the firmware, check its
size at compile time.

Link: https://lore.kernel.org/r/20200629225454.22863-2-bvanassche@acm.org


Cc: Nilesh Javali <njavali@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: default avatarDaniel Wagner <dwagner@suse.de>
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 5a0c256d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1971,6 +1971,7 @@ static int __init tcm_qla2xxx_init(void)
	BUILD_BUG_ON(sizeof(struct ctio_crc2_to_fw) != 64);
	BUILD_BUG_ON(sizeof(struct ctio_crc_from_fw) != 64);
	BUILD_BUG_ON(sizeof(struct ctio_to_2xxx) != 64);
	BUILD_BUG_ON(sizeof(struct fcp_hdr) != 24);
	BUILD_BUG_ON(sizeof(struct fcp_hdr_le) != 24);
	BUILD_BUG_ON(sizeof(struct nack_to_isp) != 64);