irqchip/gic-v3: Fix OF_BAD_ADDR error handling
authorArnd Bergmann <arnd@arndb.de>
Tue, 23 Mar 2021 13:18:35 +0000 (14:18 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 7 Apr 2021 12:25:52 +0000 (13:25 +0100)
commit8e13d96670a4c050d4883e6743a9e9858e5cfe10
treeeadd068ccac1d2660958b1a613f3360267d20808
parente03b7c1bcbfad6f27b4682f638b98627c4e416ba
irqchip/gic-v3: Fix OF_BAD_ADDR error handling

When building with extra warnings enabled, clang points out a
mistake in the error handling:

drivers/irqchip/irq-gic-v3-mbi.c:306:21: error: result of comparison of constant 18446744073709551615 with expression of type 'phys_addr_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
                if (mbi_phys_base == OF_BAD_ADDR) {

Truncate the constant to the same type as the variable it gets compared
to, to shut make the check work and void the warning.

Fixes: 505287525c24 ("irqchip/gic-v3: Add support for Message Based Interrupts as an MSI controller")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210323131842.2773094-1-arnd@kernel.org
drivers/irqchip/irq-gic-v3-mbi.c