All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/3] tools/sparse: Add static check
@ 2021-11-23 12:43 Richard Palethorpe via ltp
  2021-11-23 12:43 ` [LTP] [PATCH 1/3] " Richard Palethorpe via ltp
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Richard Palethorpe via ltp @ 2021-11-23 12:43 UTC (permalink / raw)
  To: ltp; +Cc: Richard Palethorpe

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(-)

-- 
2.33.1


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

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-11-30 11:43 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 12:43 [LTP] [PATCH 0/3] tools/sparse: Add static check Richard Palethorpe via ltp
2021-11-23 12:43 ` [LTP] [PATCH 1/3] " Richard Palethorpe via ltp
2021-11-24  7:12   ` Petr Vorel
2021-11-30  8:24     ` Richard Palethorpe
2021-11-30 10:19       ` Cyril Hrubis
2021-11-30 10:23         ` Cyril Hrubis
2021-11-30 10:33           ` Richard Palethorpe
2021-11-30 10:51             ` Cyril Hrubis
2021-11-30 11:43             ` Cyril Hrubis
2021-11-24 10:00   ` Richard Palethorpe
2021-11-29 10:16   ` Cyril Hrubis
2021-11-23 12:43 ` [LTP] [PATCH 2/3] doc: Add LTP-003 and LTP-004 static and tst API prefix rules Richard Palethorpe via ltp
2021-11-24  7:18   ` Petr Vorel
2021-11-29 10:17     ` Cyril Hrubis
2021-11-29 10:33       ` Petr Vorel
2021-11-29 10:44   ` Cyril Hrubis
2021-11-23 12:43 ` [LTP] [PATCH 3/3] statx: Add missing static keyword to tcase variable Richard Palethorpe via ltp
2021-11-24  7:19   ` Petr Vorel
2021-11-29 10:16     ` Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.