Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755260Ab0BDGq5 (ORCPT ); Thu, 4 Feb 2010 01:46:57 -0500 Received: from norsk5.dsl.xmission.com ([166.70.24.44]:50805 "EHLO master.douglaskthompson.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753594Ab0BDGqT (ORCPT ); Thu, 4 Feb 2010 01:46:19 -0500 Date: Wed, 03 Feb 2010 23:46:17 -0700 From: dougthompson@xmission.com To: ptyser@xes-inc.com, bluesmoke-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, akpm@linux-foundation.org Subject: [PATCH 5/7] edac: mpc85xx use resource_size instead of raw math Message-ID: <4b6a6d39.DE4ItdPPoue1qlHX%dougthompson@xmission.com> User-Agent: Heirloom mailx 12.2 01/07/07 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1583 Lines: 40 From: H Hartley Sweeten Use resource_size() instead of arithmatic. Signed-off-by: H Hartley Sweeten Signed-off-by: Doug Thompson Acked-by: Dave Jiang --- mpc85xx_edac.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) Index: linux-2.6.33-rc4/drivers/edac/mpc85xx_edac.c =================================================================== --- linux-2.6.33-rc4.orig/drivers/edac/mpc85xx_edac.c 2010-01-13 00:18:21.000000000 -0700 +++ linux-2.6.33-rc4/drivers/edac/mpc85xx_edac.c 2010-01-13 00:18:23.000000000 -0700 @@ -239,16 +239,15 @@ static int __devinit mpc85xx_pci_err_pro /* 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/