Re: [PATCH] riscv: limit sifive errata to CONFIG_64BIT

From: Paul Walmsley

Date: Fri Sep 18 2026 - 20:50:13 EST


On Wed, 16 Sep 2026, Arnd Bergmann wrote:

> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> There are two errata for this vendor, and they both individually depend on
> CONFIG_64BIT already. However, an 32-bit allmodconfig produces this warning
> from clang for a condition that can never be true.
>
> arch/riscv/errata/sifive/errata.c:29:14: error: result of comparison of constant 9223372036854775815 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
> 29 | if (arch_id != 0x8000000000000007 ||
> | ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
> arch/riscv/errata/sifive/errata.c:42:14: error: result of comparison of constant 9223372036854775815 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
> 42 | if (arch_id != 0x8000000000000007 && arch_id != 0x1)
> | ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>


Thanks, queued for v7.3-rc.


- Paul