diff options
author | Chen, Gong <gong.chen@linux.intel.com> | 2014-08-13 02:22:37 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-09-25 11:07:41 -0400 |
commit | 99d440242c08c8a95576c0bc89278f8912f65bda (patch) | |
tree | 151bfcf7a0e7a06e6969458c6b4e45d19fe070dd /include/ras | |
parent | 52addcf9d6669fa439387610bc65c92fa0980cef (diff) |
trace, RAS: Replace bare numbers with #defines for PCIe AER error strings
Replace bare numbers like "BIT(0)" with the existing #defines, e.g.,
PCI_ERR_COR_RCVR, to improve maintainability. This way grep will find more
uses of the #defines.
No functional change.
[bhelgaas: changelog]
Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/ras')
-rw-r--r-- | include/ras/ras_event.h | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/include/ras/ras_event.h b/include/ras/ras_event.h index 47da53c27ffa..0f2cca4ccbf0 100644 --- a/include/ras/ras_event.h +++ b/include/ras/ras_event.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
9 | #include <linux/edac.h> | 9 | #include <linux/edac.h> |
10 | #include <linux/ktime.h> | 10 | #include <linux/ktime.h> |
11 | #include <linux/pci.h> | ||
11 | #include <linux/aer.h> | 12 | #include <linux/aer.h> |
12 | #include <linux/cper.h> | 13 | #include <linux/cper.h> |
13 | 14 | ||
@@ -174,24 +175,24 @@ TRACE_EVENT(mc_event, | |||
174 | */ | 175 | */ |
175 | 176 | ||
176 | #define aer_correctable_errors \ | 177 | #define aer_correctable_errors \ |
177 | {BIT(0), "Receiver Error"}, \ | 178 | {PCI_ERR_COR_RCVR, "Receiver Error"}, \ |
178 | {BIT(6), "Bad TLP"}, \ | 179 | {PCI_ERR_COR_BAD_TLP, "Bad TLP"}, \ |
179 | {BIT(7), "Bad DLLP"}, \ | 180 | {PCI_ERR_COR_BAD_DLLP, "Bad DLLP"}, \ |
180 | {BIT(8), "RELAY_NUM Rollover"}, \ | 181 | {PCI_ERR_COR_REP_ROLL, "RELAY_NUM Rollover"}, \ |
181 | {BIT(12), "Replay Timer Timeout"}, \ | 182 | {PCI_ERR_COR_REP_TIMER, "Replay Timer Timeout"},\ |
182 | {BIT(13), "Advisory Non-Fatal"} | 183 | {PCI_ERR_COR_ADV_NFAT, "Advisory Non-Fatal"} |
183 | 184 | ||
184 | #define aer_uncorrectable_errors \ | 185 | #define aer_uncorrectable_errors \ |
185 | {BIT(4), "Data Link Protocol"}, \ | 186 | {PCI_ERR_UNC_DLP, "Data Link Protocol"}, \ |
186 | {BIT(12), "Poisoned TLP"}, \ | 187 | {PCI_ERR_UNC_POISON_TLP,"Poisoned TLP"}, \ |
187 | {BIT(13), "Flow Control Protocol"}, \ | 188 | {PCI_ERR_UNC_FCP, "Flow Control Protocol"}, \ |
188 | {BIT(14), "Completion Timeout"}, \ | 189 | {PCI_ERR_UNC_COMP_TIME, "Completion Timeout"}, \ |
189 | {BIT(15), "Completer Abort"}, \ | 190 | {PCI_ERR_UNC_COMP_ABORT,"Completer Abort"}, \ |
190 | {BIT(16), "Unexpected Completion"}, \ | 191 | {PCI_ERR_UNC_UNX_COMP, "Unexpected Completion"}, \ |
191 | {BIT(17), "Receiver Overflow"}, \ | 192 | {PCI_ERR_UNC_RX_OVER, "Receiver Overflow"}, \ |
192 | {BIT(18), "Malformed TLP"}, \ | 193 | {PCI_ERR_UNC_MALF_TLP, "Malformed TLP"}, \ |
193 | {BIT(19), "ECRC"}, \ | 194 | {PCI_ERR_UNC_ECRC, "ECRC"}, \ |
194 | {BIT(20), "Unsupported Request"} | 195 | {PCI_ERR_UNC_UNSUP, "Unsupported Request"} |
195 | 196 | ||
196 | TRACE_EVENT(aer_event, | 197 | TRACE_EVENT(aer_event, |
197 | TP_PROTO(const char *dev_name, | 198 | TP_PROTO(const char *dev_name, |