mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
qla2xxx: Change two hardcoded constants into offsetof() / sizeof() expressions
[ commit e544b720ef3191cdb6d3ea2915f82973d6372bca upstream ] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8967 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2227,9 +2227,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];
|
||||
};
|
||||
|
||||
|
||||
@@ -3620,7 +3620,7 @@ qla24xx_read_fcp_prio_cfg(scsi_qla_host_t *vha)
|
||||
|
||||
/* read remaining FCP CMD config data from flash */
|
||||
fcp_prio_addr += (FCP_PRIO_CFG_HDR_SIZE >> 2);
|
||||
len = ha->fcp_prio_cfg->num_entries * FCP_PRIO_CFG_ENTRY_SIZE;
|
||||
len = ha->fcp_prio_cfg->num_entries * sizeof(struct qla_fcp_prio_entry);
|
||||
max_len = FCP_PRIO_CFG_SIZE - FCP_PRIO_CFG_HDR_SIZE;
|
||||
|
||||
ha->isp_ops->read_optrom(vha, &ha->fcp_prio_cfg->entry[0],
|
||||
|
||||
Reference in New Issue
Block a user