summaryrefslogtreecommitdiff
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorMohamed Khalfella <mkhalfella@purestorage.com>2022-05-09 21:14:41 +0300
committerBjorn Helgaas <bhelgaas@google.com>2022-07-13 22:45:20 +0300
commit5e6ae050955b566484f3cc6a66e3925eae87a0ed (patch)
treeb6c7237459b21690a835880a8c8173c438a1d5c5 /drivers/pci/probe.c
parentf26e58bf6f547031f91a1b0e39b9308d48a4ba8c (diff)
downloadlinux-5e6ae050955b566484f3cc6a66e3925eae87a0ed.tar.xz
PCI/AER: Iterate over error counters instead of error strings
Previously we iterated over AER stat *names*, e.g., aer_correctable_error_string[32], but the actual stat *counters* may not be that large, e.g., pdev->aer_stats->dev_cor_errs[16], which means that we printed junk in the sysfs stats files. Iterate over the stat counter arrays instead of the names to avoid this junk. Also, added a build time check to make sure all counters have entries in strings array. Fixes: 0678e3109a3c ("PCI/AER: Simplify __aer_print_error()") Link: https://lore.kernel.org/r/20220509181441.31884-1-mkhalfella@purestorage.com Reported-by: Meeta Saggi <msaggi@purestorage.com> Signed-off-by: Mohamed Khalfella <mkhalfella@purestorage.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Meeta Saggi <msaggi@purestorage.com> Reviewed-by: Eric Badger <ebadger@purestorage.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/pci/probe.c')
0 files changed, 0 insertions, 0 deletions