From: James Hogan <james.hogan@imgtec.com>
To: Axel Lin <axel.lin@ingics.com>, Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
linux-metag <linux-metag@vger.kernel.org>
Subject: Re: [PATCH 2/2] gpio: tz1090-pdc: Use resource_size to fix off-by-one resource size calculation
Date: Fri, 2 Jan 2015 10:25:22 +0000 [thread overview]
Message-ID: <54A67212.8060105@imgtec.com> (raw)
In-Reply-To: <1419746510.4496.2.camel@phoenix>
[-- Attachment #1: Type: text/plain, Size: 1086 bytes --]
On 28/12/14 06:01, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Thanks, both patches
Acked-by: James Hogan <james.hogan@imgtec.com>
Note that the previous off-by-one behaviour should be harmless since the
SoC IO memory region is unmapped on Meta (i.e. the ioremap becomes a
no-op as the whole of IO memory is accessible with normal memory
accesses regardless of MMU).
Cheers
James
> ---
> drivers/gpio/gpio-tz1090-pdc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-tz1090-pdc.c b/drivers/gpio/gpio-tz1090-pdc.c
> index d753622..ede7e40 100644
> --- a/drivers/gpio/gpio-tz1090-pdc.c
> +++ b/drivers/gpio/gpio-tz1090-pdc.c
> @@ -190,7 +190,7 @@ static int tz1090_pdc_gpio_probe(struct platform_device *pdev)
>
> /* Ioremap the registers */
> priv->reg = devm_ioremap(&pdev->dev, res_regs->start,
> - res_regs->end - res_regs->start);
> + resource_size(res_regs));
> if (!priv->reg) {
> dev_err(&pdev->dev, "unable to ioremap registers\n");
> return -ENOMEM;
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-01-02 10:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-28 6:00 [PATCH 1/2] gpio: tz1090: Use resource_size to fix off-by-one resource size calculation Axel Lin
2014-12-28 6:01 ` [PATCH 2/2] gpio: tz1090-pdc: " Axel Lin
2015-01-02 10:25 ` James Hogan [this message]
2015-01-14 10:23 ` [PATCH 1/2] gpio: tz1090: " Linus Walleij
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=54A67212.8060105@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=axel.lin@ingics.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-metag@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.