summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_inline.h
diff options
context:
space:
mode:
authorMartin Wilck <mwilck@suse.com>2019-11-07 23:48:57 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2019-11-09 03:23:23 +0100
commita10c8803d0dbab54370eeac2a07e6540c6215908 (patch)
tree3c7c222eced19c2ed7a9ea80de65a4d0e505c982 /drivers/scsi/qla2xxx/qla_inline.h
parentscsi: qla2xxx: initialize fc4_type_priority (diff)
downloadlinux-a10c8803d0dbab54370eeac2a07e6540c6215908.tar.xz
linux-a10c8803d0dbab54370eeac2a07e6540c6215908.zip
scsi: qla2xxx: don't use zero for FC4_PRIORITY_NVME
Avoid an uninitialized value (0) for ha->fc4_type_priority being falsely interpreted as NVMe priority. Not strictly needed any more after the previous patch, but makes the fc4_type_priority handling more explicit. Link: https://lore.kernel.org/r/20191107224839.32417-3-martin.wilck@suse.com Tested-by: David Bond <dbond@suse.com> Acked-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin Wilck <mwilck@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_inline.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_inline.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
index d728b179e347..352aba4127f7 100644
--- a/drivers/scsi/qla2xxx/qla_inline.h
+++ b/drivers/scsi/qla2xxx/qla_inline.h
@@ -317,5 +317,5 @@ qla2xxx_get_fc4_priority(struct scsi_qla_host *vha)
((uint8_t *)vha->hw->nvram)[NVRAM_DUAL_FCP_NVME_FLAG_OFFSET];
- return ((data >> 6) & BIT_0);
+ return (data >> 6) & BIT_0 ? FC4_PRIORITY_FCP : FC4_PRIORITY_NVME;
}