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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 69709C433E6 for ; Sat, 6 Feb 2021 04:47:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2436A64EEC for ; Sat, 6 Feb 2021 04:47:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231292AbhBFEpg (ORCPT ); Fri, 5 Feb 2021 23:45:36 -0500 Received: from smtprelay0145.hostedemail.com ([216.40.44.145]:41896 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231617AbhBFD0K (ORCPT ); Fri, 5 Feb 2021 22:26:10 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id B6ECE181D3052; Sat, 6 Feb 2021 03:25:09 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: mark49_3415804275ea X-Filterd-Recvd-Size: 2178 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf09.hostedemail.com (Postfix) with ESMTPA; Sat, 6 Feb 2021 03:25:08 +0000 (UTC) Message-ID: <90cf805f4be6ecf5887fe470af6db2d596dc46a3.camel@perches.com> Subject: Re: [PATCH] checkpatch: Don't warn about colon termination in linker scripts From: Joe Perches To: Chris Down , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Date: Fri, 05 Feb 2021 19:25:06 -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 Thu, 2021-02-04 at 16:32 +0000, Chris Down wrote: > This check erroneously flags cases like the one in my recent printk > enumeration patch[0], where the spaces are syntactic, and `section:' vs. > `section :' is syntactically important: > >     ERROR: space prohibited before that ':' (ctx:WxW) >     #258: FILE: include/asm-generic/vmlinux.lds.h:314: >     + .printk_fmts : AT(ADDR(.printk_fmts) - LOAD_OFFSET) { > > 0: https://lore.kernel.org/patchwork/patch/1375749/ Remember to cc the checkpatch maintainers. > Signed-off-by: Chris Down > Cc: Andrew Morton > --- >  scripts/checkpatch.pl | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 4f8494527139..3bcffc5574ae 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -5046,7 +5046,7 @@ sub process { >   # A colon needs no spaces before when it is >   # terminating a case value or a label. >   } elsif ($opv eq ':C' || $opv eq ':L') { > - if ($ctx =~ /Wx./) { > + if ($ctx =~ /Wx./ and $realfile !~ m@.*\.lds\.h$@) { >   if (ERROR("SPACING", >   "space prohibited before that '$op' $at\n" . $hereptr)) { >   $good = rtrim($fix_elements[$n]) . trim($fix_elements[$n + 1]);