* [PATCH 5/7] edac: mpc85xx use resource_size instead of raw math
@ 2010-02-04 6:46 dougthompson
0 siblings, 0 replies; only message in thread
From: dougthompson @ 2010-02-04 6:46 UTC (permalink / raw
To: ptyser, bluesmoke-devel, linux-kernel, akpm
From: H Hartley Sweeten <hsweeten@visionengravers.com>
Use resource_size() instead of arithmatic.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Acked-by: Dave Jiang <djiang@mvista.com>
---
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;
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-04 6:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-04 6:46 [PATCH 5/7] edac: mpc85xx use resource_size instead of raw math dougthompson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).