diff options
author | Tyler Baicar <tbaicar@codeaurora.org> | 2016-09-14 17:14:45 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-20 15:35:59 -0400 |
commit | 95c35491f663962e476179076d24d0d2c45a8fb5 (patch) | |
tree | b0f52b2559fcd4dfda769a49db3b1a91fb8499b6 | |
parent | 7ece14175376051b18a9b97f0e6125cb8b864155 (diff) |
PCI/AER: Remove duplicate AER severity translation
Currently the AER severity is being translated twice in the code flow for
PCIe errors. It is first translated in ghes_do_proc() before calling into
the AER driver. Then it is translated again when the AER driver calls
cper_print_aer(). This causes the severity that is used in
cper_print_aer() to be incorrect.
Remove the second translation that is in cper_print_aer() since this
function is already receiving the correct AER severity.
Signed-off-by: Tyler Baicar <tbaicar@codeaurora.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Borislav Petkov <bp@suse.de>
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv_errprint.c | 6 | ||||
-rw-r--r-- | include/linux/aer.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c index 167fe411ce2e..54c4b691e51f 100644 --- a/drivers/pci/pcie/aer/aerdrv_errprint.c +++ b/drivers/pci/pcie/aer/aerdrv_errprint.c | |||
@@ -219,15 +219,13 @@ int cper_severity_to_aer(int cper_severity) | |||
219 | } | 219 | } |
220 | EXPORT_SYMBOL_GPL(cper_severity_to_aer); | 220 | EXPORT_SYMBOL_GPL(cper_severity_to_aer); |
221 | 221 | ||
222 | void cper_print_aer(struct pci_dev *dev, int cper_severity, | 222 | void cper_print_aer(struct pci_dev *dev, int aer_severity, |
223 | struct aer_capability_regs *aer) | 223 | struct aer_capability_regs *aer) |
224 | { | 224 | { |
225 | int aer_severity, layer, agent, status_strs_size, tlp_header_valid = 0; | 225 | int layer, agent, status_strs_size, tlp_header_valid = 0; |
226 | u32 status, mask; | 226 | u32 status, mask; |
227 | const char **status_strs; | 227 | const char **status_strs; |
228 | 228 | ||
229 | aer_severity = cper_severity_to_aer(cper_severity); | ||
230 | |||
231 | if (aer_severity == AER_CORRECTABLE) { | 229 | if (aer_severity == AER_CORRECTABLE) { |
232 | status = aer->cor_status; | 230 | status = aer->cor_status; |
233 | mask = aer->cor_mask; | 231 | mask = aer->cor_mask; |
diff --git a/include/linux/aer.h b/include/linux/aer.h index 164049357e5c..04602cbe85dc 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h | |||
@@ -63,7 +63,7 @@ static inline int pci_cleanup_aer_error_status_regs(struct pci_dev *dev) | |||
63 | } | 63 | } |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | void cper_print_aer(struct pci_dev *dev, int cper_severity, | 66 | void cper_print_aer(struct pci_dev *dev, int aer_severity, |
67 | struct aer_capability_regs *aer); | 67 | struct aer_capability_regs *aer); |
68 | int cper_severity_to_aer(int cper_severity); | 68 | int cper_severity_to_aer(int cper_severity); |
69 | void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, | 69 | void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, |