Commit 9f7488f2 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

irqchip/mvebu-gicp: Use resource_size() for ioremap()



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: 3c3d7dba ("irqchip/mvebu-gicp: Clear pending interrupts on init")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Closes: https://lore.kernel.org/oe-kbuild-all/202508062150.mtFQMTXc-lkp@intel.com/
parent 3b6a18f0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 {