All of lore.kernel.org
 help / color / mirror / Atom feed
* + checkpatch-add-nokprobe_symbol-to-the-whitelist-of-lines-that-can-occur-immediately-after-functions.patch added to mm-nonmm-unstable branch
@ 2026-08-07 21:57 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-08-07 21:57 UTC (permalink / raw)
  To: mm-commits, namcao, jszhang, joe, pjw, akpm


The patch titled
     Subject: checkpatch: add NOKPROBE_SYMBOL to the whitelist of lines that can occur immediately after functions
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     checkpatch-add-nokprobe_symbol-to-the-whitelist-of-lines-that-can-occur-immediately-after-functions.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/checkpatch-add-nokprobe_symbol-to-the-whitelist-of-lines-that-can-occur-immediately-after-functions.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days

------------------------------------------------------
From: Paul Walmsley <pjw@kernel.org>
Subject: checkpatch: add NOKPROBE_SYMBOL to the whitelist of lines that can occur immediately after functions
Date: Thu, 6 Aug 2026 19:00:47 -0600 (MDT)

It's customary for NOKPROBE_SYMBOL() macro usage to appear immediately
after a function's final closing brace, but checkpatch doesn't know that
yet.  As a result, checkpatch --strict incorrectly flags this common
kernel pattern, e.g.,

CHECK: Please use a blank line after function/struct/union/enum declarations
33: FILE: arch/riscv/kernel/traps.c:273:
 }
+NOKPROBE_SYMBOL(probe_single_step_handler);

Fix by adding NOKPROBE_SYMBOL to the whitelist of patterns that are
cleared to appear immediately after functions.

Link: https://lore.kernel.org/130be7db-6098-86a4-60fe-0c1a5d9e30ba@kernel.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Acked-by: Joe Perches <joe@perches.com>
Cc: Nam Cao <namcao@linutronix.de>
Cc: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/checkpatch.pl |    1 +
 1 file changed, 1 insertion(+)

--- a/scripts/checkpatch.pl~checkpatch-add-nokprobe_symbol-to-the-whitelist-of-lines-that-can-occur-immediately-after-functions
+++ a/scripts/checkpatch.pl
@@ -4154,6 +4154,7 @@ sub process {
 		      $line =~ /^\+[a-z_]*init/ ||
 		      $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
 		      $line =~ /^\+\s*DECLARE/ ||
+		      $line =~ /^\+\s*NOKPROBE_SYMBOL/ ||
 		      $line =~ /^\+\s*builtin_[\w_]*driver/ ||
 		      $line =~ /^\+\s*__setup/)) {
 			if (CHK("LINE_SPACING",
_

Patches currently in -mm which might be from pjw@kernel.org are

checkpatch-add-nokprobe_symbol-to-the-whitelist-of-lines-that-can-occur-immediately-after-functions.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-07 21:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07 21:57 + checkpatch-add-nokprobe_symbol-to-the-whitelist-of-lines-that-can-occur-immediately-after-functions.patch added to mm-nonmm-unstable branch Andrew Morton

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.