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 50B7DC433DB for ; Sat, 6 Feb 2021 03:25:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A07B264F9B for ; Sat, 6 Feb 2021 03:25:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A07B264F9B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E5A8F6B0005; Fri, 5 Feb 2021 22:25:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E09DB6B006C; Fri, 5 Feb 2021 22:25:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D204F6B006E; Fri, 5 Feb 2021 22:25:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0153.hostedemail.com [216.40.44.153]) by kanga.kvack.org (Postfix) with ESMTP id BCD7A6B0005 for ; Fri, 5 Feb 2021 22:25:10 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 91DF23634 for ; Sat, 6 Feb 2021 03:25:10 +0000 (UTC) X-FDA: 77786401980.27.front89_280b09d275ea Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 72E363D663 for ; Sat, 6 Feb 2021 03:25:10 +0000 (UTC) X-HE-Tag: front89_280b09d275ea X-Filterd-Recvd-Size: 3511 Received: from smtprelay.hostedemail.com (smtprelay0044.hostedemail.com [216.40.44.44]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Sat, 6 Feb 2021 03:25:09 +0000 (UTC) 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: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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: >=20 > =A0=A0=A0=A0ERROR: space prohibited before that ':' (ctx:WxW) > =A0=A0=A0=A0#258: FILE: include/asm-generic/vmlinux.lds.h:314: > =A0=A0=A0=A0+ .printk_fmts : AT(ADDR(.printk_fmts) - LOAD_OFFSET)= { >=20 > 0: https://lore.kernel.org/patchwork/patch/1375749/ Remember to cc the checkpatch maintainers. > Signed-off-by: Chris Down > Cc: Andrew Morton > --- > =A0scripts/checkpatch.pl | 2 +- > =A01 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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 { > =A0 # A colon needs no spaces before when it is > =A0 # terminating a case value or a label. > =A0 } elsif ($opv eq ':C' || $opv eq ':L') { > - if ($ctx =3D~ /Wx./) { > + if ($ctx =3D~ /Wx./ and $realfile !~ m@.*\.lds\.h$@) { > =A0 if (ERROR("SPACING", > =A0 "space prohibited before that '$op' $at\n" . $hereptr)) { > =A0 $good =3D rtrim($fix_elements[$n]) . trim($fix_elements[$n + = 1]);