diff options
author | Bart Van Assche <bvanassche@acm.org> | 2019-04-17 14:44:37 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-04-29 17:24:51 -0400 |
commit | bc04459ce4e5d394d79fe2a0660d43c1a40b6eb8 (patch) | |
tree | ad4b242b2bb251742ca1d4b31a07d2364a38bdbb /drivers/scsi/qla2xxx/qla_target.c | |
parent | 6e73985a9dea627114531723bdae6f8c1f59d5e8 (diff) | |
download | lwn-bc04459ce4e5d394d79fe2a0660d43c1a40b6eb8.tar.gz lwn-bc04459ce4e5d394d79fe2a0660d43c1a40b6eb8.zip |
scsi: qla2xxx: Check the size of firmware data structures at compile time
Since the next patch will modify several firmware data structures, add
compile time checks that verify that these structures have the correct
size.
Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_target.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index dfacc42f1e1d..420c6cd0a7ea 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -7372,6 +7372,9 @@ int __init qlt_init(void) { int ret; + BUILD_BUG_ON(sizeof(struct ctio7_to_24xx) != 64); + BUILD_BUG_ON(sizeof(struct ctio_to_2xxx) != 64); + if (!qlt_parse_ini_mode()) { ql_log(ql_log_fatal, NULL, 0xe06b, "qlt_parse_ini_mode() failed\n"); |