From: Silviu-Mihai Popescu Date: Tue, 12 Mar 2013 18:21:26 +0000 (+0200) Subject: mmc: android-goldfish: use resource_size() X-Git-Tag: firefly_0821_release~3680^2~578^2~38 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6a966e060978c82cf6d0baf3c200cbd4f692dc97;p=firefly-linux-kernel-4.4.55.git mmc: android-goldfish: use resource_size() Use resource_size() instead of explicit calculation. This was found via make coccicheck. Signed-off-by: Silviu-Mihai Popescu Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/android-goldfish.c b/drivers/mmc/host/android-goldfish.c index ef3aef0f376d..7780c14704c4 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;