public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: host: use resource_size()
@ 2013-03-12 18:21 Silviu-Mihai Popescu
  2013-03-22 16:53 ` Chris Ball
  0 siblings, 1 reply; 2+ messages in thread
From: Silviu-Mihai Popescu @ 2013-03-12 18:21 UTC (permalink / raw)
  To: linux-mmc
  Cc: cjb, yunhong.jiang, sheng, mikechan, xiaohui.xin, jun.nakajima,
	linux-kernel, Silviu-Mihai Popescu

Use resource_size() instead of explicit calculation. This was found via
make coccicheck.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
---
 drivers/mmc/host/android-goldfish.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/android-goldfish.c b/drivers/mmc/host/android-goldfish.c
index ef3aef0..7780c14 100644
--- a/drivers/mmc/host/android-goldfish.c
+++ b/drivers/mmc/host/android-goldfish.c
@@ -476,7 +476,7 @@ static int goldfish_mmc_probe(struct platform_device *pdev)
 	host->mmc = mmc;
 
 	pr_err("mmc: Mapping %lX to %lX\n", (long)res->start, (long)res->end);
-	host->reg_base = ioremap(res->start, res->end - res->start + 1);
+	host->reg_base = ioremap(res->start, resource_size(res));
 	if (host->reg_base == NULL) {
 		ret = -ENOMEM;
 		goto ioremap_failed;
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-22 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 18:21 [PATCH] mmc: host: use resource_size() Silviu-Mihai Popescu
2013-03-22 16:53 ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox