From patchwork Sat Feb 6 13:08:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Down X-Patchwork-Id: 12072141 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=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 EF16FC433DB for ; Sat, 6 Feb 2021 13:08:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7E0B264EA1 for ; Sat, 6 Feb 2021 13:08:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E0B264EA1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DDA656B006C; Sat, 6 Feb 2021 08:08:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D8B026B006E; Sat, 6 Feb 2021 08:08:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CA02E6B0070; Sat, 6 Feb 2021 08:08:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id B0C8E6B006C for ; Sat, 6 Feb 2021 08:08:49 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 81AA2180AD806 for ; Sat, 6 Feb 2021 13:08:49 +0000 (UTC) X-FDA: 77787872778.20.back55_06062b8275ed Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 61B21180C07A3 for ; Sat, 6 Feb 2021 13:08:49 +0000 (UTC) X-HE-Tag: back55_06062b8275ed X-Filterd-Recvd-Size: 3950 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Sat, 6 Feb 2021 13:08:48 +0000 (UTC) Received: by mail-wr1-f47.google.com with SMTP id m13so10920547wro.12 for ; Sat, 06 Feb 2021 05:08:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=wpbvjbVzWJ8qP7giT80E9ujhBsdt/0hlsyvy2z2DcHU=; b=Gkthy+G68K2CGL5lTek3C/cXIUS67V4nRgFehdukPcZw2DuuD/YncGAlpB66J60AYR 6HyodIOWtci2pj99FM1E9buD/ZZ2dRWjofGOHUUHeu7ARxMiHNryT6HzFzgmuUl48S0D 2OtWz/oiUt/mL75ZXalIStVoNl0fKi5nUybso= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=wpbvjbVzWJ8qP7giT80E9ujhBsdt/0hlsyvy2z2DcHU=; b=KjPc8hmVeGrjPUnjMhSl3TAy29hM0fOhywLAvASLjIlroCbVZoLAq/Em2n6H4XduDm j71hjFkuUHaiA+j1Vu7jfhvWQSVy4jfXPONva44roD9AqNczw+QfTm6eFav7BpqjrVnH gwqJvcyL11U61EeodUUmfuqItzauTz7IsxaspXf7VLCi6wK5v4rblPKRdXpn7Nxe55X6 bRPlHkMFLXh2KUj8K7+23gi94+RyOskzubQ6LrRfZw+yKFHJIAp359mRsLMw4CGiMvcA CxTl/2Pq3xypB35cL0cjgWNxTgKBa217KFFOT9f/v1BkRjvtsxp+TeW1QrxnirhJX4NE ElbA== X-Gm-Message-State: AOAM532eMLJ+n/KZP5ZKyyVaY3+Xt3MwaqOTcwn6p8E7b38kXGncIttt xWXlFz0MmqqqiW0lA4zgCCSGqw== X-Google-Smtp-Source: ABdhPJwOm4H/+mYe8tszmtvvCYK1JpvTNKUO/ZAC6AH2z0zDySVXgrDXTFLbb7PI6ipY24rj6xifwA== X-Received: by 2002:a5d:4b8e:: with SMTP id b14mr9929275wrt.130.1612616927697; Sat, 06 Feb 2021 05:08:47 -0800 (PST) Received: from localhost ([85.255.234.177]) by smtp.gmail.com with ESMTPSA id v1sm11593121wmj.31.2021.02.06.05.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Feb 2021 05:08:47 -0800 (PST) Date: Sat, 6 Feb 2021 13:08:46 +0000 From: Chris Down To: Andrew Morton Cc: Andy Whitcroft , Joe Perches , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: [PATCH RESEND] checkpatch: Don't warn about colon termination in linker scripts Message-ID: MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/2.0.5 (da5e3282) (2021-01-21) 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: 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/ Signed-off-by: Chris Down Cc: Andy Whitcroft Cc: Joe Perches 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]);