diff options
| author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2024-06-12 16:51:59 +0300 |
|---|---|---|
| committer | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2024-06-12 16:52:39 +0300 |
| commit | 92815da4576a495cb6362cdfb132152fccc2222d (patch) | |
| tree | aab359ebf2ab210e9455b1d21d8298ceb81080c0 /scripts/checkpatch.pl | |
| parent | aeacc39e2088a15ee31c8af4f68c84981fa08eb7 (diff) | |
| parent | 6b4468b0c6ba37a16795da567b58dc80bc7fb439 (diff) | |
Merge remote-tracking branch 'drm-misc/drm-misc-next' into HEAD
Merge drm-misc-next tree into the msm-next tree in order to be able to
use HDMI connector framework for the MSM HDMI driver.
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 6 |
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 |
