Re: [PATCH v2 2/8] PCI/AER: Use the same log level for all messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14/02/2025 03:35, Jon Pan-Doh wrote:
From: Karolina Stolarek <karolina.stolarek@xxxxxxxxxx>

When reporting an AER error, we check its type multiple times
to determine the log level for each message. Do this check only
in the top-level function and propagate the result down the call
chain. Make aer_print_port_info output to match the level of the
reported error.

Signed-off-by: Karolina Stolarek <karolina.stolarek@xxxxxxxxxx>
Reviewed-by: Jon Pan-Doh <pandoh@xxxxxxxxxx>
---
  drivers/pci/pci.h      |  2 +-
  drivers/pci/pcie/aer.c | 43 ++++++++++++++++++++++--------------------
  drivers/pci/pcie/dpc.c |  2 +-
  3 files changed, 25 insertions(+), 22 deletions(-)

(...)

@@ -773,13 +772,13 @@ void pci_print_aer(struct pci_dev *dev, int aer_severity,
  	info.mask = mask;
  	info.first_error = PCI_ERR_CAP_FEP(aer->cap_control);
- pci_err(dev, "aer_status: 0x%08x, aer_mask: 0x%08x\n", status, mask);
-	__aer_print_error(dev, &info);
-	pci_err(dev, "aer_layer=%s, aer_agent=%s\n",
+	aer_printk(level, dev, "aer_status: 0x%08x, aer_mask: 0x%08x\n", status, mask);
+	__aer_print_error(dev, &info, level);
+	aer_printk(level, dev, "aer_layer=%s, aer_agent=%s\n",
  		aer_error_layer[layer], aer_agent_string[agent]);

It seems that the printk's alignment is wonky after the rebase. Checkpatch agrees with me here...

if (aer_severity != AER_CORRECTABLE)
-		pci_err(dev, "aer_uncor_severity: 0x%08x\n",
+		aer_printk(level, dev, "aer_uncor_severity: 0x%08x\n",
  			aer->uncor_severity);
...and here

All the best,
Karolina




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux