✗ CI.checkpatch: warning for drm/xe/pmu: PMU interface for Xe (rev13)

Patchwork patchwork at emeril.freedesktop.org
Fri Jan 17 01:45:34 UTC 2025


== Series Details ==

Series: drm/xe/pmu: PMU interface for Xe (rev13)
URL   : https://patchwork.freedesktop.org/series/139121/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
30ab6715fc09baee6cc14cb3c89ad8858688d474
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit eae7c317eea7e554b07ac22ccf9a06310430171d
Author: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
Date:   Thu Jan 16 15:07:18 2025 -0800

    drm/xe/pmu: Add GT C6 events
    
    Provide a PMU interface for GT C6 residency counters. The implementation
    is ported over from the i915 PMU code. Residency is provided in units of
    ms(like sysfs entry in - /sys/class/drm/card0/device/tile0/gt0/gtidle).
    
    Sample usage and output:
    
            $ perf list | grep gt-c6
              xe_0000_00_02.0/gt-c6-residency/                   [Kernel PMU event]
    
            $ tail /sys/bus/event_source/devices/xe_0000_00_02.0/events/gt-c6-residency*
            ==> /sys/bus/event_source/devices/xe_0000_00_02.0/events/gt-c6-residency <==
            event=0x01
    
            ==> /sys/bus/event_source/devices/xe_0000_00_02.0/events/gt-c6-residency.unit <==
            ms
    
            $ perf stat -e xe_0000_00_02.0/gt-c6-residency,gt=0/ -I1000
            #           time             counts unit events
                 1.001196056              1,001 ms   xe_0000_00_02.0/gt-c6-residency,gt=0/
                 2.005216219              1,003 ms   xe_0000_00_02.0/gt-c6-residency,gt=0/
    
    Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
    Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
+ /mt/dim checkpatch 58078c97cb752a5ea9ae2f2e3ab898945153d39e drm-intel
d6b708ad14ab perf/core: Add PMU_EVENT_ATTR_ID_STRING
-:24: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#24: FILE: include/linux/perf_event.h:1926:
+#define PMU_EVENT_ATTR_ID_STRING(_name, _var, _id, _str)		    \
 static struct perf_pmu_events_attr _var = {				    \
 	.attr		= __ATTR(_name, 0444, perf_event_sysfs_show, NULL), \
+	.id		= _id,						    \
 	.event_str	= _str,						    \
 };

total: 0 errors, 1 warnings, 0 checks, 18 lines checked
9f5118dd3510 drm/xe/pmu: Enable PMU interface
-:75: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#75: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 402 lines checked
1b4803eeca42 drm/xe/pmu: Assert max gt
2577c2d1e944 drm/xe/pmu: Hook up gt suspend notification
5c831ae84780 drm/xe/pmu: Extract xe_pmu_event_update()
ca5183ee7e43 drm/xe/pmu: Add attribute skeleton
-:65: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#65: FILE: drivers/gpu/drm/xe/xe_pmu.c:249:
+#define XE_EVENT_ATTR(name_, v_, id_, unit_)					\
+	PMU_EVENT_ATTR(name_, pmu_event_ ## v_, id_, event_attr_show)		\
+	PMU_EVENT_ATTR_ID_STRING(name_.unit, pmu_event_unit_ ## v_, id_, unit_)

-:65: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name_' - possible side-effects?
#65: FILE: drivers/gpu/drm/xe/xe_pmu.c:249:
+#define XE_EVENT_ATTR(name_, v_, id_, unit_)					\
+	PMU_EVENT_ATTR(name_, pmu_event_ ## v_, id_, event_attr_show)		\
+	PMU_EVENT_ATTR_ID_STRING(name_.unit, pmu_event_unit_ ## v_, id_, unit_)

-:65: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'id_' - possible side-effects?
#65: FILE: drivers/gpu/drm/xe/xe_pmu.c:249:
+#define XE_EVENT_ATTR(name_, v_, id_, unit_)					\
+	PMU_EVENT_ATTR(name_, pmu_event_ ## v_, id_, event_attr_show)		\
+	PMU_EVENT_ATTR_ID_STRING(name_.unit, pmu_event_unit_ ## v_, id_, unit_)

-:69: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
#69: FILE: drivers/gpu/drm/xe/xe_pmu.c:253:
+XE_EVENT_ATTR(gt-c6-residency, gt_c6_residency, XE_PMU_EVENT_GT_C6_RESIDENCY, "ms")
                 ^

-:69: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
#69: FILE: drivers/gpu/drm/xe/xe_pmu.c:253:
+XE_EVENT_ATTR(gt-c6-residency, gt_c6_residency, XE_PMU_EVENT_GT_C6_RESIDENCY, "ms")
                    ^

total: 1 errors, 0 warnings, 4 checks, 89 lines checked
eae7c317eea7 drm/xe/pmu: Add GT C6 events
-:15: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#15: 
	$ tail /sys/bus/event_source/devices/xe_0000_00_02.0/events/gt-c6-residency*

total: 0 errors, 1 warnings, 0 checks, 93 lines checked




More information about the Intel-xe mailing list