diff --git a/tests/ci/checkpatch/checkpatch.pl b/tests/ci/checkpatch/checkpatch.pl index 9c4c4a61..2b812210 100644 --- a/tests/ci/checkpatch/checkpatch.pl +++ b/tests/ci/checkpatch/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 diff --git a/tests/ci/checkpatch/const_structs.checkpatch b/tests/ci/checkpatch/const_structs.checkpatch index fa96cfd1..52e5bfb6 100644 --- a/tests/ci/checkpatch/const_structs.checkpatch +++ b/tests/ci/checkpatch/const_structs.checkpatch @@ -39,6 +39,7 @@ kgdb_arch kgdb_io kobj_type kset_uevent_ops +lcd_ops lock_manager_operations machine_desc microcode_ops