From: Joe Perches Date: Wed, 6 Aug 2014 23:10:46 +0000 (-0700) Subject: checkpatch: quiet Kconfig help message checking X-Git-Tag: v4.9.8~5947^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d73e0e7dc18a39b120cb85ec675d59516e0af1a;p=platform%2Fkernel%2Flinux-rpi3.git checkpatch: quiet Kconfig help message checking Editing Kconfig dependencies can emit unnecessary messages about missing or too short help entries. Only emit the message when adding help sections to Kconfig files. Signed-off-by: Joe Perches Reported-by: Jean Delvare Tested-by: Jean Delvare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 146e9f9..df4250a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2052,7 +2052,7 @@ sub process { # Only applies when adding the entry originally, after that we do not have # sufficient context to determine whether it is indeed long enough. if ($realfile =~ /Kconfig/ && - $line =~ /.\s*config\s+/) { + $line =~ /^\+\s*config\s+/) { my $length = 0; my $cnt = $realcnt; my $ln = $linenr + 1; @@ -2065,10 +2065,11 @@ sub process { $is_end = $lines[$ln - 1] =~ /^\+/; next if ($f =~ /^-/); + last if (!$file && $f =~ /^\@\@/); - if ($lines[$ln - 1] =~ /.\s*(?:bool|tristate)\s*\"/) { + if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate)\s*\"/) { $is_start = 1; - } elsif ($lines[$ln - 1] =~ /.\s*(?:---)?help(?:---)?$/) { + } elsif ($lines[$ln - 1] =~ /^\+\s*(?:---)?help(?:---)?$/) { $length = -1; }