Received: by 10.223.164.202 with SMTP id h10csp1153738wrb; Thu, 9 Nov 2017 22:44:10 -0800 (PST) X-Google-Smtp-Source: ABhQp+T+GG6zSYXmNbnz67Ieet7gcJOf4KseTzt5+kdbd0WwtomP4UgUKi+Fvfxztzsmi9UNatvB X-Received: by 10.99.54.202 with SMTP id d193mr3031287pga.343.1510296250198; Thu, 09 Nov 2017 22:44:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510296250; cv=none; d=google.com; s=arc-20160816; b=Szkr72XDLN9vboPkHD05IAsKNDd33lB+gHD60qV6e8CfFHSCvqJffYJldrjPB3xrHp yi4VMBo9dnAZ7yg7BZQ8T/fODVHoD1NGgC9BGC8NfY9AqOYvek4iO46B/qcO4Xg+4/Ar jS6X8/Rz7DsoA7pWfyg6kcTmtJKXSg1j/ivlhN5c1Wly7swYTxRknIFckXPovk1dgRlp 0ibRYGquH0Od8NrACuC0wgZeo/0nww3vgMWvzvSJjBMSSUnnGXZtprL2s6FLKnUF+XF3 qPsPs4TeX8+XwAfnGPE64UAHgyozS85T8rnv4KeeSi2oEOTC3eD94oDSvQeoDUIJZZmJ EgEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=q2kUU1pA5AmHHaHGTu5DOAdVANr6uhj2JJdIO/HNOsg=; b=FQ963pueHgN8rq6nmJX3yaQtWgKt2pMsm8seHORHqwiIBljbGUoc2m7KAZKu0waZfk hmnN8Xte08jC6y4swAWerBDaIjYgcpa+ZvlKHgwpv7VnN3q5GshKd3mOmT4ta0v+5dMW P1WCGWFxH1BIqR8UmJm8tqozptqPwoz59QGm6Vqa7w5VZL66ez79qrHrhN7mCtt/7Qc0 ifc1Mnx/SkRoPl8mvn3lzgSl6YPuHkuH8fMxZ9EQAecocQ+ofyHC3viWaI6+J9z/oViP bz3pSOdn90XhMLKQq0zMHwAHIGYgqQ98Zdp4dAs/793HF1mRhuQbz6dv2Rnnr9XSp1wi gQJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q3f2maAg; 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 e2si8077914pgn.528.2017.11.09.22.43.58; Thu, 09 Nov 2017 22:44:10 -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=Q3f2maAg; 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 S1755931AbdKJGmw (ORCPT + 83 others); Fri, 10 Nov 2017 01:42:52 -0500 Received: from mail-wr0-f175.google.com ([209.85.128.175]:47189 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755831AbdKJGmt (ORCPT ); Fri, 10 Nov 2017 01:42:49 -0500 Received: by mail-wr0-f175.google.com with SMTP id k61so7687111wrc.4 for ; Thu, 09 Nov 2017 22:42:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=q2kUU1pA5AmHHaHGTu5DOAdVANr6uhj2JJdIO/HNOsg=; b=Q3f2maAgBhro5t+JQmjPB3bugWTdX23rVaTSfoS2JOVrDdaZ8LdZqEB02dx0V5bWAF dO5aEKOXD0V7RIChJRhlpxuEVg4SK8I86QzmtXpeyhMrvZVPpmf5icR28W/ZKdLLGoNe z986JhbbZ7lzwu7LEC4nUZVkwbaDzujLne2lE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=q2kUU1pA5AmHHaHGTu5DOAdVANr6uhj2JJdIO/HNOsg=; b=GbF4I1fl2iJ2fr5YIdaqNWFicLRD8kGQY1eFMUM1mwDhu8k03fsjwZ8PZItSTD2JuW HvHTiSU2gDBxFtrc32awqfGOfQvTqbyBg45Sr0u/Gmie4FXyCTo/GT9Mzia1xq+kDFZc qSky2aucNoQIZHlYnx/LIQqthDboOD4tguoi7ax3A8BvPnL8qos7kRjETnaIn/EuvU5m RfkaRLCddVkFnimqybhZKkfU0w2AXzbd7r1xr5GWX8QoSRtMkpnJ6Hg724oD+n207Tf+ ttifK9AHbLt2troZVSfrjWcWBG34+GlOeEYQrrw4nmXtB6dVfwrAzw1QDzqXWiygUp4a aj7g== X-Gm-Message-State: AJaThX7VmH8BwooPZv3LaYOfHzcw3S2TFSu4c+/nUCsW2jr2vc6+sUiq Zs4BFj8QyLzan5K37lNMl6lnOg== X-Received: by 10.223.128.162 with SMTP id 31mr2492016wrl.258.1510296167773; Thu, 09 Nov 2017 22:42:47 -0800 (PST) Received: from localhost.localdomain (li1530-42.members.linode.com. [139.162.245.42]) by smtp.gmail.com with ESMTPSA id e8sm1243865wmf.46.2017.11.09.22.42.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Nov 2017 22:42:46 -0800 (PST) From: Leo Yan To: Andy Whitcroft , Joe Perches , linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2] checkpatch: Fix checks for Kconfig help text Date: Fri, 10 Nov 2017 14:42:37 +0800 Message-Id: <1510296157-13041-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 1583660180700879673@xxx Fri Nov 10 06:40:40 +0000 2017 X-GM-THRID: 1583659774662838914 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread