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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 F030DC4361B for ; Sun, 20 Dec 2020 19:17:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B6A3F22DBF for ; Sun, 20 Dec 2020 19:17:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727798AbgLTTQz (ORCPT ); Sun, 20 Dec 2020 14:16:55 -0500 Received: from smtprelay0137.hostedemail.com ([216.40.44.137]:34130 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727408AbgLTTQz (ORCPT ); Sun, 20 Dec 2020 14:16:55 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id 1C68E18029210; Sun, 20 Dec 2020 19:16:14 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: lunch52_2d0523b27451 X-Filterd-Recvd-Size: 1748 Received: from XPS-9350.home (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf16.hostedemail.com (Postfix) with ESMTPA; Sun, 20 Dec 2020 19:16:12 +0000 (UTC) Message-ID: <1f3b50a6f343dd252c043b2e5b7d47bca8514ee7.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:16:11 -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. [] > 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*["']/) { >   $is_start = 1; >   } elsif ($lines[$ln - 1] =~ /^\+\s*help$/) { >   $length = -1; Another thing that could be done is to enforce the "extra 2 spaces" indent by capturing the whitespace before the help keyword: } elsif ($lines[$ln - 1] =~ /^\+\s*help$/) { could be } elsif ($lines[$ln - 1] =~ /^\+(\s*)help\s*$/) { with $1 used to validate the extra indent.