The patch titled checkpatch: add check for too short Kconfig descriptions has been added to the -mm tree. Its filename is checkpatch-add-check-for-too-short-kconfig-descriptions.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: checkpatch: add check for too short Kconfig descriptions From: Andi Kleen <ak@xxxxxxxxxxxxxxx> I've seen various new Kconfigs with rather unhelpful one liner descriptions. Add a Kconfig warning for a minimum length of the Kconfig help section. Right now I arbitarily chose 4. The exact value can be debated. Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx> Cc: Andy Whitcroft <apw@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff -puN scripts/checkpatch.pl~checkpatch-add-check-for-too-short-kconfig-descriptions scripts/checkpatch.pl --- a/scripts/checkpatch.pl~checkpatch-add-check-for-too-short-kconfig-descriptions +++ a/scripts/checkpatch.pl @@ -1382,6 +1382,21 @@ sub process { ERROR("trailing whitespace\n" . $herevet); } +# check for Kconfig help text having a real description + if ($realfile =~ /Kconfig/ && + $line =~ /\+?\s*(---)?help(---)?$/) { + my $length = 0; + for (my $l = $linenr; defined($lines[$l]); $l++) { + my $f = $lines[$l]; + $f =~ s/#.*//; + $f =~ s/^\s+//; + next if ($f =~ /^$/); + last if ($f =~ /^\s*config\s/); + $length++; + } + WARN("please write a paragraph that describes the config symbol fully\n" . $herecurr) if ($length < 4); + } + # check we are in a valid source file if not then ignore this hunk next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/); _ Patches currently in -mm which might be from ak@xxxxxxxxxxxxxxx are linux-next.patch hardware-latency-detector-remove-default-m.patch drivers-base-cpuc-fix-the-output-from-sys-devices-system-cpu-offline.patch checkpatch-add-check-for-too-short-kconfig-descriptions.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html