linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource()
@ 2019-10-02 17:02 Bartosz Golaszewski
  2019-10-02 17:02 ` [PATCH 1/6] gpio: xgene: remove redundant error message Bartosz Golaszewski
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2019-10-02 17:02 UTC (permalink / raw)
  To: Linus Walleij, Geert Uytterhoeven, Alban Bedel
  Cc: linux-gpio, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

According to Arnd Bergmann:

"The only architecture that actually has a difference between
ioremap() and ioremap_nocache() seems to be ia64. I would
generally assume that any driver using ioremap_nocache()
that is not ia64 specific should just use ioremap()."

This series converts all users of nocache ioremap variants that aren't
ia64-specific to using devm_platform_ioremap_resource().

Most of these don't call request_mem_region() currently, which
devm_platform_ioremap_resource() does implicitly, so testing would
be appreciated.

Included are two minor fixes for xgene and htc-egpio.

Bartosz Golaszewski (6):
  gpio: xgene: remove redundant error message
  gpio: xgene: use devm_platform_ioremap_resource()
  gpio: em: use devm_platform_ioremap_resource()
  gpio: ath79: use devm_platform_ioremap_resource()
  gpio: htc-egpio: use devm_platform_ioremap_resource()
  gpio: htc-egpio: remove redundant error message

 drivers/gpio/gpio-ath79.c     | 10 +++-------
 drivers/gpio/gpio-em.c        | 20 ++++++++-----------
 drivers/gpio/gpio-htc-egpio.c | 37 ++++++++++++-----------------------
 drivers/gpio/gpio-xgene.c     | 27 ++++++-------------------
 4 files changed, 30 insertions(+), 64 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/6] gpio: xgene: remove redundant error message
  2019-10-02 17:02 [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource() Bartosz Golaszewski
@ 2019-10-02 17:02 ` Bartosz Golaszewski
  2019-10-02 17:02 ` [PATCH 2/6] gpio: xgene: use devm_platform_ioremap_resource() Bartosz Golaszewski
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2019-10-02 17:02 UTC (permalink / raw)
  To: Linus Walleij, Geert Uytterhoeven, Alban Bedel
  Cc: linux-gpio, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

There's no need to emit an error message on probe failure unless we're
printing some meaningful info. Otherwise the core driver code will
inform us about a probe error.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/gpio/gpio-xgene.c | 23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

diff --git a/drivers/gpio/gpio-xgene.c b/drivers/gpio/gpio-xgene.c
index 2918363884de..900b38a7dba8 100644
--- a/drivers/gpio/gpio-xgene.c
+++ b/drivers/gpio/gpio-xgene.c
@@ -160,23 +160,17 @@ static int xgene_gpio_probe(struct platform_device *pdev)
 	int err = 0;
 
 	gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
-	if (!gpio) {
-		err = -ENOMEM;
-		goto err;
-	}
+	if (!gpio)
+		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		err = -EINVAL;
-		goto err;
-	}
+	if (!res)
+		return -EINVAL;
 
 	gpio->base = devm_ioremap_nocache(&pdev->dev, res->start,
 							resource_size(res));
-	if (!gpio->base) {
-		err = -ENOMEM;
-		goto err;
-	}
+	if (!gpio->base)
+		return -ENOMEM;
 
 	gpio->chip.ngpio = XGENE_MAX_GPIOS;
 
@@ -196,14 +190,11 @@ static int xgene_gpio_probe(struct platform_device *pdev)
 	if (err) {
 		dev_err(&pdev->dev,
 			"failed to register gpiochip.\n");
-		goto err;
+		return err;
 	}
 
 	dev_info(&pdev->dev, "X-Gene GPIO driver registered.\n");
 	return 0;
-err:
-	dev_err(&pdev->dev, "X-Gene GPIO driver registration failed.\n");
-	return err;
 }
 
 static const struct of_device_id xgene_gpio_of_match[] = {
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/6] gpio: xgene: use devm_platform_ioremap_resource()
  2019-10-02 17:02 [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource() Bartosz Golaszewski
  2019-10-02 17:02 ` [PATCH 1/6] gpio: xgene: remove redundant error message Bartosz Golaszewski
@ 2019-10-02 17:02 ` Bartosz Golaszewski
  2019-10-02 17:02 ` [PATCH 3/6] gpio: em: " Bartosz Golaszewski
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2019-10-02 17:02 UTC (permalink / raw)
  To: Linus Walleij, Geert Uytterhoeven, Alban Bedel
  Cc: linux-gpio, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

There's no need to use the nocache variant of ioremap(). Switch to
using devm_platform_ioremap_resource().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/gpio/gpio-xgene.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/gpio/gpio-xgene.c b/drivers/gpio/gpio-xgene.c
index 900b38a7dba8..a6e66ac18e1f 100644
--- a/drivers/gpio/gpio-xgene.c
+++ b/drivers/gpio/gpio-xgene.c
@@ -155,7 +155,6 @@ static SIMPLE_DEV_PM_OPS(xgene_gpio_pm, xgene_gpio_suspend, xgene_gpio_resume);
 
 static int xgene_gpio_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct xgene_gpio *gpio;
 	int err = 0;
 
@@ -163,14 +162,9 @@ static int xgene_gpio_probe(struct platform_device *pdev)
 	if (!gpio)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -EINVAL;
-
-	gpio->base = devm_ioremap_nocache(&pdev->dev, res->start,
-							resource_size(res));
-	if (!gpio->base)
-		return -ENOMEM;
+	gpio->base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(gpio->base))
+		return PTR_ERR(gpio->base);
 
 	gpio->chip.ngpio = XGENE_MAX_GPIOS;
 
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/6] gpio: em: use devm_platform_ioremap_resource()
  2019-10-02 17:02 [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource() Bartosz Golaszewski
  2019-10-02 17:02 ` [PATCH 1/6] gpio: xgene: remove redundant error message Bartosz Golaszewski
  2019-10-02 17:02 ` [PATCH 2/6] gpio: xgene: use devm_platform_ioremap_resource() Bartosz Golaszewski
@ 2019-10-02 17:02 ` Bartosz Golaszewski
  2019-10-03  7:00   ` Geert Uytterhoeven
  2019-10-02 17:02 ` [PATCH 4/6] gpio: ath79: " Bartosz Golaszewski
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 9+ messages in thread
From: Bartosz Golaszewski @ 2019-10-02 17:02 UTC (permalink / raw)
  To: Linus Walleij, Geert Uytterhoeven, Alban Bedel
  Cc: linux-gpio, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

There's no need to use the nocache variant of ioremap(). Switch to
using devm_platform_ioremap_resource().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/gpio/gpio-em.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index 620f25b7efb4..674ebebaf90b 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -269,7 +269,7 @@ static void em_gio_irq_domain_remove(void *data)
 static int em_gio_probe(struct platform_device *pdev)
 {
 	struct em_gio_priv *p;
-	struct resource *io[2], *irq[2];
+	struct resource *irq[2];
 	struct gpio_chip *gpio_chip;
 	struct irq_chip *irq_chip;
 	struct device *dev = &pdev->dev;
@@ -285,25 +285,21 @@ static int em_gio_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, p);
 	spin_lock_init(&p->sense_lock);
 
-	io[0] = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	io[1] = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 	irq[0] = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 	irq[1] = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
 
-	if (!io[0] || !io[1] || !irq[0] || !irq[1]) {
+	if (!irq[0] || !irq[1]) {
 		dev_err(dev, "missing IRQ or IOMEM\n");
 		return -EINVAL;
 	}
 
-	p->base0 = devm_ioremap_nocache(dev, io[0]->start,
-					resource_size(io[0]));
-	if (!p->base0)
-		return -ENOMEM;
+	p->base0 = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(p->base0))
+		return PTR_ERR(p->base0);
 
-	p->base1 = devm_ioremap_nocache(dev, io[1]->start,
-				   resource_size(io[1]));
-	if (!p->base1)
-		return -ENOMEM;
+	p->base1 = devm_platform_ioremap_resource(pdev, 1);
+	if (IS_ERR(p->base1))
+		return PTR_ERR(p->base1);
 
 	if (of_property_read_u32(dev->of_node, "ngpios", &ngpios)) {
 		dev_err(dev, "Missing ngpios OF property\n");
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/6] gpio: ath79: use devm_platform_ioremap_resource()
  2019-10-02 17:02 [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource() Bartosz Golaszewski
                   ` (2 preceding siblings ...)
  2019-10-02 17:02 ` [PATCH 3/6] gpio: em: " Bartosz Golaszewski
@ 2019-10-02 17:02 ` Bartosz Golaszewski
  2019-10-02 17:02 ` [PATCH 5/6] gpio: htc-egpio: " Bartosz Golaszewski
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2019-10-02 17:02 UTC (permalink / raw)
  To: Linus Walleij, Geert Uytterhoeven, Alban Bedel
  Cc: linux-gpio, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

There's no need to use the nocache variant of ioremap(). Switch to
using devm_platform_ioremap_resource().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/gpio/gpio-ath79.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c
index f1a5ea9b3de2..53fae02c40ad 100644
--- a/drivers/gpio/gpio-ath79.c
+++ b/drivers/gpio/gpio-ath79.c
@@ -226,7 +226,6 @@ static int ath79_gpio_probe(struct platform_device *pdev)
 	struct device_node *np = dev->of_node;
 	struct ath79_gpio_ctrl *ctrl;
 	struct gpio_irq_chip *girq;
-	struct resource *res;
 	u32 ath79_gpio_count;
 	bool oe_inverted;
 	int err;
@@ -256,12 +255,9 @@ static int ath79_gpio_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -EINVAL;
-	ctrl->base = devm_ioremap_nocache(dev, res->start, resource_size(res));
-	if (!ctrl->base)
-		return -ENOMEM;
+	ctrl->base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(ctrl->base))
+		return PTR_ERR(ctrl->base);
 
 	raw_spin_lock_init(&ctrl->lock);
 	err = bgpio_init(&ctrl->gc, dev, 4,
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/6] gpio: htc-egpio: use devm_platform_ioremap_resource()
  2019-10-02 17:02 [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource() Bartosz Golaszewski
                   ` (3 preceding siblings ...)
  2019-10-02 17:02 ` [PATCH 4/6] gpio: ath79: " Bartosz Golaszewski
@ 2019-10-02 17:02 ` Bartosz Golaszewski
  2019-10-02 17:02 ` [PATCH 6/6] gpio: htc-egpio: remove redundant error message Bartosz Golaszewski
  2019-10-04 22:12 ` [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource() Linus Walleij
  6 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2019-10-02 17:02 UTC (permalink / raw)
  To: Linus Walleij, Geert Uytterhoeven, Alban Bedel
  Cc: linux-gpio, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

There's no need to use the nocache variant of ioremap(). Switch to
using devm_platform_ioremap_resource().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/gpio/gpio-htc-egpio.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-htc-egpio.c b/drivers/gpio/gpio-htc-egpio.c
index 6eb56f7ab9c9..2d4b0b888f66 100644
--- a/drivers/gpio/gpio-htc-egpio.c
+++ b/drivers/gpio/gpio-htc-egpio.c
@@ -281,14 +281,9 @@ static int __init egpio_probe(struct platform_device *pdev)
 		ei->chained_irq = res->start;
 
 	/* Map egpio chip into virtual address space. */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
+	ei->base_addr = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(ei->base_addr))
 		goto fail;
-	ei->base_addr = devm_ioremap_nocache(&pdev->dev, res->start,
-					     resource_size(res));
-	if (!ei->base_addr)
-		goto fail;
-	pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);
 
 	if ((pdata->bus_width != 16) && (pdata->bus_width != 32))
 		goto fail;
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/6] gpio: htc-egpio: remove redundant error message
  2019-10-02 17:02 [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource() Bartosz Golaszewski
                   ` (4 preceding siblings ...)
  2019-10-02 17:02 ` [PATCH 5/6] gpio: htc-egpio: " Bartosz Golaszewski
@ 2019-10-02 17:02 ` Bartosz Golaszewski
  2019-10-04 22:12 ` [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource() Linus Walleij
  6 siblings, 0 replies; 9+ messages in thread
From: Bartosz Golaszewski @ 2019-10-02 17:02 UTC (permalink / raw)
  To: Linus Walleij, Geert Uytterhoeven, Alban Bedel
  Cc: linux-gpio, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

There's no need to emit an error message on probe failure unless we're
printing some meaningful info. Otherwise the core driver code will
inform us about a probe error. Also: the driver currently drops info
about errors propagated from called functions by default to returning
-EINVAL. This fixes it as well.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/gpio/gpio-htc-egpio.c | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/drivers/gpio/gpio-htc-egpio.c b/drivers/gpio/gpio-htc-egpio.c
index 2d4b0b888f66..8aa23d70b1e6 100644
--- a/drivers/gpio/gpio-htc-egpio.c
+++ b/drivers/gpio/gpio-htc-egpio.c
@@ -265,7 +265,6 @@ static int __init egpio_probe(struct platform_device *pdev)
 	struct gpio_chip  *chip;
 	unsigned int      irq, irq_end;
 	int               i;
-	int               ret;
 
 	/* Initialize ei data structure. */
 	ei = devm_kzalloc(&pdev->dev, sizeof(*ei), GFP_KERNEL);
@@ -275,7 +274,6 @@ static int __init egpio_probe(struct platform_device *pdev)
 	spin_lock_init(&ei->lock);
 
 	/* Find chained irq */
-	ret = -EINVAL;
 	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 	if (res)
 		ei->chained_irq = res->start;
@@ -283,15 +281,17 @@ static int __init egpio_probe(struct platform_device *pdev)
 	/* Map egpio chip into virtual address space. */
 	ei->base_addr = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(ei->base_addr))
-		goto fail;
+		return PTR_ERR(ei->base_addr);
 
 	if ((pdata->bus_width != 16) && (pdata->bus_width != 32))
-		goto fail;
+		return -EINVAL;
+
 	ei->bus_shift = fls(pdata->bus_width - 1) - 3;
 	pr_debug("bus_shift = %d\n", ei->bus_shift);
 
 	if ((pdata->reg_width != 8) && (pdata->reg_width != 16))
-		goto fail;
+		return -EINVAL;
+
 	ei->reg_shift = fls(pdata->reg_width - 1);
 	pr_debug("reg_shift = %d\n", ei->reg_shift);
 
@@ -303,10 +303,9 @@ static int __init egpio_probe(struct platform_device *pdev)
 	ei->chip = devm_kcalloc(&pdev->dev,
 				ei->nchips, sizeof(struct egpio_chip),
 				GFP_KERNEL);
-	if (!ei->chip) {
-		ret = -ENOMEM;
-		goto fail;
-	}
+	if (!ei->chip)
+		return -ENOMEM;
+
 	for (i = 0; i < ei->nchips; i++) {
 		ei->chip[i].reg_start = pdata->chip[i].reg_start;
 		ei->chip[i].cached_values = pdata->chip[i].initial_values;
@@ -316,10 +315,9 @@ static int __init egpio_probe(struct platform_device *pdev)
 		chip->label = devm_kasprintf(&pdev->dev, GFP_KERNEL,
 					     "htc-egpio-%d",
 					     i);
-		if (!chip->label) {
-			ret = -ENOMEM;
-			goto fail;
-		}
+		if (!chip->label)
+			return -ENOMEM;
+
 		chip->parent          = &pdev->dev;
 		chip->owner           = THIS_MODULE;
 		chip->get             = egpio_get;
@@ -361,10 +359,6 @@ static int __init egpio_probe(struct platform_device *pdev)
 	}
 
 	return 0;
-
-fail:
-	printk(KERN_ERR "EGPIO failed to setup\n");
-	return ret;
 }
 
 #ifdef CONFIG_PM
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/6] gpio: em: use devm_platform_ioremap_resource()
  2019-10-02 17:02 ` [PATCH 3/6] gpio: em: " Bartosz Golaszewski
@ 2019-10-03  7:00   ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2019-10-03  7:00 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Linus Walleij, Geert Uytterhoeven, Alban Bedel,
	open list:GPIO SUBSYSTEM, Linux Kernel Mailing List,
	Bartosz Golaszewski, Linux-Renesas

CC linux-renesas-soc

On Wed, Oct 2, 2019 at 7:03 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> There's no need to use the nocache variant of ioremap(). Switch to
> using devm_platform_ioremap_resource().
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/drivers/gpio/gpio-em.c
> +++ b/drivers/gpio/gpio-em.c
> @@ -269,7 +269,7 @@ static void em_gio_irq_domain_remove(void *data)
>  static int em_gio_probe(struct platform_device *pdev)
>  {
>         struct em_gio_priv *p;
> -       struct resource *io[2], *irq[2];
> +       struct resource *irq[2];
>         struct gpio_chip *gpio_chip;
>         struct irq_chip *irq_chip;
>         struct device *dev = &pdev->dev;
> @@ -285,25 +285,21 @@ static int em_gio_probe(struct platform_device *pdev)
>         platform_set_drvdata(pdev, p);
>         spin_lock_init(&p->sense_lock);
>
> -       io[0] = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       io[1] = platform_get_resource(pdev, IORESOURCE_MEM, 1);
>         irq[0] = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>         irq[1] = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
>
> -       if (!io[0] || !io[1] || !irq[0] || !irq[1]) {
> +       if (!irq[0] || !irq[1]) {
>                 dev_err(dev, "missing IRQ or IOMEM\n");
>                 return -EINVAL;
>         }
>
> -       p->base0 = devm_ioremap_nocache(dev, io[0]->start,
> -                                       resource_size(io[0]));
> -       if (!p->base0)
> -               return -ENOMEM;
> +       p->base0 = devm_platform_ioremap_resource(pdev, 0);
> +       if (IS_ERR(p->base0))
> +               return PTR_ERR(p->base0);
>
> -       p->base1 = devm_ioremap_nocache(dev, io[1]->start,
> -                                  resource_size(io[1]));
> -       if (!p->base1)
> -               return -ENOMEM;
> +       p->base1 = devm_platform_ioremap_resource(pdev, 1);
> +       if (IS_ERR(p->base1))
> +               return PTR_ERR(p->base1);
>
>         if (of_property_read_u32(dev->of_node, "ngpios", &ngpios)) {
>                 dev_err(dev, "Missing ngpios OF property\n");

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource()
  2019-10-02 17:02 [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource() Bartosz Golaszewski
                   ` (5 preceding siblings ...)
  2019-10-02 17:02 ` [PATCH 6/6] gpio: htc-egpio: remove redundant error message Bartosz Golaszewski
@ 2019-10-04 22:12 ` Linus Walleij
  6 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2019-10-04 22:12 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Geert Uytterhoeven, Alban Bedel, open list:GPIO SUBSYSTEM,
	linux-kernel, Bartosz Golaszewski

On Wed, Oct 2, 2019 at 7:02 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> This series converts all users of nocache ioremap variants that aren't
> ia64-specific to using devm_platform_ioremap_resource().

Do we have an ia64 gpio driver even?

> Most of these don't call request_mem_region() currently, which
> devm_platform_ioremap_resource() does implicitly, so testing would
> be appreciated.
>
> Included are two minor fixes for xgene and htc-egpio.

All the patches:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Send me a pull request at your earliest convenience!

Thanks,
Linus Walleij

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-10-04 22:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 17:02 [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource() Bartosz Golaszewski
2019-10-02 17:02 ` [PATCH 1/6] gpio: xgene: remove redundant error message Bartosz Golaszewski
2019-10-02 17:02 ` [PATCH 2/6] gpio: xgene: use devm_platform_ioremap_resource() Bartosz Golaszewski
2019-10-02 17:02 ` [PATCH 3/6] gpio: em: " Bartosz Golaszewski
2019-10-03  7:00   ` Geert Uytterhoeven
2019-10-02 17:02 ` [PATCH 4/6] gpio: ath79: " Bartosz Golaszewski
2019-10-02 17:02 ` [PATCH 5/6] gpio: htc-egpio: " Bartosz Golaszewski
2019-10-02 17:02 ` [PATCH 6/6] gpio: htc-egpio: remove redundant error message Bartosz Golaszewski
2019-10-04 22:12 ` [PATCH 0/6] gpio: replace nocache ioremap functions with devm_platform_ioremap_resource() 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).