diff options
| author | Inki Dae <inki.dae@samsung.com> | 2012-07-27 06:09:46 +0400 |
|---|---|---|
| committer | Inki Dae <inki.dae@samsung.com> | 2012-07-27 06:09:46 +0400 |
| commit | faa3d77749ad30d2e1c48e2e4363b9c4889aca27 (patch) | |
| tree | a3b61011d6861704470a821d5136d1479d7ee2a2 /scripts/checkpatch.pl | |
| parent | e728519ea853a4f693577decfd2f5eb7e4a3a20d (diff) | |
| parent | 98c7b42375011ec37251e6fc85a0471cfe499eea (diff) | |
| download | linux-faa3d77749ad30d2e1c48e2e4363b9c4889aca27.tar.xz | |
Merge branch 'drm-next' of ../main_line/linux-drm into dave-drm-next
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index faea0ec612bf..e5bd60ff48e3 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2382,6 +2382,19 @@ sub process { } } + if ($line =~ /\bprintk\s*\(\s*KERN_([A-Z]+)/) { + my $orig = $1; + my $level = lc($orig); + $level = "warn" if ($level eq "warning"); + WARN("PREFER_PR_LEVEL", + "Prefer pr_$level(... to printk(KERN_$1, ...\n" . $herecurr); + } + + if ($line =~ /\bpr_warning\s*\(/) { + WARN("PREFER_PR_LEVEL", + "Prefer pr_warn(... to pr_warning(...\n" . $herecurr); + } + # function brace can't be on same line, except for #defines of do while, # or if closed on same line if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and @@ -2448,6 +2461,13 @@ sub process { "space prohibited between function name and open parenthesis '('\n" . $herecurr); } } + +# check for whitespace before a non-naked semicolon + if ($line =~ /^\+.*\S\s+;/) { + CHK("SPACING", + "space prohibited before semicolon\n" . $herecurr); + } + # Check operator spacing. if (!($line=~/\#\s*include/)) { my $ops = qr{ |
