[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e7a7861-197f-e6ae-7a6d-b4e850ab5b09@gmail.com>
Date: Tue, 5 Jan 2021 12:23:08 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Nathan Chancellor <natechancellor@...il.com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: John Crispin <john@...ozen.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
bcm-kernel-feedback-list@...adcom.com, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH] MIPS: Use address-of operator on section symbols
On 1/5/21 12:18 PM, 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 <natechancellor@...il.com>
Acked-by: Florian Fainelli <f.fainelli@...il.com>
--
Florian
Powered by blists - more mailing lists