Commit b8544600 authored by Lee Jones's avatar Lee Jones Committed by Martin K. Petersen

scsi: qla4xxx: Check return value of pci_set_mwi()

pci_set_mwi() has 'warn_unused_result' so the result should be checked.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/qla4xxx/ql4_init.c: In function ‘qla4xxx_pci_config’:
 drivers/scsi/qla4xxx/ql4_init.c:664:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]

And if 'status' is removed:

 drivers/scsi/qla4xxx/ql4_init.c: In function ‘qla4xxx_pci_config’:
 drivers/scsi/qla4xxx/ql4_init.c:666:2: warning: ignoring return value of ‘pci_set_mwi’, declared with attribute warn_unused_result [-Wunused-result]
 666 | pci_set_mwi(ha->pdev);
 | ^~~~~~~~~~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20200721164148.2617584-14-lee.jones@linaro.org
Cc: QLogic-Storage-Upstream@qlogic.com
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4c2de9c5
......@@ -665,6 +665,9 @@ void qla4xxx_pci_config(struct scsi_qla_host *ha)
pci_set_master(ha->pdev);
status = pci_set_mwi(ha->pdev);
if (status)
ql4_printk(KERN_WARNING, ha, "Failed to set MWI\n");
/*
* We want to respect framework's setting of PCI configuration space
* command register and also want to make sure that all bits of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment