* [PATCH 1/2] gpio: tz1090: Use resource_size to fix off-by-one resource size calculation
@ 2014-12-28 6:00 Axel Lin
2014-12-28 6:01 ` [PATCH 2/2] gpio: tz1090-pdc: " Axel Lin
2015-01-14 10:23 ` [PATCH 1/2] gpio: tz1090: " Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2014-12-28 6:00 UTC (permalink / raw)
To: Linus Walleij, Alexandre Courbot; +Cc: James Hogan, linux-gpio@vger.kernel.org
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/gpio/gpio-tz1090.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-tz1090.c b/drivers/gpio/gpio-tz1090.c
index e3024bb..445660a 100644
--- a/drivers/gpio/gpio-tz1090.c
+++ b/drivers/gpio/gpio-tz1090.c
@@ -573,7 +573,7 @@ static int tz1090_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;
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] gpio: tz1090-pdc: Use resource_size to fix off-by-one resource size calculation
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 ` Axel Lin
2015-01-02 10:25 ` James Hogan
2015-01-14 10:23 ` [PATCH 1/2] gpio: tz1090: " Linus Walleij
1 sibling, 1 reply; 4+ messages in thread
From: Axel Lin @ 2014-12-28 6:01 UTC (permalink / raw)
To: Linus Walleij; +Cc: Alexandre Courbot, James Hogan, linux-gpio@vger.kernel.org
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
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;
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] gpio: tz1090-pdc: Use resource_size to fix off-by-one resource size calculation
2014-12-28 6:01 ` [PATCH 2/2] gpio: tz1090-pdc: " Axel Lin
@ 2015-01-02 10:25 ` James Hogan
0 siblings, 0 replies; 4+ messages in thread
From: James Hogan @ 2015-01-02 10:25 UTC (permalink / raw)
To: Axel Lin, Linus Walleij
Cc: Alexandre Courbot, linux-gpio@vger.kernel.org, linux-metag
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] gpio: tz1090: Use resource_size to fix off-by-one resource size calculation
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-14 10:23 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2015-01-14 10:23 UTC (permalink / raw)
To: Axel Lin; +Cc: Alexandre Courbot, James Hogan, linux-gpio@vger.kernel.org
On Sun, Dec 28, 2014 at 7:00 AM, Axel Lin <axel.lin@ingics.com> wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-14 10:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-01-14 10:23 ` [PATCH 1/2] gpio: tz1090: " Linus Walleij
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).