mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] practical auto-QA de-noiser or -E_TOO_UGLY ?
@ 2025-10-15 17:51 Jim Cromie
  2025-10-15 17:51 ` [RFC PATCH 1/2] checkpatch: add __no_side_effects() hint/assertion macro Jim Cromie
  2025-10-15 17:51 ` [RFC PATCH 2/2] checkpatch: cosmetic-style tweak Jim Cromie
  0 siblings, 2 replies; 4+ messages in thread
From: Jim Cromie @ 2025-10-15 17:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jim Cromie

Can I haz (in compiler.h)

  #define __no_side_effects(...)    /* checkpatch hint only */

module_param_named() if submitted now, would draw several warnings
from checkpatch --strict, on name, value (but not type).

  CHECK: Macro argument reuse '_var' - possible side-effects?

This macro allows an author to suppress that complaint, clearly and
declaratively, and strongly suggests that they used --strict, saw the
complaint, and silenced it.  So they know not to pass i++.

Do the possible QA/CI benefits suffice for the mild "hackish" flavor ?


Jim Cromie (2):
  checkpatch: add __no_side_effects() hint/assertion macro
  checkpatch: cosmetic-style tweak

 include/linux/compiler.h | 12 +++++++++
 scripts/checkpatch.pl    | 54 ++++++++++++++++++++++++++++++++++------
 2 files changed, 59 insertions(+), 7 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2025-10-16 15:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-15 17:51 [RFC PATCH 0/2] practical auto-QA de-noiser or -E_TOO_UGLY ? Jim Cromie
2025-10-15 17:51 ` [RFC PATCH 1/2] checkpatch: add __no_side_effects() hint/assertion macro Jim Cromie
2025-10-15 17:51 ` [RFC PATCH 2/2] checkpatch: cosmetic-style tweak Jim Cromie
2025-10-16 15:54   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®