Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751381AbdLUIjM (ORCPT ); Thu, 21 Dec 2017 03:39:12 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:42195 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750883AbdLUIjH (ORCPT ); Thu, 21 Dec 2017 03:39:07 -0500 X-Google-Smtp-Source: ACJfBousTn/EGUa3KBqJSRVS5srG0LEeZODDmggmk7JL39XUPSXVohEFsiVOW3uYYlv3jjK15lOZTQ== Date: Thu, 21 Dec 2017 16:38:58 +0800 From: Leo Yan To: Andy Whitcroft , Joe Perches , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] checkpatch: Fix checks for Kconfig help text Message-ID: <20171221083858.GA12585@leoy-linaro> References: <1510994881-9634-1-git-send-email-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1510994881-9634-1-git-send-email-leo.yan@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1341 Lines: 38 On Sat, Nov 18, 2017 at 04:48:01PM +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 has only 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. Gentle ping. > Signed-off-by: Leo Yan > --- > scripts/checkpatch.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 95cda3e..6050323 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -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); > } > -- > 2.7.4 >