aboutsummaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorDmitry Torokhov <[email protected]>2024-07-15 15:50:05 -0700
committerDmitry Torokhov <[email protected]>2024-07-15 15:50:05 -0700
commit3daee2e4b3568f0ed88b0598df96547fcf21cb9b (patch)
tree19f47d0d4d3ff05266a25364959f0012a1825131 /scripts/checkpatch.pl
parentf3efefb6fdcce604413135bd8d4c5568e53a1f13 (diff)
parent0c3836482481200ead7b416ca80c68a29cfdaabd (diff)
Merge tag 'v6.10' into next
Sync up with mainline to bring in device_for_each_child_node_scoped() and other newer APIs.
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