Skip to content

tools/sparse: Add static check

Richard Palethorpe via ltp ltp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tools/sparse: Add static checktools/sparse/sparse-ltp.c+53 -09 replies
2/3doc: Add LTP-003 and LTP-004 static and tst API prefix rulesdoc/library-api-writing-guidelines.txt doc/rules.tsv doc/test-writing-guidelines.txt+20 -04 replies
3/3statx: Add missing static keyword to tcase variabletestcases/kernel/syscalls/statx/statx01.c testcases/kernel/syscalls/statx/statx02.c testcases/kernel/syscalls/statx/statx04.c +2 more+5 -52 replies

Reviews trailers per patch

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

PatchPetr VorelCyril HrubisRichard Palethorpe
1/3A-b R-b
2/3R-b R-b
3/3R-b R-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 v1 thread

Cover letter [LTP] [PATCH 0/3] tools/sparse: Add static check

Hello,

This teaches 'make check' to flag missing static keywords. Note that I am not sure how this avoids flagging symbols only declared in header files. However I haven't noticed any false positives and I think false negatives will only occur when the author uses function prototypes to reference private symbols before their definition.

The statx patch is just included to show one issue it caught.

Richard Palethorpe (3):
tools/sparse: Add static check
doc: Add LTP-003 and LTP-004 static and tst API prefix rules
statx: Add missing static keyword to tcase variable

 doc/library-api-writing-guidelines.txt    | 10 +++++
 doc/rules.tsv                             |  2 +
 doc/test-writing-guidelines.txt           |  8 ++++
 testcases/kernel/syscalls/statx/statx01.c |  2 +-
 testcases/kernel/syscalls/statx/statx02.c |  2 +-
 testcases/kernel/syscalls/statx/statx04.c |  2 +-
 testcases/kernel/syscalls/statx/statx05.c |  2 +-
 testcases/kernel/syscalls/statx/statx07.c |  2 +-
 tools/sparse/sparse-ltp.c                 | 53 +++++++++++++++++++++++
 9 files changed, 78 insertions(+), 5 deletions(-)
Signature · 5 lines
2.33.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp