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>
This commit is contained in:

committed by
Bjorn Helgaas

parent
c7abb2352c
commit
7506dc7989
@@ -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:
|
||||
|
Reference in New Issue
Block a user