summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2024-07-04 16:00:24 +0200
committerPeter Zijlstra <peterz@infradead.org>2024-07-04 16:00:24 +0200
commit0c8ea05e9b3d8e5287e2a968f2a2e744dfd31b99 (patch)
treeba0443b74f063471c5d81d85e795e04e7e1dc79c /scripts/checkpatch.pl
parent0ca4da2412da05fb9dd0b5d90dcc8026219f0f29 (diff)
parent34b3fc558b537bdf99644dcde539e151716f6331 (diff)
Merge branch 'tip/x86/cpu'
The Lunarlake patches rely on the new VFM stuff. Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9c4c4a61bc83..2b812210b412 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6040,6 +6040,12 @@ sub process {
CHK("MACRO_ARG_PRECEDENCE",
"Macro argument '$arg' may be better as '($arg)' to avoid precedence issues\n" . "$herectx");
}
+
+# check if this is an unused argument
+ if ($define_stmt !~ /\b$arg\b/) {
+ WARN("MACRO_ARG_UNUSED",
+ "Argument '$arg' is not used in function-like macro\n" . "$herectx");
+ }
}
# check for macros with flow control, but without ## concatenation