From 19b898afda33bc8c3c165d7653061c9ad1a4f8e5 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Tue, 26 Oct 2010 14:23:12 -0700 Subject: [PATCH] --- yaml --- r: 217583 b: refs/heads/master c: d2c0a23514d8ac4ed10a8e742467cfb72ca3bed8 h: refs/heads/master i: 217581: 3b4fe6ecaa603faf78c42545354ae4e60659f267 217579: c1878cbb82f95a813fb0c991eaf38fb0986186dc 217575: 62a28dd996666c746b58f9aa7287ddfb181c1d69 217567: 14de0c07ba42355582e4d1d1717427dc60186f4b v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 362931cbeb0a..3514fa0debcc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e91b6e263ed6735c766cb14bbe63b9c7bd774526 +refs/heads/master: d2c0a23514d8ac4ed10a8e742467cfb72ca3bed8 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 41f59b1e209b..32d6a236570d 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -103,6 +103,8 @@ sub help { die "$@" if ($@); } +my $rpt_cleaners = 0; + if ($terse) { $emacs = 1; $quiet++; @@ -1389,6 +1391,7 @@ sub process { } elsif ($rawline =~ /^\+.*\S\s+$/ || $rawline =~ /^\+\s+$/) { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; ERROR("trailing whitespace\n" . $herevet); + $rpt_cleaners = 1; } # check for Kconfig help text having a real description @@ -1450,6 +1453,7 @@ sub process { $rawline =~ /^\+\s* \s*/) { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; ERROR("code indent should use tabs where possible\n" . $herevet); + $rpt_cleaners = 1; } # check for space before tabs. @@ -2842,6 +2846,15 @@ sub process { print "\n" if ($quiet == 0); } + if ($quiet == 0) { + # If there were whitespace errors which cleanpatch can fix + # then suggest that. + if ($rpt_cleaners) { + print "NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or\n"; + print " scripts/cleanfile\n\n"; + } + } + if ($clean == 1 && $quiet == 0) { print "$vname has no obvious style problems and is ready for submission.\n" }