irqchip/gic-v3: Fix OF_BAD_ADDR error handling
stable inclusion from stable-5.10.37 commit 16ed454e10a8eaa0616a1fbfe8830633c4169855 bugzilla: 51868 CVE: NA -------------------------------- [ Upstream commit 8e13d966 ] 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: 50528752 ("irqchip/gic-v3: Add support for Message Based Interrupts as an MSI controller") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NMarc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210323131842.2773094-1-arnd@kernel.orgSigned-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录