summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2022-12-05 20:28:34 -0800
committerDan Williams <dan.j.williams@intel.com>2022-12-06 14:37:52 -0800
commit372ab3bc3711db46ae1205401c2aac2ed16fc348 (patch)
tree340d9c7d16ea006c6155ca8c3a7169341e1a72ef /include/trace
parent7fe898041fb0c8e630504ecc2cb8805651ac85c1 (diff)
downloadlinux-stable-372ab3bc3711db46ae1205401c2aac2ed16fc348.tar.gz
linux-stable-372ab3bc3711db46ae1205401c2aac2ed16fc348.tar.bz2
linux-stable-372ab3bc3711db46ae1205401c2aac2ed16fc348.zip
cxl/pci: Add some type-safety to the AER trace points
The first argument to the CXL AER trace points is the source device. Pass a 'const struct device *' rather than a 'const char *' for more type precision / safety. Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Dave Jiang <dave.jiang@intel.com> Cc: Steven Rostedt <rostedt@goodmis.org> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Link: https://lore.kernel.org/r/167030091477.4045167.15174636482098463885.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/cxl.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/trace/events/cxl.h b/include/trace/events/cxl.h
index 72c3e2870a9e..ad085a2534ef 100644
--- a/include/trace/events/cxl.h
+++ b/include/trace/events/cxl.h
@@ -45,16 +45,16 @@
)
TRACE_EVENT(cxl_aer_uncorrectable_error,
- TP_PROTO(const char *dev_name, u32 status, u32 fe, u32 *hl),
- TP_ARGS(dev_name, status, fe, hl),
+ TP_PROTO(const struct device *dev, u32 status, u32 fe, u32 *hl),
+ TP_ARGS(dev, status, fe, hl),
TP_STRUCT__entry(
- __string(dev_name, dev_name)
+ __string(dev_name, dev_name(dev))
__field(u32, status)
__field(u32, first_error)
__array(u32, header_log, CXL_HEADERLOG_SIZE_U32)
),
TP_fast_assign(
- __assign_str(dev_name, dev_name);
+ __assign_str(dev_name, dev_name(dev));
__entry->status = status;
__entry->first_error = fe;
/*
@@ -89,14 +89,14 @@ TRACE_EVENT(cxl_aer_uncorrectable_error,
)
TRACE_EVENT(cxl_aer_correctable_error,
- TP_PROTO(const char *dev_name, u32 status),
- TP_ARGS(dev_name, status),
+ TP_PROTO(const struct device *dev, u32 status),
+ TP_ARGS(dev, status),
TP_STRUCT__entry(
- __string(dev_name, dev_name)
+ __string(dev_name, dev_name(dev))
__field(u32, status)
),
TP_fast_assign(
- __assign_str(dev_name, dev_name);
+ __assign_str(dev_name, dev_name(dev));
__entry->status = status;
),
TP_printk("%s: status: '%s'",