Skip to content

codingstyle: avoid unused parameters for a function-like macro

Barry Song linux-doc lkml workflows 8 versions – Applied

Status from this message: [merged mm-nonmm-stable] scripts-checkpatch-check-unused-parameters-for-function-like-macro.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest2 patches 0 repliesApplied 2/2
  2. v6 posting 2/22 patches 3 repliesSuperseded
  3. v6 posting 1/22 patches 1 replySuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v52 patches7 repliesSuperseded
v42 patches8 repliesSuperseded
v32 patches1 replySuperseded
v21 patch0 repliesSuperseded
v11 patch12 repliesSuperseded

Patches in v7 All 2 applied

#Subject and filesSizeRepliesApplied
1/2Documentation: coding-style: ask function-like macros to evaluate parametersDocumentation/process/coding-style.rst+23 -00 repliesApplied
2/2scripts: checkpatch: check unused parameters for function-like macroDocumentation/dev-tools/checkpatch.rst scripts/checkpatch.pl+20 -00 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMark BrownJoe PerchesBarry Song
1/2R-b A-b
2/2A-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v7 thread

Cover letter [PATCH v7 0/2] codingstyle: avoid unused parameters for a function-like macro

From: Barry Song <[email protected]>

-v7:
* collect ack of Joe for checkpatch.pl, thanks!
* fixed an indentation per Joe

-v6:
* collect ack of Joe, thanks!
* refine docs according to Jonathan, thanks!
* add checkpatch doc according to Joe, thanks!
v6 link:
https://lore.kernel.org/lkml/[email protected]/

-v5:
* Simplify the code for Patch 2 according to Joe's suggestions.
* add s-o-b of Barry according to Jeff Johnson
v5 link:
https://lore.kernel.org/all/[email protected]/

-v4:
* fix Xining's email address, s/[email protected]/[email protected]/g
* fix some false positives of checkpatch.pl
* downgrade from ERROR to WARN in checkpatch.pl

Thanks for Joe's comments!

v4 link: https://lore.kernel.org/all/[email protected]/

-v3:
https://lore.kernel.org/all/[email protected]/

A function-like macro could result in build warnings such as "unused variable." This patchset updates the guidance to recommend always using a static inline function instead and also provides checkpatch support for this new rule.

Barry Song (1):
Documentation: coding-style: ask function-like macros to evaluate
parameters

Xining Xu (1):
scripts: checkpatch: check unused parameters for function-like macro

 Documentation/dev-tools/checkpatch.rst | 14 ++++++++++++++
 Documentation/process/coding-style.rst | 23 +++++++++++++++++++++++
 scripts/checkpatch.pl                  |  6 ++++++
 3 files changed, 43 insertions(+)
Signature · 1 line
2.34.1