lkml.org 
[lkml]   [2017]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:irq/urgent] irqchoip/imgpdc: Use resource_size function on resource object
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;

\
 
 \ /
  Last update: 2017-11-23 20:13    [W:0.033 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site