* [PATCH] gpiolib: fix callers of gpiochip_remove
@ 2014-09-30 13:24 Arnd Bergmann
2014-09-30 14:11 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2014-09-30 13:24 UTC (permalink / raw)
To: linux-arm-kernel
A recent API change made gpiochip_remove return void instead of an
error value, which broke drivers that use this return value:
gpio/gpio-sch311x.c: In function 'sch311x_gpio_probe':
gpio/gpio-sch311x.c:286:7: error: void value not ignored as it ought to be
if (gpiochip_remove(&priv->blocks[i].chip))
^
This changes the callers that I have found during randconfig testing
so they no longer depend on the error code.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: e1db1706c86e ("gpio: gpiolib: set gpiochip_remove retval to void")
diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c
index 223830cb95ca..1c8e45b92471 100644
--- a/drivers/gpio/gpio-sch311x.c
+++ b/drivers/gpio/gpio-sch311x.c
@@ -283,9 +283,7 @@ exit_err:
release_region(pdata->runtime_reg + GP1, 6);
/* release already registered chips */
for (--i; i >= 0; i--)
- if (gpiochip_remove(&priv->blocks[i].chip))
- dev_err(&pdev->dev,
- "Could not unregister gpiochip, %d\n", err);
+ gpiochip_remove(&priv->blocks[i].chip);
return err;
}
diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers/pinctrl/pinctrl-bcm2835.c
index 9771bdb7ff38..a12c78206e36 100644
--- a/drivers/pinctrl/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/pinctrl-bcm2835.c
@@ -1029,7 +1029,8 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
pc->pctl_dev = pinctrl_register(&bcm2835_pinctrl_desc, dev, pc);
if (!pc->pctl_dev) {
- return gpiochip_remove(&pc->gpio_chip) ? : -EINVAL;
+ gpiochip_remove(&pc->gpio_chip);
+ return -EINVAL;
}
pc->gpio_range = bcm2835_pinctrl_gpio_range;
@@ -1045,7 +1046,8 @@ static int bcm2835_pinctrl_remove(struct platform_device *pdev)
struct bcm2835_pinctrl *pc = platform_get_drvdata(pdev);
pinctrl_unregister(pc->pctl_dev);
- return gpiochip_remove(&pc->gpio_chip);
+ gpiochip_remove(&pc->gpio_chip);
+ return 0;
}
static struct of_device_id bcm2835_pinctrl_match[] = {
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] gpiolib: fix callers of gpiochip_remove
2014-09-30 13:24 [PATCH] gpiolib: fix callers of gpiochip_remove Arnd Bergmann
@ 2014-09-30 14:11 ` Linus Walleij
2014-09-30 15:18 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2014-09-30 14:11 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Sep 30, 2014 at 3:24 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> A recent API change made gpiochip_remove return void instead of an
> error value, which broke drivers that use this return value:
>
> gpio/gpio-sch311x.c: In function 'sch311x_gpio_probe':
> gpio/gpio-sch311x.c:286:7: error: void value not ignored as it ought to be
> if (gpiochip_remove(&priv->blocks[i].chip))
> ^
>
> This changes the callers that I have found during randconfig testing
> so they no longer depend on the error code.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: e1db1706c86e ("gpio: gpiolib: set gpiochip_remove retval to void")
Hm AFAICT these are already fixes in my GPIO tree
and linux-next...
Am I looking in the wrong place?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH] gpiolib: fix callers of gpiochip_remove
2014-09-30 14:11 ` Linus Walleij
@ 2014-09-30 15:18 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2014-09-30 15:18 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 30 September 2014 16:11:28 Linus Walleij wrote:
> On Tue, Sep 30, 2014 at 3:24 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>
> > A recent API change made gpiochip_remove return void instead of an
> > error value, which broke drivers that use this return value:
> >
> > gpio/gpio-sch311x.c: In function 'sch311x_gpio_probe':
> > gpio/gpio-sch311x.c:286:7: error: void value not ignored as it ought to be
> > if (gpiochip_remove(&priv->blocks[i].chip))
> > ^
> >
> > This changes the callers that I have found during randconfig testing
> > so they no longer depend on the error code.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Fixes: e1db1706c86e ("gpio: gpiolib: set gpiochip_remove retval to void")
>
> Hm AFAICT these are already fixes in my GPIO tree
> and linux-next...
>
> Am I looking in the wrong place?
>
>
No, it's my fault, I seem to have a patch in my tree that reverts those
changes.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-30 15:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-30 13:24 [PATCH] gpiolib: fix callers of gpiochip_remove Arnd Bergmann
2014-09-30 14:11 ` Linus Walleij
2014-09-30 15:18 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox