* [PATCH] drivers: ata: Use resource_size function
@ 2013-03-16 14:32 Alexandru Gheorghiu
2013-04-03 23:56 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Gheorghiu @ 2013-03-16 14:32 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-ide, linux-kernel, Alexandru Gheorghiu
Use resource_size function instead of explicit computation.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
---
drivers/ata/pata_octeon_cf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index ff2e57f..e73bef3 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -926,7 +926,7 @@ static int octeon_cf_probe(struct platform_device *pdev)
goto free_cf_port;
}
cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start,
- res_cs1->end - res_cs1->start + 1);
+ resource_size(res_cs1));
if (!cs1)
goto free_cf_port;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers: ata: Use resource_size function
2013-03-16 14:32 [PATCH] drivers: ata: Use resource_size function Alexandru Gheorghiu
@ 2013-04-03 23:56 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2013-04-03 23:56 UTC (permalink / raw)
To: Alexandru Gheorghiu; +Cc: linux-ide, linux-kernel
On 03/16/2013 10:32 AM, Alexandru Gheorghiu wrote:
> Use resource_size function instead of explicit computation.
> Patch found using coccinelle.
>
> Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
> ---
> drivers/ata/pata_octeon_cf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-03 23:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-16 14:32 [PATCH] drivers: ata: Use resource_size function Alexandru Gheorghiu
2013-04-03 23:56 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).