From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AE9EC4361B for ; Sun, 20 Dec 2020 19:13:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 176AC22DBF for ; Sun, 20 Dec 2020 19:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727395AbgLTTNd (ORCPT ); Sun, 20 Dec 2020 14:13:33 -0500 Received: from smtprelay0082.hostedemail.com ([216.40.44.82]:32852 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726805AbgLTTNc (ORCPT ); Sun, 20 Dec 2020 14:13:32 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 79EF9100E7B45; Sun, 20 Dec 2020 19:12:51 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: dog98_1f031b327451 X-Filterd-Recvd-Size: 2189 Received: from XPS-9350.home (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA; Sun, 20 Dec 2020 19:12:50 +0000 (UTC) Message-ID: <5e7eae6b12df8fefc900930ffc12f80a9bfd643c.camel@perches.com> Subject: Re: [PATCH 2/2] checkpatch: kconfig: add missing types to regex From: Joe Perches To: Nicolai Fischer , linux-kernel@vger.kernel.org Cc: apw@canonical.com, johannes.czekay@fau.de, linux-kernel@i4.cs.fau.de Date: Sun, 20 Dec 2020 11:12:49 -0800 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-12-14 at 11:24 +0100, Nicolai Fischer wrote: > Kconfig parsing does not recognise all type attributes. > This adds the missing 'int', 'sting' and 'hex' types. > > Signed-off-by: Nicolai Fischer > Co-developed-by: Johannes Czekay > Signed-off-by: Johannes Czekay [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -3321,7 +3321,7 @@ sub process { >   next if ($f =~ /^-/); >   last if (!$file && $f =~ /^\@\@/); >   > > - if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) { > + if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|int|hex|string|prompt)\s*["']/) { int and hex uses are not required to be followed either a " or ' For that matter, it's not required for tristate, bool or string Likely this should be ["'$] $ git grep -P -oh '^\s*(?:bool|tristate|int|hex|string|prompt)\b\s*\S?' -- '*/Kconfig*' | \ sed -r -e 's/^\s+//' -e 's/\s+/ /g' | \ sort | uniq -c | sort -rn 8558 tristate " 6314 bool " 2082 bool 843 tristate 308 prompt " 286 int " 106 tristate ' 93 int 84 hex " 66 string " 25 hex 21 bool ' 18 string 5 hex ' 3 string p 2 string ( 1 string ' 1 int. 1 bool # 1 bool