[PATCH] riscv: limit sifive errata to CONFIG_64BIT

Paul Walmsley pjw at kernel.org
Fri Sep 18 17:47:37 PDT 2026


On Wed, 16 Sep 2026, Arnd Bergmann wrote:

> From: Arnd Bergmann <arnd at arndb.de>
> 
> 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 at arndb.de>


Thanks, queued for v7.3-rc.


- Paul




More information about the linux-riscv mailing list