From patchwork Fri Feb 16 20:22:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Magnusson X-Patchwork-Id: 10225603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AE5F1602CB for ; Fri, 16 Feb 2018 20:23:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E88B295DA for ; Fri, 16 Feb 2018 20:23:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 933B8295DD; Fri, 16 Feb 2018 20:23:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DC75295DA for ; Fri, 16 Feb 2018 20:23:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750913AbeBPUXj (ORCPT ); Fri, 16 Feb 2018 15:23:39 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:40503 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864AbeBPUXe (ORCPT ); Fri, 16 Feb 2018 15:23:34 -0500 Received: by mail-lf0-f68.google.com with SMTP id 37so5631835lfs.7; Fri, 16 Feb 2018 12:23:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9LlY0UGiv8RiZHASCxui/zQ/DMfINcct9q25qkBKRSc=; b=S+DuDZPr2CPFCW6nAfGsq/c6aHbnrBbxh4Xzzxsp+5c9ZjYTW5hitneGC1XYii0yN0 iPwNDm9Ji5hmZ71GhuCuNcRULmP4GJvaCl16Jfo13To+um9HPEAAv530uZpjbvY7qqRq 96yIEHupR0h68FQin7LaGKA3ufVeV2uepZJrsFKxGinDkx3u9PaNTc6H3qspQaM76MZo 4ds63KcifgHz7llMf1LDkvjZWt9Dyf//tWKURlSrSVATxT7ftZzqquj/UkS/5BPdA1Dl 6+7GdreTgVrSXLWQMJk5z+yalfiYyPfGrEu4r0Vik1dWpUPXlMICovS0QSIdmhkUJjHJ 8b6w== 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:in-reply-to :references; bh=9LlY0UGiv8RiZHASCxui/zQ/DMfINcct9q25qkBKRSc=; b=adZ/tWXZZRnDNWYMaHU9bAYYEs4bBd+80DAvlBce++Fli9vfLSyQhXdvaqhoq1ag8Y 2TuxSWCp8Zi4ER3YiBCqKxAHs/anR1kD2Bfd2aIeOYl4igypTwL0fVOKvLdTt3xg3JAB sc4e4NRaUxeMvNYef8zutePmlupusOi3aLfHldO50e0IqrOjilktZUlei/vulI7XySHO pOPaqK97RL5oapB0NivcxAGjDWsOlv++MHwd6FDEl8WDO8m+08/MV58fl+cpgA+7diSc 8xsPRpY1QJFoYTl3GwNF+1wc525gJDutYZf2GXoW9RJ242TSrSOVFZOKFp2Iun94ZG/G 0LAQ== X-Gm-Message-State: APf1xPA/Rf/MJbFtqOqu152EkT8WMnZbPq5LxvNpVQaIh3pXW5Ps0QMR ZWNHsDopLdqH83T+xK61Ewc= X-Google-Smtp-Source: AH8x224YSGC1ShDb4Zx/J/7MO8FSwIiNe/Ln1YAUHbAUb1hjCCORfaTzEtEJOfV2c1pnTA+F2gdUAA== X-Received: by 10.25.43.136 with SMTP id r130mr5148599lfr.48.1518812612569; Fri, 16 Feb 2018 12:23:32 -0800 (PST) Received: from huvuddator.lan (ua-213-113-106-221.cust.bredbandsbolaget.se. [213.113.106.221]) by smtp.gmail.com with ESMTPSA id y7sm1652539ljd.45.2018.02.16.12.23.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Feb 2018 12:23:31 -0800 (PST) From: Ulf Magnusson To: apw@canonical.com, joe@perches.com Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Ulf Magnusson Subject: [PATCH 3/3] checkpatch: kconfig: prefer 'help' over '---help---' Date: Fri, 16 Feb 2018 21:22:55 +0100 Message-Id: <20180216202255.25307-4-ulfalizer@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180216202255.25307-1-ulfalizer@gmail.com> References: <20180216202255.25307-1-ulfalizer@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP IMO, we should discourage '---help---' for new help texts, even in cases where it would be consistent with other help texts in the file. This will help if we ever want to get rid of '---help---' in the future. Also simplify the code to only check for exactly '---help---'. Since commit c2264564df3d ("kconfig: warn of unhandled characters in Kconfig commands"), '---help---' is a proper keyword and can only appear in that form. Prior to that commit, '---help---' working was more of a syntactic quirk. Signed-off-by: Ulf Magnusson --- scripts/checkpatch.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 54b782fab4fd..2784f6ab309f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2817,7 +2817,11 @@ sub process { if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) { $is_start = 1; - } elsif ($lines[$ln - 1] =~ /^\+\s*(?:---)?help(?:---)?$/) { + } elsif ($lines[$ln - 1] =~ /^\+\s*(?:help|---help---)\s*$/) { + if ($lines[$ln - 1] =~ "---help---") { + WARN("CONFIG_DESCRIPTION", + "prefer 'help' over '---help---' for new help texts\n" . $herecurr); + } $length = -1; }