[PATCH v6 8/8] PCI/AER: Add prefixes to printouts

From: Ilpo Järvinen
Date: Fri Sep 13 2024 - 10:39:09 EST


Only part of the AER diagnostic printouts use "AER:" prefix because
they use low-level pci_printk() directly to allow selecting level.

Add "AER:" prefix to lines that are printed with pci_printk().

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
---
drivers/pci/pcie/aer.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 6484e3a66a41..c4ba4396a8dc 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -685,8 +685,8 @@ static void __aer_print_error(struct pci_dev *dev,
if (!errmsg)
errmsg = "Unknown Error Bit";

- pci_printk(level, dev, " [%2d] %-22s%s\n", i, errmsg,
- info->first_error == i ? " (First)" : "");
+ pci_printk(level, dev, "%s [%2d] %-22s%s\n", dev_fmt(""), i,
+ errmsg, info->first_error == i ? " (First)" : "");
}
pci_dev_aer_stats_incr(dev, info);
}
@@ -708,12 +708,12 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)

level = (info->severity == AER_CORRECTABLE) ? KERN_WARNING : KERN_ERR;

- pci_printk(level, dev, "PCIe Bus Error: severity=%s, type=%s, (%s)\n",
- aer_error_severity_string[info->severity],
+ pci_printk(level, dev, "%sPCIe Bus Error: severity=%s, type=%s, (%s)\n",
+ dev_fmt(""), aer_error_severity_string[info->severity],
aer_error_layer[layer], aer_agent_string[agent]);

- pci_printk(level, dev, " device [%04x:%04x] error status/mask=%08x/%08x\n",
- dev->vendor, dev->device, info->status, info->mask);
+ pci_printk(level, dev, "%s device [%04x:%04x] error status/mask=%08x/%08x\n",
+ dev_fmt(""), dev->vendor, dev->device, info->status, info->mask);

__aer_print_error(dev, info);

--
2.39.2