diff options
author | Gleb Chesnokov <Chesnokov.G@raidix.com> | 2022-02-15 18:13:53 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-02-23 03:11:07 +0100 |
commit | 6e0e85d39e528da2915a2da261195f81bfde6915 (patch) | |
tree | 951ed413bec35b6b4208718634620f6ec5b9e763 /drivers/scsi/qla2xxx/qla_isr.c | |
parent | scsi: ufs: core: Remove wlun_dev_to_hba() (diff) | |
download | linux-6e0e85d39e528da2915a2da261195f81bfde6915.tar.xz linux-6e0e85d39e528da2915a2da261195f81bfde6915.zip |
scsi: qla2xxx: Use named initializers for port_[d]state_str
Make port_state_str and port_dstate_str a little more readable and
maintainable by using named initializers.
Also convert FCS_* macros into an enum.
Link: https://lore.kernel.org/r/AS8PR10MB495215841EB25C16DBC0CB409D349@AS8PR10MB4952.EURPRD10.PROD.OUTLOOK.COM
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Gleb Chesnokov <Chesnokov.G@raidix.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index aaf6504570fd..092e4b5da65a 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -49,11 +49,11 @@ qla27xx_process_purex_fpin(struct scsi_qla_host *vha, struct purex_item *item) } const char *const port_state_str[] = { - "Unknown", - "UNCONFIGURED", - "DEAD", - "LOST", - "ONLINE" + [FCS_UNKNOWN] = "Unknown", + [FCS_UNCONFIGURED] = "UNCONFIGURED", + [FCS_DEVICE_DEAD] = "DEAD", + [FCS_DEVICE_LOST] = "LOST", + [FCS_ONLINE] = "ONLINE" }; static void |