aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 41f59b1e209b..32d6a236570d 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -103,6 +103,8 @@ for my $key (keys %debug) {
103 die "$@" if ($@); 103 die "$@" if ($@);
104} 104}
105 105
106my $rpt_cleaners = 0;
107
106if ($terse) { 108if ($terse) {
107 $emacs = 1; 109 $emacs = 1;
108 $quiet++; 110 $quiet++;
@@ -1389,6 +1391,7 @@ sub process {
1389 } elsif ($rawline =~ /^\+.*\S\s+$/ || $rawline =~ /^\+\s+$/) { 1391 } elsif ($rawline =~ /^\+.*\S\s+$/ || $rawline =~ /^\+\s+$/) {
1390 my $herevet = "$here\n" . cat_vet($rawline) . "\n"; 1392 my $herevet = "$here\n" . cat_vet($rawline) . "\n";
1391 ERROR("trailing whitespace\n" . $herevet); 1393 ERROR("trailing whitespace\n" . $herevet);
1394 $rpt_cleaners = 1;
1392 } 1395 }
1393 1396
1394# check for Kconfig help text having a real description 1397# check for Kconfig help text having a real description
@@ -1450,6 +1453,7 @@ sub process {
1450 $rawline =~ /^\+\s* \s*/) { 1453 $rawline =~ /^\+\s* \s*/) {
1451 my $herevet = "$here\n" . cat_vet($rawline) . "\n"; 1454 my $herevet = "$here\n" . cat_vet($rawline) . "\n";
1452 ERROR("code indent should use tabs where possible\n" . $herevet); 1455 ERROR("code indent should use tabs where possible\n" . $herevet);
1456 $rpt_cleaners = 1;
1453 } 1457 }
1454 1458
1455# check for space before tabs. 1459# check for space before tabs.
@@ -2842,6 +2846,15 @@ sub process {
2842 print "\n" if ($quiet == 0); 2846 print "\n" if ($quiet == 0);
2843 } 2847 }
2844 2848
2849 if ($quiet == 0) {
2850 # If there were whitespace errors which cleanpatch can fix
2851 # then suggest that.
2852 if ($rpt_cleaners) {
2853 print "NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or\n";
2854 print " scripts/cleanfile\n\n";
2855 }
2856 }
2857
2845 if ($clean == 1 && $quiet == 0) { 2858 if ($clean == 1 && $quiet == 0) {
2846 print "$vname has no obvious style problems and is ready for submission.\n" 2859 print "$vname has no obvious style problems and is ready for submission.\n"
2847 } 2860 }