mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-23 01:40:30 +00:00
checkpatch: fix UNNECESSARY_KERN_LEVEL false positive
KERN_<LEVEL> is never redundant with printk_ratelimited or printk_once. (Except perhaps in the sense that you could use e.g. pr_err_ratelimited or pr_err_once, but that would apply to printk as well). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Andy Whitcroft <apw@canonical.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e23ef1f334
commit
dcaf112365
@ -4547,7 +4547,7 @@ sub process {
|
||||
}
|
||||
|
||||
# check for logging functions with KERN_<LEVEL>
|
||||
if ($line !~ /printk\s*\(/ &&
|
||||
if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
|
||||
$line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
|
||||
my $level = $1;
|
||||
if (WARN("UNNECESSARY_KERN_LEVEL",
|
||||
|
Loading…
Reference in New Issue
Block a user