mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
52addcf9d6
commit
99d440242c
|
@ -8,6 +8,7 @@
|
||||||
#include <linux/tracepoint.h>
|
#include <linux/tracepoint.h>
|
||||||
#include <linux/edac.h>
|
#include <linux/edac.h>
|
||||||
#include <linux/ktime.h>
|
#include <linux/ktime.h>
|
||||||
|
#include <linux/pci.h>
|
||||||
#include <linux/aer.h>
|
#include <linux/aer.h>
|
||||||
#include <linux/cper.h>
|
#include <linux/cper.h>
|
||||||
|
|
||||||
|
@ -174,24 +175,24 @@ TRACE_EVENT(mc_event,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define aer_correctable_errors \
|
#define aer_correctable_errors \
|
||||||
{BIT(0), "Receiver Error"}, \
|
{PCI_ERR_COR_RCVR, "Receiver Error"}, \
|
||||||
{BIT(6), "Bad TLP"}, \
|
{PCI_ERR_COR_BAD_TLP, "Bad TLP"}, \
|
||||||
{BIT(7), "Bad DLLP"}, \
|
{PCI_ERR_COR_BAD_DLLP, "Bad DLLP"}, \
|
||||||
{BIT(8), "RELAY_NUM Rollover"}, \
|
{PCI_ERR_COR_REP_ROLL, "RELAY_NUM Rollover"}, \
|
||||||
{BIT(12), "Replay Timer Timeout"}, \
|
{PCI_ERR_COR_REP_TIMER, "Replay Timer Timeout"},\
|
||||||
{BIT(13), "Advisory Non-Fatal"}
|
{PCI_ERR_COR_ADV_NFAT, "Advisory Non-Fatal"}
|
||||||
|
|
||||||
#define aer_uncorrectable_errors \
|
#define aer_uncorrectable_errors \
|
||||||
{BIT(4), "Data Link Protocol"}, \
|
{PCI_ERR_UNC_DLP, "Data Link Protocol"}, \
|
||||||
{BIT(12), "Poisoned TLP"}, \
|
{PCI_ERR_UNC_POISON_TLP,"Poisoned TLP"}, \
|
||||||
{BIT(13), "Flow Control Protocol"}, \
|
{PCI_ERR_UNC_FCP, "Flow Control Protocol"}, \
|
||||||
{BIT(14), "Completion Timeout"}, \
|
{PCI_ERR_UNC_COMP_TIME, "Completion Timeout"}, \
|
||||||
{BIT(15), "Completer Abort"}, \
|
{PCI_ERR_UNC_COMP_ABORT,"Completer Abort"}, \
|
||||||
{BIT(16), "Unexpected Completion"}, \
|
{PCI_ERR_UNC_UNX_COMP, "Unexpected Completion"}, \
|
||||||
{BIT(17), "Receiver Overflow"}, \
|
{PCI_ERR_UNC_RX_OVER, "Receiver Overflow"}, \
|
||||||
{BIT(18), "Malformed TLP"}, \
|
{PCI_ERR_UNC_MALF_TLP, "Malformed TLP"}, \
|
||||||
{BIT(19), "ECRC"}, \
|
{PCI_ERR_UNC_ECRC, "ECRC"}, \
|
||||||
{BIT(20), "Unsupported Request"}
|
{PCI_ERR_UNC_UNSUP, "Unsupported Request"}
|
||||||
|
|
||||||
TRACE_EVENT(aer_event,
|
TRACE_EVENT(aer_event,
|
||||||
TP_PROTO(const char *dev_name,
|
TP_PROTO(const char *dev_name,
|
||||||
|
|
Loading…
Reference in New Issue