linux-stable/arch/arm/mach-keystone
Arnd Bergmann 0ed4b744b3 ARM: keystone: fix integer overflow warning
[ Upstream commit 844b85dda2 ]

clang warns about an impossible condition when building with 32-bit
phys_addr_t:

arch/arm/mach-keystone/keystone.c:79:16: error: result of comparison of constant 51539607551 with expression of type 'phys_addr_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
            mem_end   > KEYSTONE_HIGH_PHYS_END) {
            ~~~~~~~   ^ ~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-keystone/keystone.c:78:16: error: result of comparison of constant 34359738368 with expression of type 'phys_addr_t' (aka 'unsigned int') is always true [-Werror,-Wtautological-constant-out-of-range-compare]
        if (mem_start < KEYSTONE_HIGH_PHYS_START ||
            ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Change the temporary variable to a fixed-size u64 to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Link: https://lore.kernel.org/r/20210323131814.2751750-1-arnd@kernel.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-28 12:08:40 +02:00
..
Kconfig soc: ti: Add ti_sci_pm_domains driver 2017-04-04 08:59:27 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
keystone.c ARM: keystone: fix integer overflow warning 2021-04-28 12:08:40 +02:00
keystone.h ARM: use const and __initconst for smp_operations 2015-12-01 22:17:45 +01:00
memory.h ARM: keystone: Switch over to coherent memory address space 2014-05-08 15:43:33 -04:00
platsmp.c ARM: use const and __initconst for smp_operations 2015-12-01 22:17:45 +01:00
pm_domain.c ARM: keystone: fix platform_domain_notifier array overrun 2018-06-21 04:02:59 +09:00
smc.S ARM: keystone: Drop the un-necessary dsb from keystone_cpu_smc() 2013-08-05 13:22:09 -04:00