* [PATCH] drivers: mmc: host: Use resource_size()
@ 2013-03-11 23:04 Alexandru Gheorghiu
2013-03-22 16:39 ` Chris Ball
0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Gheorghiu @ 2013-03-11 23:04 UTC (permalink / raw)
To: Tony Prisk; +Cc: Chris Ball, linux-mmc, linux-kernel, Alexandru Gheorghiu
Used resource_size function instead of explicit computation.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
---
drivers/mmc/host/wmt-sdmmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 154f0e8..541e097 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -925,7 +925,7 @@ static int wmt_mci_remove(struct platform_device *pdev)
clk_put(priv->clk_sdmmc);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- release_mem_region(res->start, res->end - res->start + 1);
+ release_mem_region(res->start, resource_size(res));
mmc_free_host(mmc);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers: mmc: host: Use resource_size()
2013-03-11 23:04 [PATCH] drivers: mmc: host: Use resource_size() Alexandru Gheorghiu
@ 2013-03-22 16:39 ` Chris Ball
0 siblings, 0 replies; 2+ messages in thread
From: Chris Ball @ 2013-03-22 16:39 UTC (permalink / raw)
To: Alexandru Gheorghiu; +Cc: Tony Prisk, linux-mmc, linux-kernel
Hi,
On Mon, Mar 11 2013, Alexandru Gheorghiu wrote:
> Used resource_size function instead of explicit computation.
> Patch found using coccinelle.
>
> Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
> ---
> drivers/mmc/host/wmt-sdmmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
> index 154f0e8..541e097 100644
> --- a/drivers/mmc/host/wmt-sdmmc.c
> +++ b/drivers/mmc/host/wmt-sdmmc.c
> @@ -925,7 +925,7 @@ static int wmt_mci_remove(struct platform_device *pdev)
> clk_put(priv->clk_sdmmc);
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - release_mem_region(res->start, res->end - res->start + 1);
> + release_mem_region(res->start, resource_size(res));
>
> mmc_free_host(mmc);
Thanks, pushed to mmc-next for 3.10.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-22 16:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 23:04 [PATCH] drivers: mmc: host: Use resource_size() Alexandru Gheorghiu
2013-03-22 16:39 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox