Received: by 10.223.164.202 with SMTP id h10csp1146683wrb; Thu, 9 Nov 2017 22:34:13 -0800 (PST) X-Google-Smtp-Source: ABhQp+QOnS0NVvtu2axGWlAik3DJKzeRiuo/yjixd6c8Q7R6o3q6W78ZiE3uVJxTF5oB40WaS7OZ X-Received: by 10.84.129.70 with SMTP id 64mr3100611plb.444.1510295652933; Thu, 09 Nov 2017 22:34:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510295652; cv=none; d=google.com; s=arc-20160816; b=LUYwRKH32TqdGvYiVpw0wDnlW6DInLb21lhuTlsSBYaperTYTP2lUb+VEeBs92pXKw rhQZMNJX70dAMuWG1DZ436a8U4JkfSCtsDYKfoLfhctmE+Wxxm1GxayTESX5eUA++Ojz ZywkUV6l6RjiDeCm7oinfz8cwWH093hh7tTdSNkrEapTb5dx+KcE0ixKEE+8uMYT5jET vyDVUc9PkvcUT9s1r0Su/jsJ3INZzJW/9s3kOXjliIqNgKXRsDKuxcb0JcAlDWso9Oer aKSer80PrJjUo6K5R5SSH0jv1mqvPwLHDD8F/6dtDdGvDkeBfCap9pOBdLnrUQUJSZUE 5iVw== 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=E02uyTCy6//1ESXSROOTXFwx8dIVI9nUUcWpVlgr7Ig=; b=EiEa0ZS+zxhe/4cqiHGjPtCAP57BffhFpkQCms99s1hlJVeQsVz0j2+ky8Ae6jliPp f+RZu22rfq3JPdNbScRjdcnTycSLnQM418HizrCQUrEnhDYIvshWRJV6Tc+JFnI5lbT4 lIQIhxXxRJ8Zf4MoUTcGsaGLu6bMKr7nFvjYtfLrA943o39in7IURSxTsvJizJVmDY0i nqPa/Kg5WQBLeA8vd0g9IaQXKangAcVJYLHz5pNJIAm88LAheMA7Do74BXmUysHsjwDI yy4cD/7y2gMor36kLdDhtCP2M91MQNaGkvSpY5McvBrzB7m5XK7meuQaBudc8V2GT0n6 T55g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bgQoZk/R; 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 z16si8064161pgc.207.2017.11.09.22.34.01; Thu, 09 Nov 2017 22:34:12 -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=bgQoZk/R; 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 S1755186AbdKJGcy (ORCPT + 83 others); Fri, 10 Nov 2017 01:32:54 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:53911 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754868AbdKJGcw (ORCPT ); Fri, 10 Nov 2017 01:32:52 -0500 Received: by mail-wm0-f53.google.com with SMTP id g141so505350wmg.2 for ; Thu, 09 Nov 2017 22:32:52 -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=E02uyTCy6//1ESXSROOTXFwx8dIVI9nUUcWpVlgr7Ig=; b=bgQoZk/Rk/HranKVexjz5l4VJS33VVmfOZrRM54VMhjKmTMh3n+VfevTwm+uu01sdy hHjt7aH+CT7fp/1GY4z34KpRxnV6/qop6Xreh6fxuFBAYFTCXerdOygtYQBLBtZ0jcop I4DgrRCAslqI/hpNt0qDPSfJSq5yUP8wMqlKw= 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=E02uyTCy6//1ESXSROOTXFwx8dIVI9nUUcWpVlgr7Ig=; b=OT7Hq3QBXGoYBQyeQ7+T/E6dc3d5mp8SfV/2z3cuq+yV4GsXpBaKmu2+SO9BB90WOi YcoLm2IhbEd19ERwNs+Mx2/SX/whFrPKQR8IklnOePDbh/EBVON53jk2ajY5JPK467yk 2ZNr7drNsxoGgz7bgRzxNH9e0LgAtNYOwpiP2erNqDJkvCpWsWXB/N/c85XBY17bPxPe LdmtxVbsYDuwwGA05vS6ZGHBA9g+zWYKl4leVz4KHoksip+LjrrFjK2aRQ3RHxx03A+Y UtG7btTnlW0vnrMiD/ODdtNq8T+qGBU+W5F0DiksdJaxnhoAMg7lV+Pz5i5vbbDKPdKS S4RQ== X-Gm-Message-State: AJaThX5ykT3FKcFUYbvMB3IWKaO4xCs9kwF45XoBh+HhydcsPaGFzhzh FHqWTdPKo9ptNGH2ykVHzTm8Ew== X-Received: by 10.28.239.12 with SMTP id n12mr226517wmh.140.1510295571837; Thu, 09 Nov 2017 22:32:51 -0800 (PST) Received: from localhost.localdomain (li1530-42.members.linode.com. [139.162.245.42]) by smtp.gmail.com with ESMTPSA id t189sm385229wmf.43.2017.11.09.22.32.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Nov 2017 22:32:50 -0800 (PST) From: Leo Yan To: Andy Whitcroft , Joe Perches , linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH] checkpatch: Fix checks for Kconfig help text Date: Fri, 10 Nov 2017 14:32:37 +0800 Message-Id: <1510295557-11950-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 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: 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 1584733636869822749@xxx Wed Nov 22 03:02:47 +0000 2017 X-GM-THRID: 1584731950691315687 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread