summaryrefslogtreecommitdiff
path: root/drivers/pci/pcie/err.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2019-12-14 01:46:05 +0300
committerBjorn Helgaas <bhelgaas@google.com>2020-01-24 01:39:53 +0300
commit8d077c3ce0109c406c265cafc334258caee47e6d (patch)
tree9d09a5e1bf37c042d20dcdd44f84aab444303597 /drivers/pci/pcie/err.c
parent01daacfb9035e5b86d43a01f11a0614648f306c1 (diff)
downloadlinux-8d077c3ce0109c406c265cafc334258caee47e6d.tar.xz
PCI/AER: Factor message prefixes with dev_fmt()
Define dev_fmt() with the common prefix of log messages so we don't have to repeat it in every printk. No functional change intended. Link: https://lore.kernel.org/r/20191213225709.GA213811@google.com Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pcie/err.c')
-rw-r--r--drivers/pci/pcie/err.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c
index 98acf944a27f..01dfc8bb7ca0 100644
--- a/drivers/pci/pcie/err.c
+++ b/drivers/pci/pcie/err.c
@@ -10,6 +10,8 @@
* Zhang Yanmin (yanmin.zhang@intel.com)
*/
+#define dev_fmt(fmt) "AER: " fmt
+
#include <linux/pci.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@ -63,7 +65,7 @@ static int report_error_detected(struct pci_dev *dev,
*/
if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) {
vote = PCI_ERS_RESULT_NO_AER_DRIVER;
- pci_info(dev, "AER: Can't recover (no error_detected callback)\n");
+ pci_info(dev, "can't recover (no error_detected callback)\n");
} else {
vote = PCI_ERS_RESULT_NONE;
}
@@ -235,12 +237,12 @@ void pcie_do_recovery(struct pci_dev *dev, enum pci_channel_state state,
pci_aer_clear_device_status(dev);
pci_cleanup_aer_uncorrect_error_status(dev);
- pci_info(dev, "AER: Device recovery successful\n");
+ pci_info(dev, "device recovery successful\n");
return;
failed:
pci_uevent_ers(dev, PCI_ERS_RESULT_DISCONNECT);
/* TODO: Should kernel panic here? */
- pci_info(dev, "AER: Device recovery failed\n");
+ pci_info(dev, "device recovery failed\n");
}