summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_fw.h
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2020-05-18 23:17:05 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2020-05-20 03:43:07 +0200
commite544b720ef3191cdb6d3ea2915f82973d6372bca (patch)
treef9ca0c3faaf92d7e5e8e6e42faf5d33e6f7fb5bf /drivers/scsi/qla2xxx/qla_fw.h
parentscsi: qla2xxx: Increase the size of struct qla_fcp_prio_cfg to FCP_PRIO_CFG_SIZE (diff)
downloadlinux-e544b720ef3191cdb6d3ea2915f82973d6372bca.tar.xz
linux-e544b720ef3191cdb6d3ea2915f82973d6372bca.zip
scsi: qla2xxx: Change two hardcoded constants into offsetof() / sizeof() expressions
This patch does not change any functionality. Link: https://lore.kernel.org/r/20200518211712.11395-9-bvanassche@acm.org Cc: Nilesh Javali <njavali@marvell.com> Cc: Quinn Tran <qutran@marvell.com> Cc: Martin Wilck <mwilck@suse.com> Cc: Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: Daniel Wagner <dwagner@suse.de> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Arun Easi <aeasi@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_fw.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_fw.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
index 4fa34374f34f..f18d2d00d28c 100644
--- a/drivers/scsi/qla2xxx/qla_fw.h
+++ b/drivers/scsi/qla2xxx/qla_fw.h
@@ -2216,9 +2216,8 @@ struct qla_fcp_prio_cfg {
#define FCP_PRIO_ATTR_ENABLE 0x1
#define FCP_PRIO_ATTR_PERSIST 0x2
uint8_t reserved; /* Reserved for future use */
-#define FCP_PRIO_CFG_HDR_SIZE 0x10
+#define FCP_PRIO_CFG_HDR_SIZE offsetof(struct qla_fcp_prio_cfg, entry)
struct qla_fcp_prio_entry entry[1023]; /* fcp priority entries */
-#define FCP_PRIO_CFG_ENTRY_SIZE 0x20
uint8_t reserved2[16];
};