checkpatch: fix UNNECESSARY_KERN_LEVEL false positive
PATCH 1/1 checkpatch: fix UNNECESSARY_KERN_LEVEL false positive
KERN_<LEVEL> is never redundant with printk_ratelimited.
Cc Andy Whitcroft <[email protected]>
Cc Joe Perches <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>
--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
@@ -4545,7 +4545,7 @@ sub process { } # check for logging functions with KERN_<LEVEL> - if ($line !~ /printk\s*\(/ && + if ($line !~ /printk(?:_ratelimited)?\s*\(/ && $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) { my $level = $1; if (WARN("UNNECESSARY_KERN_LEVEL",
Signature · 1 line
1.8.3.1
Joe Perches
maintainerQuoted 1 line · Paolo Bonzini
KERN_<LEVEL> is never redundant with
printk_ratelimited.
[]
scripts/checkpatch.pl
Quoted 1 line
scripts/checkpatch.pl +0
-0
[]
scripts/checkpatch.pl sub process { · line 4548
Quoted 6 lines
scripts/checkpatch.pl +1
-1@@ -4545,7 +4545,7 @@ sub process { } # check for logging functions with KERN_<LEVEL> - if ($line !~ /printk\s*\(/ && + if ($line !~ /printk(?:_ratelimited)?\s*\(/ &&
Seems sensible bu this should probably add _once too
if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
Please add and resubmit cc'ing Andrew Morton too.