lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20241227-avoid-unnecessary-printk-deferred-warning-v1-1-34147aa4a707@quicinc.com>
Date: Fri, 27 Dec 2024 18:22:16 +0800
From: Maria Yu <quic_aiquny@...cinc.com>
To: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
        Dwaipayan Ray <dwaipayanray1@...il.com>,
        Lukas Bulwahn
	<lukas.bulwahn@...il.com>
CC: <kernel@...cinc.com>, <linux-kernel@...r.kernel.org>,
        Maria Yu
	<quic_aiquny@...cinc.com>
Subject: [PATCH] checkpatch: fix UNNECESSARY_KERN_LEVEL false positive for
 printk_deferred_once

KERN_<LEVEL> is never redundant with printk_deferred_once.

Signed-off-by: Maria Yu <quic_aiquny@...cinc.com>
---
There is an example of checkpatch warning here [1].
https://lore.kernel.org/all/20241227-sched-use-printk_deferred_once-v1-1-5da85cb38da2@quicinc.com/
[1]
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index ccbc1dc00715b184cea70d89b6e2fa26b0ae0c5d..80ddeace88c9e2b3d6c30214ae4446e21287c343 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6458,7 +6458,7 @@ sub process {
 		}
 
 # check for logging functions with KERN_<LEVEL>
-		if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
+		if ($line !~ /printk(?:_ratelimited|_once|_deferred_once)?\s*\(/ &&
 		    $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
 			my $level = $1;
 			if (WARN("UNNECESSARY_KERN_LEVEL",

---
base-commit: 8155b4ef3466f0e289e8fcc9e6e62f3f4dceeac2
change-id: 20241227-avoid-unnecessary-printk-deferred-warning-886803ae438d

Best regards,
-- 
Maria Yu <quic_aiquny@...cinc.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ