Linux MM tree latest commits
 help / color / mirror / Atom feed
* + drivers-block-mg_diskc-use-resource_size.patch added to -mm tree
@ 2009-11-25 19:20 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2009-11-25 19:20 UTC (permalink / raw)
  To: mm-commits; +Cc: hartleys, donari75, hsweeten, jens.axboe


The patch titled
     drivers/block/mg_disk.c: use resource_size()
has been added to the -mm tree.  Its filename is
     drivers-block-mg_diskc-use-resource_size.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: drivers/block/mg_disk.c: use resource_size()
From: "H Hartley Sweeten" <hartleys@visionengravers.com>

Use resource_size() for ioremap.

The ioremap appears to be passing the incorrect size for the platform
resource.  Unfortunately, I can't locate a user in mainline to verify
this.  Using resource_size should be the correct fix.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: unsik Kim <donari75@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/block/mg_disk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/block/mg_disk.c~drivers-block-mg_diskc-use-resource_size drivers/block/mg_disk.c
--- a/drivers/block/mg_disk.c~drivers-block-mg_diskc-use-resource_size
+++ a/drivers/block/mg_disk.c
@@ -860,7 +860,7 @@ static int mg_probe(struct platform_devi
 		err = -EINVAL;
 		goto probe_err_2;
 	}
-	host->dev_base = ioremap(rsc->start , rsc->end + 1);
+	host->dev_base = ioremap(rsc->start, resource_size(rsc));
 	if (!host->dev_base) {
 		printk(KERN_ERR "%s:%d ioremap fail\n",
 				__func__, __LINE__);
_

Patches currently in -mm which might be from hartleys@visionengravers.com are

linux-next.patch
clockeventsc-fix-symbol-was-not-declared-noise.patch
drivers-block-mg_diskc-use-resource_size.patch
security-min_addrc-make-init_mmap_min_addr-static.patch
drivers-misc-add-driver-for-texas-instruments-dac7512.patch
drivers-misc-add-driver-for-texas-instruments-dac7512-update.patch
init-mainc-fix-symbol-shadows-noise.patch
kernel-sysc-fix-warning-do-while-statement-is-not-a-compound-statement-noise.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-25 19:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25 19:20 + drivers-block-mg_diskc-use-resource_size.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox