Received: by 10.223.164.202 with SMTP id h10csp1151203wrb; Thu, 9 Nov 2017 22:40:40 -0800 (PST) X-Google-Smtp-Source: ABhQp+Rv34PYwdBoWi1/E92uwnWTZyV3tbHTAbCRvcIxNi9kLnVsPK3NURTRFGnWN6TGuFLIQnx8 X-Received: by 10.84.150.164 with SMTP id h33mr3164743plh.246.1510296040335; Thu, 09 Nov 2017 22:40:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510296040; cv=none; d=google.com; s=arc-20160816; b=DQGR01UCwQxcxra1I2Dn2k6qBCWtlTR0EzsT7CiFFQ5rCK/eE+ZGCWIUu7mgCwuFhT q/UH98VE2DzenNElGOWja1QSIfIORTSXtPMThwzXS+KD/Jd9J7MUnFVKYPjo9YxkSaah LobM5dfykSAzjyLAHFc55jNRsmmUVEc6uaxcGzWiOVew0IjJxTnFA/dV2O/WAB+JjZvj uHtP/mQ0SK8Mo+0EFNYc7cGGYGMazfKk4uLDolXiiTjKhaF5FENvt8DfuUE1JGAycUU2 86YfwwsLd4cX/NHqMpB7xua/nnguxt7CCpb9iez+n/Ow70UYkNVGpXXg+0A+jfzyD+kP 3qpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:dkim-signature:arc-authentication-results; bh=/Wk0rsZ/vnOffqiUC1OlPq9Ov96p5Xt4gTGcMY2P1dU=; b=D8EZAmcOUjXcorLz9b5KqV4K0vMWVNKgDBjCxRDu/q1pBrXj6VkNJVuvu/7b+MRpoa ubnv0XcZY144w5qdu1JuLjNXxmBjZf1ccqfATD8MGmJIMbbceVadAE87SrOy8Ymau949 ZnEMNMrvMRuoaExoZKOjzsNckU11J20RdRQRgWQyXNyQEKhQR/11c3F2HWuS8DD+fiG9 Fi8gJ58mL707MXzzynWz0zTO50lAVnNH4zzhaurrMmbv26155JBnURHkD0oxQ7DamCAw U07y7URc3n4+Rmcdb6CxqTBPNtypafo/l9C3Uythz37WArS2vDDmAVDEPGRReRn+4dUY N7tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O/dZ2HKf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 198si7806632pgd.292.2017.11.09.22.40.27; Thu, 09 Nov 2017 22:40:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O/dZ2HKf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755186AbdKJGjt (ORCPT + 83 others); Fri, 10 Nov 2017 01:39:49 -0500 Received: from mail-wr0-f176.google.com ([209.85.128.176]:51561 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751585AbdKJGjq (ORCPT ); Fri, 10 Nov 2017 01:39:46 -0500 Received: by mail-wr0-f176.google.com with SMTP id j15so7672242wre.8 for ; Thu, 09 Nov 2017 22:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/Wk0rsZ/vnOffqiUC1OlPq9Ov96p5Xt4gTGcMY2P1dU=; b=O/dZ2HKfAnQ+2Uia9+UatsMfGUENwFGse7wEASbyKWT0cSLp4yM6snN22fCV51+5s8 21kyRFpyO/wGYMBglL5TV6RaaGOX9Nn9Os79PGBEz8k51TBjWxBi0SSCR7uNK+gWsWce g7MV3C/2XloIAALKnZJxtKBoBt1W8mLEKoc8A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/Wk0rsZ/vnOffqiUC1OlPq9Ov96p5Xt4gTGcMY2P1dU=; b=oFastV86S7xd8K2sXwfnU5zprkkc1TvbL4wtRmPEu7TldO4BdNpVb4gNXROStmLXqt 73xOZMHr8A7yZdh+9RDbx1K+AmTxH38K2ZY7U1hQKT0CVoq2rtmbkAZKsm1u97MEr3cm 58Zg9id3unA9WeKqGaV8kn1k2iW4kXNmGmkj7iwv0LHzfbonDOrpaiSqpZxjkICXtfU9 EjX2I9CKVMtsD3j2L721gd8443jEtIjfI3J/WAHxanWJzqjwXBxsPVF4V/lY8QlO7yxp yPQntS7eOQ4G9cwX6ELS0K+nCCHt1sAl7zwcG6Yap3az8jm/jj8bYaY9vYt1pMJ9zSMO lYRg== X-Gm-Message-State: AJaThX6n2++ctdToyRuDaNiET0HcuC+asn9AgWS1AattqH/mETkZHGnm lOub5qZRuszhJeFjkkfQwkdb+Y1mNFE= X-Received: by 10.223.147.39 with SMTP id 36mr2285985wro.175.1510295985243; Thu, 09 Nov 2017 22:39:45 -0800 (PST) Received: from leoy-linaro (li1530-42.members.linode.com. [139.162.245.42]) by smtp.gmail.com with ESMTPSA id t200sm780268wmd.45.2017.11.09.22.39.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Nov 2017 22:39:44 -0800 (PST) Date: Fri, 10 Nov 2017 14:39:39 +0800 From: Leo Yan To: Andy Whitcroft , Joe Perches , linux-kernel@vger.kernel.org Subject: Re: [PATCH] checkpatch: Fix checks for Kconfig help text Message-ID: <20171110063939.GD2349@leoy-linaro> References: <1510295557-11950-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: <1510295557-11950-1-git-send-email-leo.yan@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 10, 2017 at 02:32:37PM +0800, Leo Yan wrote: > If one patch has Kconfig section with only one 'config', then variable > '$is_start' will be set by first 'config' line and '$is_end' 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: Sorry for the bad commit log, I will send v2 for this. > 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 the Kconfig description has at least one line. > > Signed-off-by: Leo Yan > --- > scripts/checkpatch.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 3453df9..ba724b0 100755 > --- 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); > } > -- > 2.7.4 > From 1583659774662838914@xxx Fri Nov 10 06:34:13 +0000 2017 X-GM-THRID: 1583659774662838914 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread