PCI: add pci_try_set_mwi
As suggested by Andrew, add pci_try_set_mwi(), which does not require return-value checking. - add pci_try_set_mwi() without __must_check - make it return 0 on success, errno if the "try" failed or error - review callers Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f5609d7e67
commit
694625c0b3
@@ -1578,10 +1578,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
|
||||
INIT_LIST_HEAD(&phba->fc_nodes);
|
||||
|
||||
pci_set_master(pdev);
|
||||
retval = pci_set_mwi(pdev);
|
||||
if (retval)
|
||||
dev_printk(KERN_WARNING, &pdev->dev,
|
||||
"Warning: pci_set_mwi returned %d\n", retval);
|
||||
pci_try_set_mwi(pdev);
|
||||
|
||||
if (pci_set_dma_mask(phba->pcidev, DMA_64BIT_MASK) != 0)
|
||||
if (pci_set_dma_mask(phba->pcidev, DMA_32BIT_MASK) != 0)
|
||||
|
Reference in New Issue
Block a user