checkpatch --strict | ci-pipeline improvements
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | checkpatch: add --drx option and drx_print() helperscripts/ | +26 | 1 reply | |
| 2/3 | checkpatch: recognize __chkp_no_side_effects(_var) hint macroscripts/ | +17 | 1 reply | |
| 3/3 | compiler.h: add __chkp_no_side_effects() empty hint/assertion macroinclude/ | +12 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] checkpatch --strict | ci-pipeline improvements
Several CI-pipelines call to checkpatch.pl --strict, so CHECK reports there can disrupt pipeline flow. This patchset addresses one such check.
CHECK: Macro argument reuse '_var' - possible side-effects?
Multi-statement declarative macros (both top-of-scope and file-scope), commonly fall victim to this warning, checkpatch even has a list of named exceptions to silence some of the checks.
This patchset provides a more focussed approach:
1 #define __chkp_no_side_effects(...) /* nothing */
so no functional change due to its use.
2 teach checkpatch how to silence THAT WARNING on that _var
find the macro call in macro-body, extract no-side-effect-vars process the macro body as usual, count arg expansions before issuing CHECK, check the no-side-effect-vars
3 authors add the assertion to their noisy macros
active assertion of safety, per variable, not full pardon by name indicates they tested against --strict
Jim Cromie (3):
checkpatch: add --drx option and drx_print() helper
checkpatch: recognize __chkp_no_side_effects(_var) hint macro compiler.h: add __chkp_no_side_effects() empty hint/assertion macro
include/linux/compiler.h | 12 ++++++++++ scripts/checkpatch.pl | 47 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 55 insertions(+), 4 deletions(-)
Signature · 1 line
2.51.0