From 7506dc7989933235e6fc23f3d0516bdbf0f7d1a8 Mon Sep 17 00:00:00 2001 From: Frederick Lawler Date: Thu, 18 Jan 2018 12:55:24 -0600 Subject: PCI: Add wrappers for dev_printk() Add PCI-specific dev_printk() wrappers and use them to simplify the code slightly. No functional change intended. Signed-off-by: Frederick Lawler [bhelgaas: squash into one patch] Signed-off-by: Bjorn Helgaas --- drivers/pci/msi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/pci/msi.c') diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index e06607167858..1cd8238a664a 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -578,7 +578,7 @@ static int msi_verify_entries(struct pci_dev *dev) for_each_pci_msi_entry(entry, dev) { if (!dev->no_64bit_msi || !entry->msg.address_hi) continue; - dev_err(&dev->dev, "Device has broken 64-bit MSI but arch" + pci_err(dev, "Device has broken 64-bit MSI but arch" " tried to assign one above 4G\n"); return -EIO; } @@ -962,7 +962,7 @@ static int __pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, /* Check whether driver already requested for MSI irq */ if (dev->msi_enabled) { - dev_info(&dev->dev, "can't enable MSI-X (MSI IRQ already assigned)\n"); + pci_info(dev, "can't enable MSI-X (MSI IRQ already assigned)\n"); return -EINVAL; } return msix_capability_init(dev, entries, nvec, affd); @@ -1032,8 +1032,7 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec, /* Check whether driver already requested MSI-X irqs */ if (dev->msix_enabled) { - dev_info(&dev->dev, - "can't enable MSI (MSI-X already enabled)\n"); + pci_info(dev, "can't enable MSI (MSI-X already enabled)\n"); return -EINVAL; } -- cgit