diff mbox

drivers: ata: Use resource_size function

Message ID 1363444332-379-1-git-send-email-gheorghiuandru@gmail.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Alexandru Gheorghiu March 16, 2013, 2:32 p.m. UTC
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(-)

Comments

Jeff Garzik April 3, 2013, 11:56 p.m. UTC | #1
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



--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;