Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755955AbZLKQ6X (ORCPT ); Fri, 11 Dec 2009 11:58:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755850AbZLKQ6W (ORCPT ); Fri, 11 Dec 2009 11:58:22 -0500 Received: from hu47.mvista.com ([206.112.117.47]:44854 "HELO gateway-1237.mvista.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with SMTP id S1755163AbZLKQ6V (ORCPT ); Fri, 11 Dec 2009 11:58:21 -0500 Message-ID: <4B227A33.7060802@mvista.com> Date: Fri, 11 Dec 2009 09:58:27 -0700 From: Dave Jiang User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Thunderbird/3.0b4 MIME-Version: 1.0 To: H Hartley Sweeten Cc: kernel list , dougthompson@xmission.com Subject: Re: [PATCH] mpc85xx_edac.c: use resource_size() References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1463 Lines: 41 Acked-by: Dave Jiang On 12/11/2009 09:52 AM, H Hartley Sweeten wrote: > Use resource_size(). > > Signed-off-by: H Hartley Sweeten > Cc: Doug Thompson > Cc: Dave Jiang > > --- > > 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; -- 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/