From a7f474542ea36e32407dadd3849225d21c315bd4 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 29 Jun 2020 15:54:46 -0700 Subject: [PATCH] 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 Cc: Quinn Tran Cc: Himanshu Madhani Cc: Martin Wilck Cc: Roman Bolshakov Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen --- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 68183a9..44bfe162 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -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); -- 2.7.4