summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-sysfs.c
diff options
context:
space:
mode:
authorFrederick Lawler <fred@fredlawl.com>2018-01-18 13:55:24 -0500
committerBjorn Helgaas <bhelgaas@google.com>2018-01-18 13:55:24 -0500
commit7506dc7989933235e6fc23f3d0516bdbf0f7d1a8 (patch)
tree9ea5a5569ac0b5c6e52f2e2294b9d4dc15b67022 /drivers/pci/pci-sysfs.c
parentc7abb2352c298e8ac2ccfd843f036ae5244d6f35 (diff)
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.c10
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,
348 return -EINVAL; 348 return -EINVAL;
349 349
350 add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK); 350 add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
351 dev_alert(&pdev->dev, FW_BUG "Overriding NUMA node to %d. Contact your vendor for updates.", 351 pci_alert(pdev, FW_BUG "Overriding NUMA node to %d. Contact your vendor for updates.",
352 node); 352 node);
353 353
354 dev->numa_node = node; 354 dev->numa_node = node;
@@ -411,7 +411,7 @@ static ssize_t msi_bus_store(struct device *dev, struct device_attribute *attr,
411 */ 411 */
412 if (!subordinate) { 412 if (!subordinate) {
413 pdev->no_msi = !val; 413 pdev->no_msi = !val;
414 dev_info(&pdev->dev, "MSI/MSI-X %s for future drivers\n", 414 pci_info(pdev, "MSI/MSI-X %s for future drivers\n",
415 val ? "allowed" : "disallowed"); 415 val ? "allowed" : "disallowed");
416 return count; 416 return count;
417 } 417 }
@@ -613,7 +613,7 @@ static ssize_t sriov_numvfs_store(struct device *dev,
613 613
614 /* is PF driver loaded w/callback */ 614 /* is PF driver loaded w/callback */
615 if (!pdev->driver || !pdev->driver->sriov_configure) { 615 if (!pdev->driver || !pdev->driver->sriov_configure) {
616 dev_info(&pdev->dev, "Driver doesn't support SRIOV configuration via sysfs\n"); 616 pci_info(pdev, "Driver doesn't support SRIOV configuration via sysfs\n");
617 ret = -ENOENT; 617 ret = -ENOENT;
618 goto exit; 618 goto exit;
619 } 619 }
@@ -626,7 +626,7 @@ static ssize_t sriov_numvfs_store(struct device *dev,
626 626
627 /* enable VFs */ 627 /* enable VFs */
628 if (pdev->sriov->num_VFs) { 628 if (pdev->sriov->num_VFs) {
629 dev_warn(&pdev->dev, "%d VFs already enabled. Disable before enabling %d VFs\n", 629 pci_warn(pdev, "%d VFs already enabled. Disable before enabling %d VFs\n",
630 pdev->sriov->num_VFs, num_vfs); 630 pdev->sriov->num_VFs, num_vfs);
631 ret = -EBUSY; 631 ret = -EBUSY;
632 goto exit; 632 goto exit;
@@ -637,7 +637,7 @@ static ssize_t sriov_numvfs_store(struct device *dev,
637 goto exit; 637 goto exit;
638 638
639 if (ret != num_vfs) 639 if (ret != num_vfs)
640 dev_warn(&pdev->dev, "%d VFs requested; only %d enabled\n", 640 pci_warn(pdev, "%d VFs requested; only %d enabled\n",
641 num_vfs, ret); 641 num_vfs, ret);
642 642
643exit: 643exit: