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
Signed-off-by: Vasyl Gomonovych <[email protected]>
---
drivers/irqchip/irq-imgpdc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-imgpdc.c b/drivers/irqchip/irq-imgpdc.c
index 1f59998e03f8..e80263e16c4c 100644
--- a/drivers/irqchip/irq-imgpdc.c
+++ b/drivers/irqchip/irq-imgpdc.c
@@ -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;
--
1.9.1
From 1584464886834133942@xxx Sun Nov 19 03:51:07 +0000 2017
X-GM-THRID: 1584464886834133942
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread
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
Signed-off-by: Vasyl Gomonovych <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
---
drivers/irqchip/irq-imgpdc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-imgpdc.c b/drivers/irqchip/irq-imgpdc.c
index 1f59998..e80263e 100644
--- a/drivers/irqchip/irq-imgpdc.c
+++ b/drivers/irqchip/irq-imgpdc.c
@@ -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;
From 1589055575040174956@xxx Mon Jan 08 19:58:09 +0000 2018
X-GM-THRID: 1586497410054347973
X-Gmail-Labels: Inbox,Category Forums,Downloaded_2018-01