lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 22 Mar 2013 12:53:36 -0400
From:	Chris Ball <cjb@...top.org>
To:	Silviu-Mihai Popescu <silviupopescu1990@...il.com>
Cc:	linux-mmc@...r.kernel.org, yunhong.jiang@...el.com,
	sheng@...ux.intel.com, mikechan@...gle.com, xiaohui.xin@...el.com,
	jun.nakajima@...el.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc: host: use resource_size()

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@...il.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@...top.org>   <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ