diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2015-02-13 17:38:26 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-14 00:21:39 -0500 |
| commit | dcaf112365369c3b55bfc37edb634dba32dde57e (patch) | |
| tree | 012dfc118c3d6aa00f3fc62e822d890501595831 /scripts | |
| parent | e23ef1f3340c24d5ff130b574546566349897258 (diff) | |
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>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/checkpatch.pl | 2 |
1 files changed, 1 insertions, 1 deletions
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 { | |||
| 4547 | } | 4547 | } |
| 4548 | 4548 | ||
| 4549 | # check for logging functions with KERN_<LEVEL> | 4549 | # check for logging functions with KERN_<LEVEL> |
| 4550 | if ($line !~ /printk\s*\(/ && | 4550 | if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ && |
| 4551 | $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) { | 4551 | $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) { |
| 4552 | my $level = $1; | 4552 | my $level = $1; |
| 4553 | if (WARN("UNNECESSARY_KERN_LEVEL", | 4553 | if (WARN("UNNECESSARY_KERN_LEVEL", |
