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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 11 Dec 2009 14:32:04 +0000
From:	Alexander Clouter <alex@...riz.org.uk>
To:	H Hartley Sweeten <hartleys@...ionengravers.com>
Cc:	kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] timeriomem-rng.c: use resource_size()

Hi,

* H Hartley Sweeten <hartleys@...ionengravers.com> [2009-12-10 20:16:54-0500]:
>
> Use resource_size() for ioremap.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
> Cc: Alexander Clouter <alex@...riz.org.uk>
> 
Acked-by: Alexander Clouter <alex@...riz.org.uk>

> diff --git a/drivers/char/hw_random/timeriomem-rng.c b/drivers/char/hw_random/timeriomem-rng.c
> index a94e930..a8428e6 100644
> --- a/drivers/char/hw_random/timeriomem-rng.c
> +++ b/drivers/char/hw_random/timeriomem-rng.c
> @@ -100,8 +100,7 @@ static int __devinit timeriomem_rng_probe(struct platform_device *pdev)
>  
>  	timeriomem_rng_data = pdev->dev.platform_data;
>  
> -	timeriomem_rng_data->address = ioremap(res->start,
> -						res->end - res->start + 1);
> +	timeriomem_rng_data->address = ioremap(res->start, resource_size(res));
>  	if (!timeriomem_rng_data->address)
>  		return -EIO;

-- 
Alexander Clouter
.sigmonster says: Every time I think I know where it's at, they move it.
--
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