Skip to content

Commit ca2426a

Browse files
committed
PCI/AER: Move aer_print_source() earlier in file
Move aer_print_source() earlier in the file so a future change can use it from aer_print_error(), where it's easier to rate limit it. Signed-off-by: Bjorn Helgaas <[email protected]> Tested-by: Krzysztof Wilczyński <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 99c3fd0 commit ca2426a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

drivers/pci/pcie/aer.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,19 @@ static void __aer_print_error(struct pci_dev *dev,
696696
pci_dev_aer_stats_incr(dev, info);
697697
}
698698

699+
static void aer_print_source(struct pci_dev *dev, struct aer_err_info *info,
700+
bool found)
701+
{
702+
u16 source = info->id;
703+
704+
pci_info(dev, "%s%s error message received from %04x:%02x:%02x.%d%s\n",
705+
info->multi_error_valid ? "Multiple " : "",
706+
aer_error_severity_string[info->severity],
707+
pci_domain_nr(dev->bus), PCI_BUS_NUM(source),
708+
PCI_SLOT(source), PCI_FUNC(source),
709+
found ? "" : " (no details found");
710+
}
711+
699712
void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
700713
{
701714
int layer, agent;
@@ -733,19 +746,6 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
733746
info->severity, info->tlp_header_valid, &info->tlp);
734747
}
735748

736-
static void aer_print_source(struct pci_dev *dev, struct aer_err_info *info,
737-
bool found)
738-
{
739-
u16 source = info->id;
740-
741-
pci_info(dev, "%s%s error message received from %04x:%02x:%02x.%d%s\n",
742-
info->multi_error_valid ? "Multiple " : "",
743-
aer_error_severity_string[info->severity],
744-
pci_domain_nr(dev->bus), PCI_BUS_NUM(source),
745-
PCI_SLOT(source), PCI_FUNC(source),
746-
found ? "" : " (no details found");
747-
}
748-
749749
#ifdef CONFIG_ACPI_APEI_PCIEAER
750750
int cper_severity_to_aer(int cper_severity)
751751
{

0 commit comments

Comments
 (0)