diff options
author | Frederick Lawler <fred@fredlawl.com> | 2019-05-07 18:24:51 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2019-05-09 16:45:20 -0500 |
commit | 94dbc9562edc745d0549f1744ca1bd75e644473e (patch) | |
tree | 277e272ffe7a33d43804e86272d18c4af7a2ff2e /drivers/pci/hotplug/pciehp_core.c | |
parent | 017124725c155a3e1b09429d27c5846b0efafa89 (diff) |
PCI: pciehp: Log messages with pci_dev, not pcie_device
Log messages with pci_dev, not pcie_device. Factor out common message
prefixes with dev_fmt().
Example output change:
- pciehp 0000:00:06.0:pcie004: Slot(0) Powering on due to button press
+ pcieport 0000:00:06.0: pciehp: Slot(0) Powering on due to button press
Link: https://lore.kernel.org/lkml/20190509141456.223614-8-helgaas@kernel.org
Signed-off-by: Frederick Lawler <fred@fredlawl.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_core.c')
-rw-r--r-- | drivers/pci/hotplug/pciehp_core.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index 6ff204c435bf..b85b22880c50 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c @@ -17,6 +17,9 @@ * Dely Sy <dely.l.sy@intel.com>" */ +#define pr_fmt(fmt) "pciehp: " fmt +#define dev_fmt pr_fmt + #include <linux/moduleparam.h> #include <linux/kernel.h> #include <linux/slab.h> @@ -179,14 +182,14 @@ static int pciehp_probe(struct pcie_device *dev) if (!dev->port->subordinate) { /* Can happen if we run out of bus numbers during probe */ - dev_err(&dev->device, + pci_err(dev->port, "Hotplug bridge without secondary bus, ignoring\n"); return -ENODEV; } ctrl = pcie_init(dev); if (!ctrl) { - dev_err(&dev->device, "Controller initialization failed\n"); + pci_err(dev->port, "Controller initialization failed\n"); return -ENODEV; } set_service_data(dev, ctrl); |