Re: [PATCH 1/2] mm, cma: fix 32-bit warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24 Feb 2025, at 9:07, Arnd Bergmann wrote:

> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> clang warns about certain always-true conditions, like this one on 32-bit
> builds:
>
> mm/cma.c:420:13: error: result of comparison of constant 4294967296 with expression of type 'phys_addr_t' (aka 'unsigned int') is always true [-Werror,-Wtautological-constant-out-of-range-compare]
>   420 |                 if (start < SZ_4G)
>       |                     ~~~~~ ^ ~~~~~
>
> Replace this one with an equivalent expression that does not cause a warning.
>
> Fixes: 4765deffa0f7 ("mm, cma: support multiple contiguous ranges, if requested")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
>  mm/cma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

LGTM. Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>

Best Regards,
Yan, Zi





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux