lkml.org 
[lkml]   [2013]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mmc: host: use resource_size()
Date
Hi,

On Tue, Mar 12 2013, Silviu-Mihai Popescu wrote:
> 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;

Thanks, pushed to mmc-next for 3.10.

- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child


\
 
 \ /
  Last update: 2013-03-22 18:21    [W:0.038 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site