mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] irq-imgpdc: Use resource_size function on resource object
@ 2017-11-20 22:02 Vasyl Gomonovych
  2017-11-23 19:10 ` [tip:irq/urgent] irqchoip/imgpdc: " tip-bot for Vasyl Gomonovych
  2017-11-23 19:12 ` [tip:irq/urgent] irqchip/imgpdc: " tip-bot for Vasyl Gomonovych
  0 siblings, 2 replies; 3+ messages in thread
From: Vasyl Gomonovych @ 2017-11-20 22:02 UTC (permalink / raw)
  To: tglx, jason, marc.zyngier; +Cc: linux-kernel, gomonovych

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 <gomonovych@gmail.com>
---
 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:irq/urgent] irqchoip/imgpdc: Use resource_size function on resource object
  2017-11-20 22:02 [PATCH] irq-imgpdc: Use resource_size function on resource object Vasyl Gomonovych
@ 2017-11-23 19:10 ` tip-bot for Vasyl Gomonovych
  2017-11-23 19:12 ` [tip:irq/urgent] irqchip/imgpdc: " tip-bot for Vasyl Gomonovych
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Vasyl Gomonovych @ 2017-11-23 19:10 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: hpa, mingo, linux-kernel, tglx, gomonovych

Commit-ID:  a994988d73db142fbe842ce08bbda62b12456577
Gitweb:     https://git.kernel.org/tip/a994988d73db142fbe842ce08bbda62b12456577
Author:     Vasyl Gomonovych <gomonovych@gmail.com>
AuthorDate: Mon, 20 Nov 2017 23:02:41 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
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 <gomonovych@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: marc.zyngier@arm.com
Cc: jason@lakedaemon.net
Link: https://lkml.kernel.org/r/1511215361-8279-1-git-send-email-gomonovych@gmail.com
---
 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;
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:irq/urgent] irqchip/imgpdc: Use resource_size function on resource object
  2017-11-20 22:02 [PATCH] irq-imgpdc: Use resource_size function on resource object Vasyl Gomonovych
  2017-11-23 19:10 ` [tip:irq/urgent] irqchoip/imgpdc: " tip-bot for Vasyl Gomonovych
@ 2017-11-23 19:12 ` tip-bot for Vasyl Gomonovych
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Vasyl Gomonovych @ 2017-11-23 19:12 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, tglx, hpa, gomonovych, mingo

Commit-ID:  328bf1b29c3741de3c55f2b2e5179d18f16ba9c1
Gitweb:     https://git.kernel.org/tip/328bf1b29c3741de3c55f2b2e5179d18f16ba9c1
Author:     Vasyl Gomonovych <gomonovych@gmail.com>
AuthorDate: Mon, 20 Nov 2017 23:02:41 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
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

Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: marc.zyngier@arm.com
Cc: jason@lakedaemon.net
Link: https://lkml.kernel.org/r/1511215361-8279-1-git-send-email-gomonovych@gmail.com
---
 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;
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-23 19:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20 22:02 [PATCH] irq-imgpdc: Use resource_size function on resource object Vasyl Gomonovych
2017-11-23 19:10 ` [tip:irq/urgent] irqchoip/imgpdc: " tip-bot for Vasyl Gomonovych
2017-11-23 19:12 ` [tip:irq/urgent] irqchip/imgpdc: " tip-bot for Vasyl Gomonovych

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome