From nobody Tue Sep 29 14:06:01 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C60FD70808 for ; Fri, 7 Aug 2026 01:00:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786064452; cv=none; b=ITvunVM75I9FPEFH0XzIpCY/x0kpdAJlHp6RUjAezBE7Jv3qonbqECkr1iOT6Boo8XWVLCQthg11NqdoZu7vkuS2y1UGE6rf1yJ5am+DpJ5ifJIMcS9EXOraU3qhwiHInaaL90Ai8s4NZJEeUe5/u/2uujH5eVo8IkjMc1sWU+0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786064452; c=relaxed/simple; bh=iotslhaEZt8loWPGgkcIv0hGHfwfMOkEAmJhHNf8v2o=; h=Date:From:To:cc:Subject:Message-ID:MIME-Version:Content-Type; b=HbS4nFB/xILKTpEharAchY5rLJQEZeckbDTVk3/Cl6VRAWQLqu3WdkVj3jC3/4G58TjC03wZtJdSaOiKAWf+jxkFYrzTF3PJqynFUM3XrIyldxk1c3IE1mcFiQYP5JXUp8TqAk83h3TwuhLnrIXQ599yCUuS/lW9lfVF82jtuQ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=m1K+iYkD; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="m1K+iYkD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 143571F000E9; Fri, 7 Aug 2026 01:00:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786064451; bh=lKlp/e9fIvqOwqvKM8Ea6sHjy+W4jUSsKOtwkFyx2gk=; h=Date:From:To:cc:Subject; b=m1K+iYkDoPhDNl//S/Vhfkv8caQF0tELd3g/3xugcZUTWeHW9XCsTK8lVkz+H5HLP wRsETyR/cQovFqUJ3MqUbkC+jVNDkGSNDMLIuXXSdzUBbtPWTSFZwjwZDDA0AFgztH Bu6cJFQO/G6OxgvLjegPNOAp5Rp7Ga1u9mFHFRt96JWodrutmmHA+Drid6J4t61mrq fSNBcHyJXe11crzOm7RCpfMyFhLUewQpcedlQKKOPfCtHFwcIFvrD7gS+02JoZm6Qt qW1S7OwiqWkEiVRgGoMqvuB4Ml9geW3S5sq/oClwfRsPKEIPPsugidMRAUifwwmPeV 5StNqTVX9GAPw== Date: Thu, 6 Aug 2026 19:00:47 -0600 (MDT) From: Paul Walmsley To: apw@canonical.com, joe@perches.com, linux-kernel@vger.kernel.org cc: Nam Cao , Jisheng Zhang Subject: [PATCH] checkpatch: add NOKPROBE_SYMBOL to the whitelist of lines that can occur immediately after functions Message-ID: <130be7db-6098-86a4-60fe-0c1a5d9e30ba@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" It's customary for NOKPROBE_SYMBOL() macro usage to appear immedately 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. Cc: Nam Cao Cc: Jisheng Zhang Signed-off-by: Paul Walmsley Acked-by: Joe Perches --- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2b7a42bbdd94..f8a57ed71f34 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4148,6 +4148,7 @@ sub process { $line =3D~ /^\+[a-z_]*init/ || $line =3D~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ || $line =3D~ /^\+\s*DECLARE/ || + $line =3D~ /^\+\s*NOKPROBE_SYMBOL/ || $line =3D~ /^\+\s*builtin_[\w_]*driver/ || $line =3D~ /^\+\s*__setup/)) { if (CHK("LINE_SPACING", --=20 2.53.0