Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309718
b: refs/heads/master
c: 243f380
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Jun 1, 2012
1 parent 289651a commit a714331
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a4cad4e25b91f48494f13fce3d25ea44bec7472
refs/heads/master: 243f3803cf2a3665092c5fd6f924f453694681a6
13 changes: 13 additions & 0 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a714331

Please sign in to comment.