public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jiang <djiang@mvista.com>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: kernel list <linux-kernel@vger.kernel.org>, dougthompson@xmission.com
Subject: Re: [PATCH] mpc85xx_edac.c: use resource_size()
Date: Fri, 11 Dec 2009 09:58:27 -0700	[thread overview]
Message-ID: <4B227A33.7060802@mvista.com> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE190901FB1038@mi8nycmail19.Mi8.com>

Acked-by: Dave Jiang <djiang@mvista.com>

On 12/11/2009 09:52 AM, H Hartley Sweeten wrote:
> Use resource_size().
>
> Signed-off-by: H Hartley Sweeten<hsweeten@visionengravers.com>
> Cc: Doug Thompson<dougthompson@xmission.com>
> Cc: Dave Jiang<djiang@mvista.com>
>
> ---
>
> diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
> index cf27402..adecf37 100644
> --- a/drivers/edac/mpc85xx_edac.c
> +++ b/drivers/edac/mpc85xx_edac.c
> @@ -239,16 +239,15 @@ static int __devinit mpc85xx_pci_err_probe(struct of_device *op,
>   	/* we only need the error registers */
>   	r.start += 0xe00;
>
> -	if (!devm_request_mem_region(&op->dev, r.start,
> -					r.end - r.start + 1, pdata->name)) {
> +	if (!devm_request_mem_region(&op->dev, r.start, resource_size(&r),
> +					pdata->name)) {
>   		printk(KERN_ERR "%s: Error while requesting mem region\n",
>   		       __func__);
>   		res = -EBUSY;
>   		goto err;
>   	}
>
> -	pdata->pci_vbase = devm_ioremap(&op->dev, r.start,
> -					r.end - r.start + 1);
> +	pdata->pci_vbase = devm_ioremap(&op->dev, r.start, resource_size(&r));
>   	if (!pdata->pci_vbase) {
>   		printk(KERN_ERR "%s: Unable to setup PCI err regs\n", __func__);
>   		res = -ENOMEM;


      reply	other threads:[~2009-12-11 16:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11 16:52 [PATCH] mpc85xx_edac.c: use resource_size() H Hartley Sweeten
2009-12-11 16:58 ` Dave Jiang [this message]

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=4B227A33.7060802@mvista.com \
    --to=djiang@mvista.com \
    --cc=dougthompson@xmission.com \
    --cc=hartleys@visionengravers.com \
    --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