Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3680853pxu; Sun, 20 Dec 2020 11:17:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhQTJfVJWghs8F57CSuyR91NRwcRvee9FwDZimRDazwjJLakpJPtvd8igw2USOq+2ElmcB X-Received: by 2002:a17:906:b096:: with SMTP id x22mr12798535ejy.471.1608491878864; Sun, 20 Dec 2020 11:17:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608491878; cv=none; d=google.com; s=arc-20160816; b=gEnIT8BhASvwgsyUZI7L4ATA+NdY0WG/ww/7lHrzUzlMXzeLX8NuDxAVyJezQNp8Lh BuGIlnvUKvY7nNxP044gF6YlEHvcXnRvKyvpR3BvKtsTpp7FUXD5XLMv2VwKS2ycLor5 xEvYca6vp/KVLsPj/cNuHJ3d0Cmw+XF+3x+hx61mfkMTqmFViVijQh4VwoYCLyKyEyws Xaf5wYkQlQz91ff3eWqnQu/n8QjnwdXGbCbGv5Ck/7zfkiW0byWuvASMQIAwQF+LzztI hNq4wwR+/ivl5atrcFPt3yF/E4xbxDg/tizwWmiB9eKe9XUQ15pwitsC25nWX/NCtLvr CMgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=kFuz4DuIFnkQ4wSvlsnxoUGzo7lodP5a2hR1EaFq5Xs=; b=WFvmEIpnsW4rJzo5UBGUBuPYUmPgoMnmq+nPHmzOD8huPvXqx1vfpD6RPs+kKa7OMW gaRuMay7n0Bz1HA6z3XKx+0OdUtR1sjtGvWkEfUq6h9O1MvHINHFZiU/Rk1GDPTmb/UN vQPjjs7/NPHSAwGE3Eai4gooir2P7F2wDm2HKwPjO5ojup5rM03kp8JtAOqhepzd3yvp 5zScxlptt8lTI+aIPoGzlU6aFTUiIf4zFLSYv8eKY/BLCLI/TTP0f0ySLNJlpS9uLMxW ta7UhkWzRMNrl2oD8HTaHzEW118VGUsS6PQwcLhxk95Rtk072Gw7nU/+JPQ3zq/Gwixv KxAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r16si7655986ejz.602.2020.12.20.11.17.34; Sun, 20 Dec 2020 11:17:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727430AbgLTTQz (ORCPT + 99 others); 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-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2197:2198:2199:2200:2393:2559:2562:2828:2908:3138:3139:3140:3141:3142:3352:3622:3653:3865:3867:3868:3871:3874:4321:5007:7903:10004:10400:10848:11232:11658:11914:12043:12297:12740:12895:13069:13311:13357:13439:13894:14181:14659:21080:21221:21627:30054:30069:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none 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.