From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753137AbdKJNmc (ORCPT ); Fri, 10 Nov 2017 08:42:32 -0500 Received: from smtprelay0126.hostedemail.com ([216.40.44.126]:37760 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752518AbdKJNmb (ORCPT ); Fri, 10 Nov 2017 08:42:31 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:334:355:368:369:379:541:599:960:968:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1381:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3353:3622:3653:3865:3867:3868:3871:3872:3874:4321:5007:7903:10004:10400:10848:11026:11232:11658:11914:12043:12295:12438:12740:12760:12895:13069:13071:13311:13357:13439:14180:14181:14659:14721:21080:21222:21451:21627:30036:30054:30070:30089:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: soda37_32cd43e7ce54e X-Filterd-Recvd-Size: 2516 Message-ID: <1510321347.15768.79.camel@perches.com> Subject: Re: [PATCH v2] checkpatch: Fix checks for Kconfig help text From: Joe Perches To: Leo Yan , Andy Whitcroft , linux-kernel@vger.kernel.org Date: Fri, 10 Nov 2017 05:42:27 -0800 In-Reply-To: <1510296157-13041-1-git-send-email-leo.yan@linaro.org> References: <1510296157-13041-1-git-send-email-leo.yan@linaro.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-11-10 at 14:42 +0800, Leo Yan wrote: > If one patch has Kconfig section, the check script variable '$is_start' > will be set by first 'config' line and the variable '$is_end' is to be > set by the second 'config' line. But patches often only has one > 'config' line so we have no chance to set '$is_end', as result below > condition is invalid and it skips check for Kconfig description: > > if ($is_start && $is_end && $length < $min_conf_desc_length) { > ...... > } > > When script runs to this condition sentence it means the Kconfig > section parsing has been completed, whatever '$is_end' is true > or not. So removes '$is_end' from condition sentence. > > Another change is to change '$min_conf_desc_length' from 4 to 1; so can > pass the check if Kconfig description has at least one line. Hello Leo. I do not like this. Separate changes please and that $min_conf_desc_length change is definitely not a fix. It's a preference. > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -51,7 +51,7 @@ my $configuration_file = ".checkpatch.conf"; > my $max_line_length = 80; > my $ignore_perl_version = 0; > my $minimum_perl_version = 5.10.0; > -my $min_conf_desc_length = 4; > +my $min_conf_desc_length = 1; > my $spelling_file = "$D/spelling.txt"; > my $codespell = 0; > my $codespellfile = "/usr/share/codespell/dictionary.txt"; > @@ -2796,7 +2796,7 @@ sub process { > } > $length++; > } > - if ($is_start && $is_end && $length < $min_conf_desc_length) { > + if ($is_start && $length < $min_conf_desc_length) { > WARN("CONFIG_DESCRIPTION", > "please write a paragraph that describes the config symbol fully\n" . $herecurr); > }