Skip to contentSkip to conversation

irq-imgpdc: Use resource_size function on resource object

PATCH New Vasyl Gomonovych 2 participants 3 messages Nov 20, 2017 – Nov 23, 2017 irqchip drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irq-imgpdc: Use resource_size function on resource object

drivers/irqchip/irq-imgpdc.c:327:20-23: WARNING: Suspicious code. resource_size is maybe missing with res_regs

Generated by: scripts/coccinelle/api/resource_size.cocci

---
 drivers/irqchip/irq-imgpdc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-imgpdc.c +1 -1
index 1f59998e03f8..e80263e16c4c 100644
@@ -325,7 +325,7 @@ static int pdc_intc_probe(struct platform_device *pdev)
 
 	/* Ioremap the registers */
 	priv->pdc_base = devm_ioremap(&pdev->dev, res_regs->start,
-				      res_regs->end - res_regs->start);
+				      resource_size(res_regs));
 	if (!priv->pdc_base)
 		return -EIO;
 
Signature · 1 line
1.9.1
#1 lore raw

[tip:irq/urgent] irqchoip/imgpdc: Use resource_size function on resource object

irqchoip/imgpdc: Use resource_size function on resource object
Commit-ID:  a994988d73db142fbe842ce08bbda62b12456577
Gitweb:     https://git.kernel.org/tip/a994988d73db142fbe842ce08bbda62b12456577
Author:     Vasyl Gomonovych <[email protected]>
AuthorDate: Mon, 20 Nov 2017 23:02:41 +0100
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Thu, 23 Nov 2017 20:04:55 +0100

irqchoip/imgpdc: Use resource_size function on resource object

drivers/irqchip/irq-imgpdc.c:327:20-23: WARNING: Suspicious code.
resource_size is maybe missing with res_regs

Generated by: scripts/coccinelle/api/resource_size.cocci

---
 drivers/irqchip/irq-imgpdc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-imgpdc.c +1 -1
index 1f59998..e80263e 100644
@@ -325,7 +325,7 @@ static int pdc_intc_probe(struct platform_device *pdev)
 
 	/* Ioremap the registers */
 	priv->pdc_base = devm_ioremap(&pdev->dev, res_regs->start,
-				      res_regs->end - res_regs->start);
+				      resource_size(res_regs));
 	if (!priv->pdc_base)
 		return -EIO;
 
#2 lore raw

[tip:irq/urgent] irqchip/imgpdc: Use resource_size function on resource object

In reply to Vasyl Gomonovych
irqchip/imgpdc: Use resource_size function on resource object
Commit-ID:  328bf1b29c3741de3c55f2b2e5179d18f16ba9c1
Gitweb:     https://git.kernel.org/tip/328bf1b29c3741de3c55f2b2e5179d18f16ba9c1
Author:     Vasyl Gomonovych <[email protected]>
AuthorDate: Mon, 20 Nov 2017 23:02:41 +0100
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Thu, 23 Nov 2017 20:09:12 +0100

irqchip/imgpdc: Use resource_size function on resource object

drivers/irqchip/irq-imgpdc.c:327:20-23: WARNING: Suspicious code.
resource_size is maybe missing with res_regs

Generated by: scripts/coccinelle/api/resource_size.cocci

---
 drivers/irqchip/irq-imgpdc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-imgpdc.c +1 -1
index 1f59998..e80263e 100644
@@ -325,7 +325,7 @@ static int pdc_intc_probe(struct platform_device *pdev)
 
 	/* Ioremap the registers */
 	priv->pdc_base = devm_ioremap(&pdev->dev, res_regs->start,
-				      res_regs->end - res_regs->start);
+				      resource_size(res_regs));
 	if (!priv->pdc_base)
 		return -EIO;