✗ CI.checkpatch: warning for Define generic helpers for manipulating macro arguments (rev3)
Patchwork
patchwork at emeril.freedesktop.org
Thu May 2 22:54:57 UTC 2024
== Series Details ==
Series: Define generic helpers for manipulating macro arguments (rev3)
URL : https://patchwork.freedesktop.org/series/133123/
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
0daf0be5bb95eb0a0e42275e00a0e42d8d8fd543
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 84ea8ad784373666de18fe96e7527634b9681cf1
Author: Michal Wajdeczko <michal.wajdeczko at intel.com>
Date: Fri May 3 00:33:13 2024 +0200
drm/xe/rtp: Prefer helper macros from xe_args.h
Some custom implementation can be replaced with generic macros
from the linux/args.h or xe_args.h.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
Cc: Lucas De Marchi <lucas.demarchi at intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
+ /mt/dim checkpatch 92054b4391b7438d7af372e0415d96551353ae1c drm-intel
421f0104b193 drm/xe: Add helpers for manipulating macro arguments
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:19: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#19:
new file mode 100644
-:142: ERROR:SPACING: space prohibited before that ',' (ctx:WxE)
#142: FILE: drivers/gpu/drm/xe/xe_args.h:119:
+#define ARGS_SEP_COMMA ,
^
-:142: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#142: FILE: drivers/gpu/drm/xe/xe_args.h:119:
+#define ARGS_SEP_COMMA ,
total: 2 errors, 1 warnings, 0 checks, 121 lines checked
9c93d544da22 drm/xe/kunit: Add simple tests for new xe_args macros
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:24: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#24:
new file mode 100644
-:40: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#40: FILE: drivers/gpu/drm/xe/tests/xe_args_test.c:12:
+#define foo X, Y, Z, Q
-:54: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#54: FILE: drivers/gpu/drm/xe/tests/xe_args_test.c:26:
+#define foo X, Y, Z, Q
-:67: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#67: FILE: drivers/gpu/drm/xe/tests/xe_args_test.c:39:
+#define foo X, Y, Z, Q
-:81: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#81: FILE: drivers/gpu/drm/xe/tests/xe_args_test.c:53:
+#define foo X, Y, Z, Q
-:93: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#93: FILE: drivers/gpu/drm/xe/tests/xe_args_test.c:65:
+#define foo(f) f(X) f(Y) f(Z) f(Q)
-:93: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'f' - possible side-effects?
#93: FILE: drivers/gpu/drm/xe/tests/xe_args_test.c:65:
+#define foo(f) f(X) f(Y) f(Z) f(Q)
-:112: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#112: FILE: drivers/gpu/drm/xe/tests/xe_args_test.c:84:
+#define FOO_ARGS X, Y, Z, Q
-:113: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#113: FILE: drivers/gpu/drm/xe/tests/xe_args_test.c:85:
+#define MAX_ARGS -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12
total: 7 errors, 1 warnings, 1 checks, 197 lines checked
84ea8ad78437 drm/xe/rtp: Prefer helper macros from xe_args.h
-:75: WARNING:LONG_LINE: line length of 113 exceeds 100 columns
#75: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:56:
+#define XE_RTP_PASTE_FOREACH(prefix_, sep_, args_) _XE_RTP_CONCAT(PASTE_, COUNT_ARGS args_)(prefix_, sep_, args_)
-:75: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'args_' - possible side-effects?
#75: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:56:
+#define XE_RTP_PASTE_FOREACH(prefix_, sep_, args_) _XE_RTP_CONCAT(PASTE_, COUNT_ARGS args_)(prefix_, sep_, args_)
-:77: WARNING:LONG_LINE: line length of 166 exceeds 100 columns
#77: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:58:
+#define XE_RTP_PASTE_2(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_1(prefix_, sep_, _XE_TUPLE_TAIL args_)
-:77: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#77: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:58:
+#define XE_RTP_PASTE_2(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_1(prefix_, sep_, _XE_TUPLE_TAIL args_)
-:77: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'prefix_' - possible side-effects?
#77: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:58:
+#define XE_RTP_PASTE_2(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_1(prefix_, sep_, _XE_TUPLE_TAIL args_)
-:77: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'args_' - possible side-effects?
#77: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:58:
+#define XE_RTP_PASTE_2(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_1(prefix_, sep_, _XE_TUPLE_TAIL args_)
-:78: WARNING:LONG_LINE: line length of 166 exceeds 100 columns
#78: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:59:
+#define XE_RTP_PASTE_3(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_2(prefix_, sep_, _XE_TUPLE_TAIL args_)
-:78: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#78: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:59:
+#define XE_RTP_PASTE_3(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_2(prefix_, sep_, _XE_TUPLE_TAIL args_)
-:78: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'prefix_' - possible side-effects?
#78: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:59:
+#define XE_RTP_PASTE_3(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_2(prefix_, sep_, _XE_TUPLE_TAIL args_)
-:78: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'args_' - possible side-effects?
#78: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:59:
+#define XE_RTP_PASTE_3(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_2(prefix_, sep_, _XE_TUPLE_TAIL args_)
-:79: WARNING:LONG_LINE: line length of 166 exceeds 100 columns
#79: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:60:
+#define XE_RTP_PASTE_4(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_3(prefix_, sep_, _XE_TUPLE_TAIL args_)
-:79: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#79: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:60:
+#define XE_RTP_PASTE_4(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_3(prefix_, sep_, _XE_TUPLE_TAIL args_)
-:79: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'prefix_' - possible side-effects?
#79: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:60:
+#define XE_RTP_PASTE_4(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_3(prefix_, sep_, _XE_TUPLE_TAIL args_)
-:79: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'args_' - possible side-effects?
#79: FILE: drivers/gpu/drm/xe/xe_rtp_helpers.h:60:
+#define XE_RTP_PASTE_4(prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, PICK_FIRST args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_3(prefix_, sep_, _XE_TUPLE_TAIL args_)
total: 3 errors, 4 warnings, 7 checks, 65 lines checked
More information about the Intel-xe
mailing list