diff options
author | Frederick Lawler <fred@fredlawl.com> | 2018-01-18 21:55:24 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2018-01-18 21:55:24 +0300 |
commit | 7506dc7989933235e6fc23f3d0516bdbf0f7d1a8 (patch) | |
tree | 9ea5a5569ac0b5c6e52f2e2294b9d4dc15b67022 /drivers/pci/pci-sysfs.c | |
parent | c7abb2352c298e8ac2ccfd843f036ae5244d6f35 (diff) | |
download | linux-7506dc7989933235e6fc23f3d0516bdbf0f7d1a8.tar.xz |
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 <fred@fredlawl.com>
[bhelgaas: squash into one patch]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 06c7f0b85cd2..c7941a0512a5 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -348,7 +348,7 @@ static ssize_t numa_node_store(struct device *dev, return -EINVAL; add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK); - dev_alert(&pdev->dev, FW_BUG "Overriding NUMA node to %d. Contact your vendor for updates.", + pci_alert(pdev, FW_BUG "Overriding NUMA node to %d. Contact your vendor for updates.", node); dev->numa_node = node; @@ -411,7 +411,7 @@ static ssize_t msi_bus_store(struct device *dev, struct device_attribute *attr, */ if (!subordinate) { pdev->no_msi = !val; - dev_info(&pdev->dev, "MSI/MSI-X %s for future drivers\n", + pci_info(pdev, "MSI/MSI-X %s for future drivers\n", val ? "allowed" : "disallowed"); return count; } @@ -613,7 +613,7 @@ static ssize_t sriov_numvfs_store(struct device *dev, /* is PF driver loaded w/callback */ if (!pdev->driver || !pdev->driver->sriov_configure) { - dev_info(&pdev->dev, "Driver doesn't support SRIOV configuration via sysfs\n"); + pci_info(pdev, "Driver doesn't support SRIOV configuration via sysfs\n"); ret = -ENOENT; goto exit; } @@ -626,7 +626,7 @@ static ssize_t sriov_numvfs_store(struct device *dev, /* enable VFs */ if (pdev->sriov->num_VFs) { - dev_warn(&pdev->dev, "%d VFs already enabled. Disable before enabling %d VFs\n", + pci_warn(pdev, "%d VFs already enabled. Disable before enabling %d VFs\n", pdev->sriov->num_VFs, num_vfs); ret = -EBUSY; goto exit; @@ -637,7 +637,7 @@ static ssize_t sriov_numvfs_store(struct device *dev, goto exit; if (ret != num_vfs) - dev_warn(&pdev->dev, "%d VFs requested; only %d enabled\n", + pci_warn(pdev, "%d VFs requested; only %d enabled\n", num_vfs, ret); exit: |