]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI/AER: Convert aer_get_device_error_info(), aer_print_error() to index
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 22 May 2025 23:21:22 +0000 (18:21 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 23 May 2025 16:11:36 +0000 (11:11 -0500)
commit94bc15c3484aa1dbbd01aee8f9eaa5dc347a01a8
tree0d816769bb5f33204a3adce267594645827d0ec9
parent09683a6184ad6fd635831402316651392b56cc3a
PCI/AER: Convert aer_get_device_error_info(), aer_print_error() to index

Previously aer_get_device_error_info() and aer_print_error() took a pointer
to struct aer_err_info and a pointer to a pci_dev.  Typically the pci_dev
was one of the elements of the aer_err_info.dev[] array (DPC was an
exception, where the dev[] array was unused).

Convert aer_get_device_error_info() and aer_print_error() to take an index
into the aer_err_info.dev[] array instead.  A future patch will add
per-device ratelimit information, so the index makes it convenient to find
the ratelimit associated with the device.

To accommodate DPC, set info->dev[0] to the DPC port before using these
interfaces.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://patch.msgid.link/20250522232339.1525671-17-helgaas@kernel.org
drivers/pci/pci.h
drivers/pci/pcie/aer.c
drivers/pci/pcie/dpc.c