diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 20 | ||||
-rwxr-xr-x | scripts/get_maintainer.pl | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/gfp-translate | 0 |
3 files changed, 22 insertions, 1 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 { | |||
2382 | } | 2382 | } |
2383 | } | 2383 | } |
2384 | 2384 | ||
2385 | if ($line =~ /\bprintk\s*\(\s*KERN_([A-Z]+)/) { | ||
2386 | my $orig = $1; | ||
2387 | my $level = lc($orig); | ||
2388 | $level = "warn" if ($level eq "warning"); | ||
2389 | WARN("PREFER_PR_LEVEL", | ||
2390 | "Prefer pr_$level(... to printk(KERN_$1, ...\n" . $herecurr); | ||
2391 | } | ||
2392 | |||
2393 | if ($line =~ /\bpr_warning\s*\(/) { | ||
2394 | WARN("PREFER_PR_LEVEL", | ||
2395 | "Prefer pr_warn(... to pr_warning(...\n" . $herecurr); | ||
2396 | } | ||
2397 | |||
2385 | # function brace can't be on same line, except for #defines of do while, | 2398 | # function brace can't be on same line, except for #defines of do while, |
2386 | # or if closed on same line | 2399 | # or if closed on same line |
2387 | if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and | 2400 | if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and |
@@ -2448,6 +2461,13 @@ sub process { | |||
2448 | "space prohibited between function name and open parenthesis '('\n" . $herecurr); | 2461 | "space prohibited between function name and open parenthesis '('\n" . $herecurr); |
2449 | } | 2462 | } |
2450 | } | 2463 | } |
2464 | |||
2465 | # check for whitespace before a non-naked semicolon | ||
2466 | if ($line =~ /^\+.*\S\s+;/) { | ||
2467 | CHK("SPACING", | ||
2468 | "space prohibited before semicolon\n" . $herecurr); | ||
2469 | } | ||
2470 | |||
2451 | # Check operator spacing. | 2471 | # Check operator spacing. |
2452 | if (!($line=~/\#\s*include/)) { | 2472 | if (!($line=~/\#\s*include/)) { |
2453 | my $ops = qr{ | 2473 | my $ops = qr{ |
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 0948c6b5a321..8b673dd4627f 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
@@ -83,6 +83,8 @@ push(@signature_tags, "Signed-off-by:"); | |||
83 | push(@signature_tags, "Reviewed-by:"); | 83 | push(@signature_tags, "Reviewed-by:"); |
84 | push(@signature_tags, "Acked-by:"); | 84 | push(@signature_tags, "Acked-by:"); |
85 | 85 | ||
86 | my $signature_pattern = "\(" . join("|", @signature_tags) . "\)"; | ||
87 | |||
86 | # rfc822 email address - preloaded methods go here. | 88 | # rfc822 email address - preloaded methods go here. |
87 | my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; | 89 | my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; |
88 | my $rfc822_char = '[\\000-\\377]'; | 90 | my $rfc822_char = '[\\000-\\377]'; |
@@ -473,7 +475,6 @@ my @subsystem = (); | |||
473 | my @status = (); | 475 | my @status = (); |
474 | my %deduplicate_name_hash = (); | 476 | my %deduplicate_name_hash = (); |
475 | my %deduplicate_address_hash = (); | 477 | my %deduplicate_address_hash = (); |
476 | my $signature_pattern; | ||
477 | 478 | ||
478 | my @maintainers = get_maintainers(); | 479 | my @maintainers = get_maintainers(); |
479 | 480 | ||
diff --git a/scripts/gfp-translate b/scripts/gfp-translate index c9230e158a8f..c9230e158a8f 100644..100755 --- a/scripts/gfp-translate +++ b/scripts/gfp-translate | |||