* [PATCH] mfd: kempld-core: Use resource_size function on resource object
@ 2017-11-20 21:02 Vasyl Gomonovych
2017-11-29 11:39 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Vasyl Gomonovych @ 2017-11-20 21:02 UTC (permalink / raw)
To: lee.jones; +Cc: linux-kernel, gomonovych
drivers/mfd/kempld-core.c:461:13-16: WARNING: Suspicious code. resource_size is maybe missing with ioport
Generated by: scripts/coccinelle/api/resource_size.cocci
Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
---
drivers/mfd/kempld-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
index 55d824b3a808..390b27cb2c2e 100644
--- a/drivers/mfd/kempld-core.c
+++ b/drivers/mfd/kempld-core.c
@@ -458,7 +458,7 @@ static int kempld_probe(struct platform_device *pdev)
return -EINVAL;
pld->io_base = devm_ioport_map(dev, ioport->start,
- ioport->end - ioport->start);
+ resource_size(ioport));
if (!pld->io_base)
return -ENOMEM;
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: kempld-core: Use resource_size function on resource object
2017-11-20 21:02 [PATCH] mfd: kempld-core: Use resource_size function on resource object Vasyl Gomonovych
@ 2017-11-29 11:39 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2017-11-29 11:39 UTC (permalink / raw)
To: Vasyl Gomonovych; +Cc: linux-kernel
On Mon, 20 Nov 2017, Vasyl Gomonovych wrote:
> drivers/mfd/kempld-core.c:461:13-16: WARNING: Suspicious code. resource_size is maybe missing with ioport
>
> Generated by: scripts/coccinelle/api/resource_size.cocci
>
> Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
> ---
> drivers/mfd/kempld-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-29 11:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20 21:02 [PATCH] mfd: kempld-core: Use resource_size function on resource object Vasyl Gomonovych
2017-11-29 11:39 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®