Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-06-09 Thread Andrzej Hajda
On 06/09/2014 03:43 PM, David Laight wrote: > From: Of Andrzej Hajda > ... >>> You can't error out on module unload, although that's not really relevant >>> here. gpiochip_remove() is typically called when the device that registered >>> the GPIO chip is unbound. And despite some remove() callbacks

RE: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-06-09 Thread David Laight
From: Of Andrzej Hajda ... > > You can't error out on module unload, although that's not really relevant > > here. gpiochip_remove() is typically called when the device that registered > > the GPIO chip is unbound. And despite some remove() callbacks having a > > return type of int you can not abor

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-06-09 Thread Andrzej Hajda
On 06/09/2014 01:29 PM, Lars-Peter Clausen wrote: > On 06/09/2014 01:18 AM, Ben Dooks wrote: >> On Fri, May 30, 2014 at 08:16:59PM +0200, Lars-Peter Clausen wrote: >>> On 05/30/2014 07:33 PM, David Daney wrote: On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: > On Fri, May 30, 2014 at 1:3

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-06-09 Thread Lars-Peter Clausen
On 06/09/2014 01:18 AM, Ben Dooks wrote: On Fri, May 30, 2014 at 08:16:59PM +0200, Lars-Peter Clausen wrote: On 05/30/2014 07:33 PM, David Daney wrote: On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: On Fri, May 30, 2014 at 1:30 PM, abdoulaye berthe wrote: --- a/drivers/gpio/gpiolib.c +++

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-06-08 Thread Ben Dooks
On Fri, May 30, 2014 at 08:16:59PM +0200, Lars-Peter Clausen wrote: > On 05/30/2014 07:33 PM, David Daney wrote: > >On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: > >>On Fri, May 30, 2014 at 1:30 PM, abdoulaye berthe > >>wrote: > >>>--- a/drivers/gpio/gpiolib.c > >>>+++ b/drivers/gpio/gpiolib.c

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-05-31 Thread Dan Carpenter
On Sat, May 31, 2014 at 09:35:39AM +0200, Lars-Peter Clausen wrote: > On 05/31/2014 01:29 AM, Greg KH wrote: > >On Fri, May 30, 2014 at 08:16:59PM +0200, Lars-Peter Clausen wrote: > >>On 05/30/2014 07:33 PM, David Daney wrote: > >>>On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: > On Fri, May

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-05-31 Thread Lars-Peter Clausen
On 05/31/2014 01:29 AM, Greg KH wrote: On Fri, May 30, 2014 at 08:16:59PM +0200, Lars-Peter Clausen wrote: On 05/30/2014 07:33 PM, David Daney wrote: On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: On Fri, May 30, 2014 at 1:30 PM, abdoulaye berthe wrote: --- a/drivers/gpio/gpiolib.c +++ b/

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-05-30 Thread Greg KH
On Fri, May 30, 2014 at 08:16:59PM +0200, Lars-Peter Clausen wrote: > On 05/30/2014 07:33 PM, David Daney wrote: > >On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: > >>On Fri, May 30, 2014 at 1:30 PM, abdoulaye berthe > >>wrote: > >>>--- a/drivers/gpio/gpiolib.c > >>>+++ b/drivers/gpio/gpiolib.c

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-05-30 Thread Lars-Peter Clausen
On 05/30/2014 07:33 PM, David Daney wrote: On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: On Fri, May 30, 2014 at 1:30 PM, abdoulaye berthe wrote: --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1263,10 +1263,9 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip)

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-05-30 Thread David Daney
On 05/30/2014 04:39 AM, Geert Uytterhoeven wrote: On Fri, May 30, 2014 at 1:30 PM, abdoulaye berthe wrote: --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1263,10 +1263,9 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip); * * A gpio_chip with any GPIOs stil

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-05-30 Thread Ralf Baechle
On Fri, May 30, 2014 at 01:39:15PM +0200, Geert Uytterhoeven wrote: > > + if (test_bit(FLAG_REQUESTED, &chip->desc[id].flags)) > > + panic("gpio: removing gpiochip with gpios still > > requested\n"); > > panic? > > Is this likely to happen? And while we're a

Re: [PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-05-30 Thread Geert Uytterhoeven
On Fri, May 30, 2014 at 1:30 PM, abdoulaye berthe wrote: > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -1263,10 +1263,9 @@ static void gpiochip_irqchip_remove(struct gpio_chip > *gpiochip); > * > * A gpio_chip with any GPIOs still requested may not be removed. > */ > -i

[PATCH 2/2] gpio: gpiolib: set gpiochip_remove retval to void

2014-05-30 Thread abdoulaye berthe
This avoids handling gpiochip remove error in device remove handler. Signed-off-by: abdoulaye berthe --- drivers/gpio/gpiolib.c | 24 +++- include/linux/gpio/driver.h | 2 +- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/driver