Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2476514pxb; Fri, 5 Feb 2021 20:46:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzR25qwqKFuFjqqHWJdqXZXgJzBraYvMCnhf6CVXJBLQsMRnetZi1fBkJX1WbgaP0wP6Y/B X-Received: by 2002:aa7:c647:: with SMTP id z7mr6793450edr.177.1612586778169; Fri, 05 Feb 2021 20:46:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612586778; cv=none; d=google.com; s=arc-20160816; b=vLqcZ2efnKuGtpS1cmcgmAQ6OpBmq2byJGo8y+GCVB6wMq9bR944eb8e7LC1RtN9Fx HpmQH49BAG7sS9FeZ/o5lF2m+OYEN8HWU7qMu/SctmLqk0GM/dfuIeEjdaIao0Tbk7eN pdoOfNfQd5bQh+Z+Wmd7fOnxpeIoSHn4mIVqsOmiO4kgGvAInxImZdyIy0yqobjUSquO O2FI7ntf7AhhHTpn5/50Zid3n8v8PCdbmkSlc0jkkIYdowk/UpqiYCKGQcLvFX8nXwh7 HXuB9X91h6QjZXNnTlfuehlm3zbC5yck2l12AX/Djpogw+BzXab054v1wu6W2kPGCgNl XthA== 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=8T/qoKmVYeEYgs5j1zwI3XBMlOnL1yVFnQ9wHh1JXPw=; b=1E6igIdMS5eXxo4c1PYz63T1m0PSswTgMuQy40ScxMIhb+iOYUlJr7ZcQvliWRD0uV 0i9o06vyh17ov5xnQvbMi6hGg4GPwFdl//MLhl/y+IzzOtRsVUqJpALluYohmYGDJ9zb X2Vz+31HCJCqvNrJLtwIP3Q+4oKHt7JH5rIfKfo0Y9oS8yX1AwM6cZ3i1+XU32pJXuLg /xELFVAEpPvpfjpLtUGgBYGjkebbRT8EXn7OI0mwkFSslG8D+G84ZSCvF+TqW4fB5Odl Zh+OWsdGRSggG2zinaASQe0iWTNIHTb5A15Az9Xwewu+HMY2eICBA8+sXyJ88uBXhimd 0umA== 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 q26si5695106ejn.226.2021.02.05.20.45.52; Fri, 05 Feb 2021 20:46:18 -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 S231307AbhBFEpK (ORCPT + 99 others); Fri, 5 Feb 2021 23:45:10 -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-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:800:960:967:973:982:988:989:1260:1261:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2525:2560:2563:2682:2685:2828:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3622:3653:3865:3867:3868:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:5007:6119:7652:7875:7903:9025:10004:10400:10848:11232:11658:11783:11914:12043:12297:12555:12740:12895:12986:13069:13311:13357:13439:13894:14181:14659:14721:21080:21451:21611:21627:21740:21972:21990:30054:30070: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: 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]);