diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2025-08-06 16:53:18 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-08-20 18:41:43 +0200 |
commit | 54733617c19f87971126da5284634a8b6d1d39d0 (patch) | |
tree | 6eddef96345ea72fe8c9e05806a28468c118cb14 | |
parent | 335cd42062be5d141672dc9ce940250ac7508f78 (diff) |
irqchip/mvebu-gicp: Use resource_size() for ioremap()
commit 9f7488f24c7571d349d938061e0ede7a39b65d6b upstream.
0-day reported an off by one in the ioremap() sizing:
drivers/irqchip/irq-mvebu-gicp.c:240:45-48: WARNING:
Suspicious code. resource_size is maybe missing with gicp -> res
Convert it to resource_size(), which does the right thing.
Fixes: 3c3d7dbab2c7 ("irqchip/mvebu-gicp: Clear pending interrupts on init")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Closes: https://lore.kernel.org/oe-kbuild-all/202508062150.mtFQMTXc-lkp@intel.com/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/irqchip/irq-mvebu-gicp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-mvebu-gicp.c b/drivers/irqchip/irq-mvebu-gicp.c index fd85c845e015..54833717f8a7 100644 --- a/drivers/irqchip/irq-mvebu-gicp.c +++ b/drivers/irqchip/irq-mvebu-gicp.c @@ -237,7 +237,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev) return -ENODEV; } - base = ioremap(gicp->res->start, gicp->res->end - gicp->res->start); + base = ioremap(gicp->res->start, resource_size(gicp->res)); if (IS_ERR(base)) { dev_err(&pdev->dev, "ioremap() failed. Unable to clear pending interrupts.\n"); } else { |