Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp432031pxu; Thu, 7 Jan 2021 08:31:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqmPcR1USomcdtEGHcPSLlURF4v1rvcY+Xy9oy0elf7oAeiRV3CR4rUusj7JPrGNVAgR1F X-Received: by 2002:a17:906:90d6:: with SMTP id v22mr6999857ejw.88.1610037115819; Thu, 07 Jan 2021 08:31:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610037115; cv=none; d=google.com; s=arc-20160816; b=dlHyynPSRbRwdQgyGBr44k3jja+5t2UIsNqkSs4Ufzbe/JCDMWJ9s47CoOTcjDUYp/ u3FgoBPYL0sPDBZC0AGaA0SaO/2yOT12zcJKegnqMa8Q6eOs5SigVWVgIJLd56iRn1rK p9NOF113rHxGy1ZrTl96TtiWL+otMA13rnzKnICfJp01FaydwsssNmtUFfWizqCGZqLK +Y9cQKcNYhmoO0FZli1Q4zNbiHF+RfPLgFeFPgVDf+9bzu+pdUdHq34C9YV/Rrn1DHSQ cUYULCBrfbiopbdeV4RoP8ujBt12/Xk3asMKlXxFoKLad+MItWx45LRQsZ8jSVtfpwuu objQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=n6y0zgDDEAY8n0dahtb+m1cFcPMDcfwpEkBr85S6X5g=; b=OXud01uP66M7cK+xbKUFyMY3zwHxjhRULmV9t0PnZDAxEtII0kHv9BEM0K1nGrOG8a qcP2jvMpBOqLe5rVg5MPxj3bLqyI/Eeok7ypS1nGm2FcuMVZet0b5r3A/C30JxOfEDiP sjZbZ/3smfh43MLz46yy8inmTWh/FlMy0yMoESfmXr4s2In1LYJ8dcJhZzcLEBIdpRmb BziWX+BIRuM048AwPRTtUKr7zSMw8PmAVbdkzqJSFuHuv8KpAcfKzGnUS5Eth4sLAx1n C7xt8snl4sM5Fyv9ZYCNgLxjfd8Oav9KFpCuuhUfLTByaOUlBUe9A4SfCOYwnXvX2F/Q eyDg== 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 x17si2584409edq.298.2021.01.07.08.31.32; Thu, 07 Jan 2021 08:31:55 -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 S1728826AbhAGQ3r (ORCPT + 99 others); Thu, 7 Jan 2021 11:29:47 -0500 Received: from elvis.franken.de ([193.175.24.41]:34735 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbhAGQ3q (ORCPT ); Thu, 7 Jan 2021 11:29:46 -0500 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1kxY9o-0000Mi-02; Thu, 07 Jan 2021 17:29:04 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 4A2ECC080E; Thu, 7 Jan 2021 17:26:58 +0100 (CET) Date: Thu, 7 Jan 2021 17:26:58 +0100 From: Thomas Bogendoerfer To: Nathan Chancellor Cc: Florian Fainelli , John Crispin , Nick Desaulniers , bcm-kernel-feedback-list@broadcom.com, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] MIPS: Use address-of operator on section symbols Message-ID: <20210107162658.GC11882@alpha.franken.de> References: <20210105201827.51766-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210105201827.51766-1-natechancellor@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 05, 2021 at 01:18:27PM -0700, Nathan Chancellor wrote: > When building xway_defconfig with clang: > > arch/mips/lantiq/prom.c:82:23: error: array comparison always evaluates > to true [-Werror,-Wtautological-compare] > else if (__dtb_start != __dtb_end) > ^ > 1 error generated. > > These are not true arrays, they are linker defined symbols, which are > just addresses. Using the address of operator silences the warning > and does not change the resulting assembly with either clang/ld.lld > or gcc/ld (tested with diff + objdump -Dr). Do the same thing across > the entire MIPS subsystem to ensure there are no more warnings around > this type of comparison. > > Link: https://github.com/ClangBuiltLinux/linux/issues/1232 > Signed-off-by: Nathan Chancellor > --- > arch/mips/bmips/setup.c | 2 +- > arch/mips/lantiq/prom.c | 2 +- > arch/mips/pic32/pic32mzda/init.c | 2 +- > arch/mips/ralink/of.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]