UPSTREAM: irqchip/tegra: Fix overflow implicit truncation warnings
[ Upstream commit 443685992bda9bb4f8b17fc02c9f6c60e62b1461 ]
Fix -Woverflow warnings for tegra irqchip driver which is a result
of moving arm64 custom MMIO accessor macros to asm-generic function
implementations giving a bonus type-checking now and uncovering these
overflow warnings.
drivers/irqchip/irq-tegra.c: In function ‘tegra_ictlr_suspend’:
drivers/irqchip/irq-tegra.c:151:18: warning: large integer implicitly truncated to unsigned type [-Woverflow]
writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR);
^
Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Sai Prakash Ranjan <quic_saipraka@quicinc.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Cc: Marc Zyngier <maz@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Fixes: de3ce08049
("irqchip: tegra: Add DT-based support for legacy interrupt controller")
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Iaee226d0220c9774635cd51953d577ab7e2ebe77
This commit is contained in:
parent
3d129ea9b5
commit
af8a0d5f2f
@ -148,10 +148,10 @@ static int tegra_ictlr_suspend(void)
|
||||
lic->cop_iep[i] = readl_relaxed(ictlr + ICTLR_COP_IEP_CLASS);
|
||||
|
||||
/* Disable COP interrupts */
|
||||
writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR);
|
||||
writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_COP_IER_CLR);
|
||||
|
||||
/* Disable CPU interrupts */
|
||||
writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR);
|
||||
writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_CPU_IER_CLR);
|
||||
|
||||
/* Enable the wakeup sources of ictlr */
|
||||
writel_relaxed(lic->ictlr_wake_mask[i], ictlr + ICTLR_CPU_IER_SET);
|
||||
@ -172,12 +172,12 @@ static void tegra_ictlr_resume(void)
|
||||
|
||||
writel_relaxed(lic->cpu_iep[i],
|
||||
ictlr + ICTLR_CPU_IEP_CLASS);
|
||||
writel_relaxed(~0ul, ictlr + ICTLR_CPU_IER_CLR);
|
||||
writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_CPU_IER_CLR);
|
||||
writel_relaxed(lic->cpu_ier[i],
|
||||
ictlr + ICTLR_CPU_IER_SET);
|
||||
writel_relaxed(lic->cop_iep[i],
|
||||
ictlr + ICTLR_COP_IEP_CLASS);
|
||||
writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR);
|
||||
writel_relaxed(GENMASK(31, 0), ictlr + ICTLR_COP_IER_CLR);
|
||||
writel_relaxed(lic->cop_ier[i],
|
||||
ictlr + ICTLR_COP_IER_SET);
|
||||
}
|
||||
@ -312,7 +312,7 @@ static int __init tegra_ictlr_init(struct device_node *node,
|
||||
lic->base[i] = base;
|
||||
|
||||
/* Disable all interrupts */
|
||||
writel_relaxed(~0UL, base + ICTLR_CPU_IER_CLR);
|
||||
writel_relaxed(GENMASK(31, 0), base + ICTLR_CPU_IER_CLR);
|
||||
/* All interrupts target IRQ */
|
||||
writel_relaxed(0, base + ICTLR_CPU_IEP_CLASS);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user