From: Chris Ball <cjb@laptop.org>
To: Tobias Klauser <tklauser@distanz.ch>
Cc: jarkko.lavinen@nokia.com, tony@atomide.com,
linux-omap@vger.kernel.org, linux-mmc@vger.kernel.org,
kernel-janitors@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] mmci-omap: Use resource_size
Date: Fri, 27 Aug 2010 20:42:22 +0100 [thread overview]
Message-ID: <20100827194221.GH23079@void.printf.net> (raw)
In-Reply-To: <1273133059-6335-1-git-send-email-tklauser@distanz.ch>
Hi,
On Thu, May 06, 2010 at 10:04:19AM +0200, Tobias Klauser wrote:
> Use the resource_size function instead of manually calculating the
> resource size. This reduces the chance of introducing off-by-one
> errors.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
> drivers/mmc/host/omap.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
> index 84d2804..a2c8545 100644
> --- a/drivers/mmc/host/omap.c
> +++ b/drivers/mmc/host/omap.c
> @@ -1415,7 +1415,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
> if (res == NULL || irq < 0)
> return -ENXIO;
>
> - res = request_mem_region(res->start, res->end - res->start + 1,
> + res = request_mem_region(res->start, resource_size(res),
> pdev->name);
> if (res == NULL)
> return -EBUSY;
> @@ -1537,7 +1537,7 @@ static int mmc_omap_remove(struct platform_device *pdev)
>
> iounmap(host->virt_base);
> release_mem_region(pdev->resource[0].start,
> - pdev->resource[0].end - pdev->resource[0].start + 1);
> + resource_size(&pdev->resource[0]));
>
> kfree(host);
>
> --
> 1.6.3.3
This wasn't picked up, and in the meantime the request_mem_region() call
has been converted over to use resource_size() but release_mem_region()
hasn't. Could someone pick up the second hunk?
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
prev parent reply other threads:[~2010-08-27 19:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 8:04 [PATCH] mmci-omap: Use resource_size Tobias Klauser
2010-08-27 19:42 ` Chris Ball [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100827194221.GH23079@void.printf.net \
--to=cjb@laptop.org \
--cc=akpm@linux-foundation.org \
--cc=jarkko.lavinen@nokia.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tklauser@distanz.ch \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).