From patchwork Sat Nov 18 08:48:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 119242 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1495079qgn; Sat, 18 Nov 2017 00:48:26 -0800 (PST) X-Google-Smtp-Source: AGs4zMZiI48gFQMfWxPV8jFP566vasSo0ZWhpR6Q2x9nftxUATw3OoXB0S1Drbd2f+Tx9jRGnqZe X-Received: by 10.98.245.68 with SMTP id n65mr4786339pfh.113.1510994906100; Sat, 18 Nov 2017 00:48:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510994906; cv=none; d=google.com; s=arc-20160816; b=HHszuZw1NfiDFqHlYe8ksnwOAjQRp876YwtgefnpMoDVrEKTybJNxPgCD5KZGEv6Zx 7fIKta10B0AycqEHexAdOKBHwpXTGqNpCPAIMw5daw6w51+tKnvDCGMx+Hz1+d2Xnphx +5Hzr1F/by3XDSEchKVCtpbwo44MskzMDwQU+0e4BqZ8boUvhb50dgPiDeAqrIROgS5W EPvPDdSoTcKGTkyW/jgpRbL5Mcp81fS6C1K0g/qwqktC6Sch7zGURBMbpyT/Jjo/AJuF c4iuXAxuGlKCqfc6kJqWYLfrJf8sBSugkNhcxHyXAYeYoJDwKp52t7J/khHCns/MhoC5 lBoQ== 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=YtX/KZvbZ0ryVAylg+3i3Ge/pw0Ysy0EKqAu+U1J58c=; b=vFI5Swmp+ESSfPbHKujEQhRpPPG3VN5FQ2WrAGQ6TER6OG+LIsVPbBMR//9Pjqk7Uc 0zJZn5vwXeLHRFkV5EcF5KGf/Gx3j0IQTKiBDZpih0NSwlTo0gmi8D1Jqr8HrmVbZzj4 zN3ly5ANEGeGhSGEoeQsKFfUz/xaWQpa00MgU004J8pqb0/Wjh84yMprXzgrUG3CYQBx 5Y5QI2W+vZBlGhMkTG/DDxTgPUvcWee8uSV1DMJBufYtqaDHYiPQzUwGpCqdS8PY9tH6 5qFKbD3KbyXyIpmM+sYNNq242uw+Afi+EG3g2tSnbgB+igbJMG5xCu5MXfItGPFsUWb1 10Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jKDdax2C; 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 d127si4171989pgc.372.2017.11.18.00.48.25; Sat, 18 Nov 2017 00:48:26 -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=jKDdax2C; 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 S1947052AbdKRIsX (ORCPT + 28 others); Sat, 18 Nov 2017 03:48:23 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:40682 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1947037AbdKRIsP (ORCPT ); Sat, 18 Nov 2017 03:48:15 -0500 Received: by mail-wm0-f53.google.com with SMTP id b189so10229189wmd.5 for ; Sat, 18 Nov 2017 00:48:14 -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=YtX/KZvbZ0ryVAylg+3i3Ge/pw0Ysy0EKqAu+U1J58c=; b=jKDdax2C6Fpc39nsAF1UMC6a4gKuKnAhGEEJ0GHPwujcdouTbnQUG5gfpZxn/3yMv5 x+3Dx+XvRJeWk1OgRfDQpcYzSDgsexi1EAd+skFozoVqqgmHpHLVeu9xs6ngw7z9Bm2x 7hPR5FNEKXaOhYQrFWRvyyXjTRnm5yCe9l1f4= 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=YtX/KZvbZ0ryVAylg+3i3Ge/pw0Ysy0EKqAu+U1J58c=; b=d98/rx1cetcOs8g1MFgh/NknalhhyTo6w5y/UfpSdtkOmk5Smk5JrTc/mFBnEp+cY3 LoR9q9fHzLRI9OxvNF3D/b2+mhFTmGLAevPhJKKMAZ2axp1zvgSxLC9TiI3JFdmTxIXV NqH5Oos3Q4igjyVpSVb+fN96GXpJf1SKyeAqqk2rDp6rGgH0SlI9MuCep2vY2pfesgw5 yO5NufQnZ6imJ8emEYc9L84jsAuE5Z3NCNrYuEBYtZSBLf6rBWQIbjekxexcQ7numPUA o23USuKXim4OtePsbKqL6cEA+hYAzF9dIcP7r4KtyDtu0F1bdkh3hc+6vTmv1+fVY1SH TUzQ== X-Gm-Message-State: AJaThX6qhOp1PwkuTRtsUc1WR6ncpXM8nWUb8qsEkRJaRe3y1+3IgPo9 RkxVCzUFhbH2qftNc0w5pore4gT2nbs= X-Received: by 10.28.156.67 with SMTP id f64mr5659386wme.42.1510994893960; Sat, 18 Nov 2017 00:48:13 -0800 (PST) Received: from localhost.localdomain (li1530-42.members.linode.com. [139.162.245.42]) by smtp.gmail.com with ESMTPSA id e71sm8721390wma.13.2017.11.18.00.48.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Nov 2017 00:48:12 -0800 (PST) From: Leo Yan To: Andy Whitcroft , Joe Perches , linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v3] checkpatch: Fix checks for Kconfig help text Date: Sat, 18 Nov 2017 16:48:01 +0800 Message-Id: <1510994881-9634-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 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. Signed-off-by: Leo Yan --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 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); }