From: Paolo Bonzini Date: Fri, 13 Feb 2015 22:38:26 +0000 (-0800) Subject: checkpatch: fix UNNECESSARY_KERN_LEVEL false positive X-Git-Tag: firefly_0821_release~176^2~2328^2~55 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dcaf112365369c3b55bfc37edb634dba32dde57e;p=firefly-linux-kernel-4.4.55.git checkpatch: fix UNNECESSARY_KERN_LEVEL false positive KERN_ 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 Cc: Andy Whitcroft Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 221a2b245690..f130c93a5656 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4547,7 +4547,7 @@ sub process { } # check for logging functions with KERN_ - 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",