Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4225871pxu; Mon, 21 Dec 2020 07:16:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3H+eIBoSsds9Q8dXOjXo6Ge+mVLihx3ze5i7OQBN1iBqRA89JBpGn0b9E1ERQPLuTbt9p X-Received: by 2002:a17:906:d1cb:: with SMTP id bs11mr1583181ejb.535.1608563766311; Mon, 21 Dec 2020 07:16:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608563766; cv=none; d=google.com; s=arc-20160816; b=ZjJpGkkG+RaeAw421mEsFcX4Lr+FZ+EJRDjo1KEJ64UYqtAz58+WcW4JxYVRrff4dT 00JDXMfJOcvAMNIoDWDugAS5C8Pr13Ruz/KkWhDsBuh599LRxzYVnHfDr/jvfocHDFy2 +IfsfkB/pF2M4m+jl0LB4lHQ77B2H/X1yMCdg7FrpeTt1HLx3ACuhnHs1UoZl58iALkI rs9LClvCOkiphSpEUm/IxAjWVaEy8D6jJhNr1xq2Q4Ya7ZlWAeInfoylOrlDsStXgAQf aTCHyHj0BoYBUUA77+niN+8vm2/XDUomgLPJdH8I6awauESGd0A9omfhOqTW/ljHtYKj ExYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:cc :references:to:subject:dkim-signature; bh=NO8bxZJI9FL1Tju/F91axWwmFgX4azH6VlIEJLJCUSs=; b=0JpjbPFTc6uQW22htNEor4PAW4zknFF1dBngRXzhzTUPL07dB42GNMIS+hsGbAqkHU l3mh7mAWSNhk3rkDfSwbvBeXmgXtGJUnLIyzdy2ee8CrCjI2LwdptJFxZvNuL6f13cZ7 bRxl6lweBo6LpUhq/Tz++n1iZlxPGZ7gqPqWlb2rMztW64VZ5gWDwt18jYAFiaRpJVxB pT+W3DAowEJwzZpb5+nEpCm6fuqkxRcBY/w/REJwcLa9RBxVTzDvvm4g12oW0M6OVqfJ u1h9yILUZbk3ZZ7KG8fzHrQNn/qSyr1YntTACslWvEek1ugUniL20zW4GDzJZlCVpbu6 PWiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fau.de header.s=fau-2013 header.b=LpGsOMp7; 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 a10si10554916edb.130.2020.12.21.07.15.42; Mon, 21 Dec 2020 07:16:06 -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; dkim=pass header.i=@fau.de header.s=fau-2013 header.b=LpGsOMp7; 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 S1725791AbgLUPOq (ORCPT + 99 others); Mon, 21 Dec 2020 10:14:46 -0500 Received: from mx-rz-3.rrze.uni-erlangen.de ([131.188.11.22]:59117 "EHLO mx-rz-3.rrze.uni-erlangen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725777AbgLUPOq (ORCPT ); Mon, 21 Dec 2020 10:14:46 -0500 X-Greylist: delayed 351 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Dec 2020 10:14:45 EST Received: from mx-rz-smart.rrze.uni-erlangen.de (mx-rz-smart.rrze.uni-erlangen.de [IPv6:2001:638:a000:1025::1e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mx-rz-3.rrze.uni-erlangen.de (Postfix) with ESMTPS id 4D02sV09Yzz1yGl; Mon, 21 Dec 2020 16:08:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fau.de; s=fau-2013; t=1608563294; bh=NO8bxZJI9FL1Tju/F91axWwmFgX4azH6VlIEJLJCUSs=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:To:CC: Subject; b=LpGsOMp7EFcwO165I2jyahkUhlP0NzbwZqevYIHs1ozPDD8f1tZEddUkShLw45DpK 3m21f+DMFzod6z+EEE30E9zmRbTGiEalQoFs8NIQQs/O8sGZJY8LpX/pl0RAi+CMXu 5Ckx+hUEK0ULSCfgUfhtbXf/UYj08OsOTcuEQtcUFKw45pgXNuzUiKMhOm/CR9On/u uIug+KF/xY6UuGl0F36oV7EZepXdapCYWRqSYVnsn17RZ0QLqNYiDS8+fpwZ4eZr3U h2aI8WFLInfM9mmZSnApzct2cmka/LgMzxsJQ1O0gCeQAV8dyAs4JRhZ5LKsjLUu3z GXsggQYqaXUig== X-Virus-Scanned: amavisd-new at boeck4.rrze.uni-erlangen.de (RRZE) X-RRZE-Flag: Not-Spam X-RRZE-Submit-IP: 172.17.10.69 Received: from [10.21.2.135] (rat69.ratnet.stw.uni-erlangen.de [172.17.10.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: U2FsdGVkX1/irtnTP4xTg1MiW7/pknjO52QovIuGZbs=) by smtp-auth.uni-erlangen.de (Postfix) with ESMTPSA id 4D02sR53bVz1xs2; Mon, 21 Dec 2020 16:08:11 +0100 (CET) Subject: Re: [PATCH 2/2] checkpatch: kconfig: add missing types to regex To: Joe Perches , linux-kernel@vger.kernel.org References: <1f3b50a6f343dd252c043b2e5b7d47bca8514ee7.camel@perches.com> Cc: apw@canonical.com, johannes.czekay@fau.de, linux-kernel@i4.cs.fau.de From: Nicolai Fischer Message-ID: <5d7cef4f-071d-0504-74df-bd944a11dd70@fau.de> Date: Mon, 21 Dec 2020 16:08:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <1f3b50a6f343dd252c043b2e5b7d47bca8514ee7.camel@perches.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2020-12-20 at 20:16 +0100, Joe Perches wrote: > 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. > > In case the indent does not match, should we display a new warning as in our previous patch? On Tue, 2020-12-08 at 14:35 +0100, Nicolai Fischer wrote> + WARN("CONFIG_DESCRIPTION", > + "help text is not indented 2 spaces more than the help keyword\n" . $herecurr);