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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 40354C433E0 for ; Fri, 25 Dec 2020 17:43:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E2DF20897 for ; Fri, 25 Dec 2020 17:43:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726445AbgLYRm4 (ORCPT ); Fri, 25 Dec 2020 12:42:56 -0500 Received: from smtprelay0120.hostedemail.com ([216.40.44.120]:34404 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725953AbgLYRm4 (ORCPT ); Fri, 25 Dec 2020 12:42:56 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id C2F9A180A7FD6; Fri, 25 Dec 2020 17:42:14 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: place81_01065612747b X-Filterd-Recvd-Size: 2117 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA; Fri, 25 Dec 2020 17:42:13 +0000 (UTC) Message-ID: <9ece49fa7b0025d1d639859082f0408bbe5f4f49.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, akpm@linux-foundation.org Date: Fri, 25 Dec 2020 09:42:12 -0800 In-Reply-To: <4899798f-46b9-32ee-4d1e-ab2b5833da08@fau.de> References: <1f3b50a6f343dd252c043b2e5b7d47bca8514ee7.camel@perches.com> <5d7cef4f-071d-0504-74df-bd944a11dd70@fau.de> <4899798f-46b9-32ee-4d1e-ab2b5833da08@fau.de> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-12-25 at 18:27 +0100, Nicolai Fischer wrote: > On 12/21/20 6:17 PM, Joe Perches wrote: [] > > The message you used: > > + WARN("CONFIG_DESCRIPTION", > > + "help text is not indented 2 spaces more than the help keyword\n" . $herecurr); > > > > is IMO a bit oddly phrased and could/should test only > > the first line after the help keyword and show the help > > line using $hereprev. > > > > The problem with $herecurr is, that it always contains the first line of the Kconfig option. > The loop which actually determines if the warning is to be displayed, leaves $herecurr and likewise $hereprev unaffected. > > So printing $hereprev would unfortunately not be any more helpful than $herecurr. > Because $herecurr and $hereprev also contain the line number, among other things, I am not sure what would be the best way > to address this. There is a mechanism to create an output message block: get_stat_real that could be used.