The patch titled sm501: fix missing uses of resource_size() has been added to the -mm tree. Its filename is sm501-fix-missing-uses-of-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: sm501: fix missing uses of resource_size() From: Ben Dooks <ben@xxxxxxxxxxxx> There are several places in the SM501 fb driver that could do with using resource_size() to calculate the size of a resource. Also fix a bug where request_mem_region() is being passed one too few bytes when requesting the register memory region, which was causing the following in /proc/iomem: 13e80000-13e8ffff : sm501-fb.0 13e80000-13e8fffe : sm501-fb fixed, this reads: 13e80000-13e8ffff : sm501-fb.0 13e80000-13e8ffff : sm501-fb Signed-off-by: Ben Dooks <ben@xxxxxxxxxxxx> Signed-off-by: Simtec Linux Team <linux@xxxxxxxxxxxx> Cc: Vincent Sanders <vince@xxxxxxxxxxxx> Cc: Krzysztof Helt <krzysztof.h1@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/video/sm501fb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff -puN drivers/video/sm501fb.c~sm501-fix-missing-uses-of-resource_size drivers/video/sm501fb.c --- a/drivers/video/sm501fb.c~sm501-fix-missing-uses-of-resource_size +++ a/drivers/video/sm501fb.c @@ -1338,7 +1338,7 @@ static int sm501fb_start(struct sm501fb_ } info->regs_res = request_mem_region(res->start, - res->end - res->start, + resource_size(res), pdev->name); if (info->regs_res == NULL) { @@ -1347,7 +1347,7 @@ static int sm501fb_start(struct sm501fb_ goto err_release; } - info->regs = ioremap(res->start, (res->end - res->start)+1); + info->regs = ioremap(res->start, resource_size(res)); if (info->regs == NULL) { dev_err(dev, "cannot remap registers\n"); ret = -ENXIO; @@ -1363,7 +1363,7 @@ static int sm501fb_start(struct sm501fb_ } info->fbmem_res = request_mem_region(res->start, - (res->end - res->start)+1, + resource_size(res), pdev->name); if (info->fbmem_res == NULL) { dev_err(dev, "cannot claim framebuffer\n"); @@ -1371,13 +1371,13 @@ static int sm501fb_start(struct sm501fb_ goto err_regs_map; } - info->fbmem = ioremap(res->start, (res->end - res->start)+1); + info->fbmem = ioremap(res->start, resource_size(res)); if (info->fbmem == NULL) { dev_err(dev, "cannot remap framebuffer\n"); goto err_mem_res; } - info->fbmem_len = (res->end - res->start)+1; + info->fbmem_len = resource_size(res); /* clear framebuffer memory - avoids garbage data on unused fb */ memset(info->fbmem, 0, info->fbmem_len); _ Patches currently in -mm which might be from ben@xxxxxxxxxxxx are linux-next.patch s3cmci-convert-missed-s3c2410_gpio-calls-to-gpiolib-calls.patch spi_s3c24xx-add-fiq-pseudo-dma-support.patch gpiolib-add-names-file-in-gpio-chip-sysfs.patch sm501-fix-missing-uses-of-resource_size.patch sm501-fix-use-of-old-asm-ioh-instead-of-linux-ioh.patch sm501-implement-acceleration-features.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html