public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	Alexander Clouter <alex@digriz.org.uk>,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH] timeriomem-rng.c: use resource_size()
Date: Thu, 10 Dec 2009 19:34:43 -0600	[thread overview]
Message-ID: <1260495283.24459.1225.camel@calx> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE190901FB0FBA@mi8nycmail19.Mi8.com>

On Thu, 2009-12-10 at 20:16 -0500, H Hartley Sweeten wrote:
> Use resource_size() for ioremap.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Alexander Clouter <alex@digriz.org.uk>

(Generally speaking, it's best to cc: obscure stuff to a maintainer.)

Looks good to me. Herbert?

Signed-off-by: Matt Mackall <mpm@selenic.com>

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



-- 
http://selenic.com : development and support for Mercurial and Linux



  reply	other threads:[~2009-12-11  1:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11  1:16 [PATCH] timeriomem-rng.c: use resource_size() H Hartley Sweeten
2009-12-11  1:34 ` Matt Mackall [this message]
2009-12-11 15:15   ` Herbert Xu
2009-12-11 14:32 ` Alexander Clouter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1260495283.24459.1225.camel@calx \
    --to=mpm@selenic.com \
    --cc=alex@digriz.org.uk \
    --cc=hartleys@visionengravers.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox