Skip to content

Commit

Permalink
checkpatch: quiet Kconfig help message checking
Browse files Browse the repository at this point in the history
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 <joe@perches.com>
Reported-by: Jean Delvare <jdelvare@suse.de>
Tested-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Aug 7, 2014
1 parent fee0aa8 commit 8d73e0e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit 8d73e0e

Please sign in to comment.