Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Uwe Kleine-König
Hello Geert, On Fri, Mar 24, 2017 at 10:44:50AM +0100, Geert Uytterhoeven wrote: > On Fri, Mar 24, 2017 at 10:15 AM, Uwe Kleine-König > wrote: > > On Fri, Mar 24, 2017 at 09:59:04AM +0100, Geert Uytterhoeven wrote: > >> On Fri, Mar 24, 2017 at 9:39 AM, Uwe

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Uwe Kleine-König
Hello Geert, On Fri, Mar 24, 2017 at 10:44:50AM +0100, Geert Uytterhoeven wrote: > On Fri, Mar 24, 2017 at 10:15 AM, Uwe Kleine-König > wrote: > > On Fri, Mar 24, 2017 at 09:59:04AM +0100, Geert Uytterhoeven wrote: > >> On Fri, Mar 24, 2017 at 9:39 AM, Uwe Kleine-König > >> wrote: > >> > On

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Geert Uytterhoeven
Hi Uwe, On Fri, Mar 24, 2017 at 10:15 AM, Uwe Kleine-König wrote: > On Fri, Mar 24, 2017 at 09:59:04AM +0100, Geert Uytterhoeven wrote: >> On Fri, Mar 24, 2017 at 9:39 AM, Uwe Kleine-König >> wrote: >> > On Fri, Mar 24, 2017 at

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Geert Uytterhoeven
Hi Uwe, On Fri, Mar 24, 2017 at 10:15 AM, Uwe Kleine-König wrote: > On Fri, Mar 24, 2017 at 09:59:04AM +0100, Geert Uytterhoeven wrote: >> On Fri, Mar 24, 2017 at 9:39 AM, Uwe Kleine-König >> wrote: >> > On Fri, Mar 24, 2017 at 09:29:02AM +0100, Geert Uytterhoeven wrote: >> >> On Fri, Mar 24,

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Uwe Kleine-König
On Fri, Mar 24, 2017 at 09:59:04AM +0100, Geert Uytterhoeven wrote: > Hi Uwe, > > On Fri, Mar 24, 2017 at 9:39 AM, Uwe Kleine-König > wrote: > > On Fri, Mar 24, 2017 at 09:29:02AM +0100, Geert Uytterhoeven wrote: > >> On Fri, Mar 24, 2017 at 9:00 AM, Uwe

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Uwe Kleine-König
On Fri, Mar 24, 2017 at 09:59:04AM +0100, Geert Uytterhoeven wrote: > Hi Uwe, > > On Fri, Mar 24, 2017 at 9:39 AM, Uwe Kleine-König > wrote: > > On Fri, Mar 24, 2017 at 09:29:02AM +0100, Geert Uytterhoeven wrote: > >> On Fri, Mar 24, 2017 at 9:00 AM, Uwe Kleine-König > >> wrote: > >> > From:

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Linus Walleij
On Thu, Mar 23, 2017 at 8:10 PM, Uwe Kleine-König wrote: > On Thu, Mar 23, 2017 at 08:44:41AM -0700, Dmitry Torokhov wrote: >> On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmitry Torokhov wrote: >> > On Thu, Mar 23, 2017 at 02:41:53PM +0100, Linus Walleij wrote: >> >

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Linus Walleij
On Thu, Mar 23, 2017 at 8:10 PM, Uwe Kleine-König wrote: > On Thu, Mar 23, 2017 at 08:44:41AM -0700, Dmitry Torokhov wrote: >> On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmitry Torokhov wrote: >> > On Thu, Mar 23, 2017 at 02:41:53PM +0100, Linus Walleij wrote: >> > > On Thu, Mar 23, 2017 at 1:34

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Geert Uytterhoeven
Hi Uwe, On Fri, Mar 24, 2017 at 9:39 AM, Uwe Kleine-König wrote: > On Fri, Mar 24, 2017 at 09:29:02AM +0100, Geert Uytterhoeven wrote: >> On Fri, Mar 24, 2017 at 9:00 AM, Uwe Kleine-König >> wrote: >> > From: Uwe Kleine-König

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Geert Uytterhoeven
Hi Uwe, On Fri, Mar 24, 2017 at 9:39 AM, Uwe Kleine-König wrote: > On Fri, Mar 24, 2017 at 09:29:02AM +0100, Geert Uytterhoeven wrote: >> On Fri, Mar 24, 2017 at 9:00 AM, Uwe Kleine-König >> wrote: >> > From: Uwe Kleine-König >> > Subject: [PATCH] gpiod: let get_optional return NULL in some

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Uwe Kleine-König
Hello Geert, On Fri, Mar 24, 2017 at 09:29:02AM +0100, Geert Uytterhoeven wrote: > On Fri, Mar 24, 2017 at 9:00 AM, Uwe Kleine-König > wrote: > > From: Uwe Kleine-König > > Subject: [PATCH] gpiod: let get_optional return NULL in

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Uwe Kleine-König
Hello Geert, On Fri, Mar 24, 2017 at 09:29:02AM +0100, Geert Uytterhoeven wrote: > On Fri, Mar 24, 2017 at 9:00 AM, Uwe Kleine-König > wrote: > > From: Uwe Kleine-König > > Subject: [PATCH] gpiod: let get_optional return NULL in some cases with > > GPIOLIB disabled > > > > People disagree if

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Geert Uytterhoeven
Hi Uwe, On Fri, Mar 24, 2017 at 9:00 AM, Uwe Kleine-König wrote: > From: Uwe Kleine-König > Subject: [PATCH] gpiod: let get_optional return NULL in some cases with > GPIOLIB disabled > > People disagree if gpiod_get_optional

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Geert Uytterhoeven
Hi Uwe, On Fri, Mar 24, 2017 at 9:00 AM, Uwe Kleine-König wrote: > From: Uwe Kleine-König > Subject: [PATCH] gpiod: let get_optional return NULL in some cases with > GPIOLIB disabled > > People disagree if gpiod_get_optional should return NULL or > ERR_PTR(-ENOSYS) if GPIOLIB is disabled. The

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Uwe Kleine-König
Hello Dmitry, On Thu, Mar 23, 2017 at 12:58:04PM -0700, Dmitry Torokhov wrote: > On Thu, Mar 23, 2017 at 08:10:20PM +0100, Uwe Kleine-König wrote: > > On Thu, Mar 23, 2017 at 08:44:41AM -0700, Dmitry Torokhov wrote: > > > On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmitry Torokhov wrote: > > > > On

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-24 Thread Uwe Kleine-König
Hello Dmitry, On Thu, Mar 23, 2017 at 12:58:04PM -0700, Dmitry Torokhov wrote: > On Thu, Mar 23, 2017 at 08:10:20PM +0100, Uwe Kleine-König wrote: > > On Thu, Mar 23, 2017 at 08:44:41AM -0700, Dmitry Torokhov wrote: > > > On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmitry Torokhov wrote: > > > > On

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Dmitry Torokhov
On Thu, Mar 23, 2017 at 08:10:20PM +0100, Uwe Kleine-König wrote: > On Thu, Mar 23, 2017 at 08:44:41AM -0700, Dmitry Torokhov wrote: > > On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmitry Torokhov wrote: > > > On Thu, Mar 23, 2017 at 02:41:53PM +0100, Linus Walleij wrote: > > > > On Thu, Mar 23,

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Dmitry Torokhov
On Thu, Mar 23, 2017 at 08:10:20PM +0100, Uwe Kleine-König wrote: > On Thu, Mar 23, 2017 at 08:44:41AM -0700, Dmitry Torokhov wrote: > > On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmitry Torokhov wrote: > > > On Thu, Mar 23, 2017 at 02:41:53PM +0100, Linus Walleij wrote: > > > > On Thu, Mar 23,

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Uwe Kleine-König
On Thu, Mar 23, 2017 at 08:44:41AM -0700, Dmitry Torokhov wrote: > On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmitry Torokhov wrote: > > On Thu, Mar 23, 2017 at 02:41:53PM +0100, Linus Walleij wrote: > > > On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König > > >

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Uwe Kleine-König
On Thu, Mar 23, 2017 at 08:44:41AM -0700, Dmitry Torokhov wrote: > On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmitry Torokhov wrote: > > On Thu, Mar 23, 2017 at 02:41:53PM +0100, Linus Walleij wrote: > > > On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König > > > wrote: > > > > > > > Maybe we can

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Dmitry Torokhov
On Thu, Mar 23, 2017 at 12:11:06PM +0100, Uwe Kleine-König wrote: > Hello, > > On Thu, Mar 23, 2017 at 11:20:39AM +0100, Geert Uytterhoeven wrote: > > But having the error breaks setups where the GPIO is optional and does > > not exist. > > so the right way forward is to check harder in the

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Dmitry Torokhov
On Thu, Mar 23, 2017 at 12:11:06PM +0100, Uwe Kleine-König wrote: > Hello, > > On Thu, Mar 23, 2017 at 11:20:39AM +0100, Geert Uytterhoeven wrote: > > But having the error breaks setups where the GPIO is optional and does > > not exist. > > so the right way forward is to check harder in the

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Dmitry Torokhov
On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmitry Torokhov wrote: > On Thu, Mar 23, 2017 at 02:41:53PM +0100, Linus Walleij wrote: > > On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König > > wrote: > > > > > Maybe we can make gpiod_get_optional look like this: > > >

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Dmitry Torokhov
On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmitry Torokhov wrote: > On Thu, Mar 23, 2017 at 02:41:53PM +0100, Linus Walleij wrote: > > On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König > > wrote: > > > > > Maybe we can make gpiod_get_optional look like this: > > > > > > if (!dev->of_node

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Dmitry Torokhov
On Thu, Mar 23, 2017 at 02:41:53PM +0100, Linus Walleij wrote: > On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König > wrote: > > > Maybe we can make gpiod_get_optional look like this: > > > > if (!dev->of_node && isnt_a_acpi_device(dev) && > >

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Dmitry Torokhov
On Thu, Mar 23, 2017 at 02:41:53PM +0100, Linus Walleij wrote: > On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König > wrote: > > > Maybe we can make gpiod_get_optional look like this: > > > > if (!dev->of_node && isnt_a_acpi_device(dev) && > > !IS_ENABLED(GPIOLIB)) > >

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Linus Walleij
On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König wrote: > Maybe we can make gpiod_get_optional look like this: > > if (!dev->of_node && isnt_a_acpi_device(dev) && !IS_ENABLED(GPIOLIB)) > return NULL; > else > return

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Linus Walleij
On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König wrote: > Maybe we can make gpiod_get_optional look like this: > > if (!dev->of_node && isnt_a_acpi_device(dev) && !IS_ENABLED(GPIOLIB)) > return NULL; > else > return -ENOSYS; > > I don't know how

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Linus Walleij
On Thu, Mar 23, 2017 at 11:10 AM, Uwe Kleine-König wrote: > So you exchanged many obvious and easy to fix problems with a few hard > ones. I don't agree that's a good idea, but you seem to be willing to > try it. Good luck. I think instead of going to sarcastic

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Linus Walleij
On Thu, Mar 23, 2017 at 11:10 AM, Uwe Kleine-König wrote: > So you exchanged many obvious and easy to fix problems with a few hard > ones. I don't agree that's a good idea, but you seem to be willing to > try it. Good luck. I think instead of going to sarcastic remarks you can say you NACK the

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Geert Uytterhoeven
Hi Uwe, On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König wrote: > On Thu, Mar 23, 2017 at 01:03:56PM +0100, Geert Uytterhoeven wrote: >> On Thu, Mar 23, 2017 at 12:11 PM, Uwe Kleine-König >> wrote: >> >> Make sure to enable all

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Geert Uytterhoeven
Hi Uwe, On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König wrote: > On Thu, Mar 23, 2017 at 01:03:56PM +0100, Geert Uytterhoeven wrote: >> On Thu, Mar 23, 2017 at 12:11 PM, Uwe Kleine-König >> wrote: >> >> Make sure to enable all drivers and subsystems you need when building >> >> your kernel.

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Uwe Kleine-König
On Thu, Mar 23, 2017 at 01:03:56PM +0100, Geert Uytterhoeven wrote: > Hi Uwe, > > On Thu, Mar 23, 2017 at 12:11 PM, Uwe Kleine-König > wrote: > >> Make sure to enable all drivers and subsystems you need when building > >> your kernel. That's always true. And may

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Uwe Kleine-König
On Thu, Mar 23, 2017 at 01:03:56PM +0100, Geert Uytterhoeven wrote: > Hi Uwe, > > On Thu, Mar 23, 2017 at 12:11 PM, Uwe Kleine-König > wrote: > >> Make sure to enable all drivers and subsystems you need when building > >> your kernel. That's always true. And may indeed be hard to debug (e.g.

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Geert Uytterhoeven
Hi Uwe, On Thu, Mar 23, 2017 at 12:11 PM, Uwe Kleine-König wrote: >> Make sure to enable all drivers and subsystems you need when building >> your kernel. That's always true. And may indeed be hard to debug (e.g. what >> kernel options do I need to make systemd

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Geert Uytterhoeven
Hi Uwe, On Thu, Mar 23, 2017 at 12:11 PM, Uwe Kleine-König wrote: >> Make sure to enable all drivers and subsystems you need when building >> your kernel. That's always true. And may indeed be hard to debug (e.g. what >> kernel options do I need to make systemd work?). > > It's worse here. If

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Uwe Kleine-König
Hello, On Thu, Mar 23, 2017 at 11:20:39AM +0100, Geert Uytterhoeven wrote: > But having the error breaks setups where the GPIO is optional and does > not exist. so the right way forward is to check harder in the situation where -ENOSYS was returned before to determine if there is really no GPIO

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Uwe Kleine-König
Hello, On Thu, Mar 23, 2017 at 11:20:39AM +0100, Geert Uytterhoeven wrote: > But having the error breaks setups where the GPIO is optional and does > not exist. so the right way forward is to check harder in the situation where -ENOSYS was returned before to determine if there is really no GPIO

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Geert Uytterhoeven
Hi Uwe, On Thu, Mar 23, 2017 at 11:10 AM, Uwe Kleine-König wrote: > On Thu, Mar 23, 2017 at 10:32:01AM +0100, Linus Walleij wrote: >> On Mon, Mar 20, 2017 at 12:07 PM, Uwe Kleine-König >> wrote: >> > On Mon, Mar 20, 2017 at

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Geert Uytterhoeven
Hi Uwe, On Thu, Mar 23, 2017 at 11:10 AM, Uwe Kleine-König wrote: > On Thu, Mar 23, 2017 at 10:32:01AM +0100, Linus Walleij wrote: >> On Mon, Mar 20, 2017 at 12:07 PM, Uwe Kleine-König >> wrote: >> > On Mon, Mar 20, 2017 at 11:38:52AM +0100, Geert Uytterhoeven wrote: >> >> On Mon, Mar 20, 2017

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Uwe Kleine-König
On Thu, Mar 23, 2017 at 10:32:01AM +0100, Linus Walleij wrote: > On Mon, Mar 20, 2017 at 12:07 PM, Uwe Kleine-König > wrote: > > Hello Geert, > > > > On Mon, Mar 20, 2017 at 11:38:52AM +0100, Geert Uytterhoeven wrote: > >> On Mon, Mar 20, 2017 at 11:31 AM, Uwe

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Uwe Kleine-König
On Thu, Mar 23, 2017 at 10:32:01AM +0100, Linus Walleij wrote: > On Mon, Mar 20, 2017 at 12:07 PM, Uwe Kleine-König > wrote: > > Hello Geert, > > > > On Mon, Mar 20, 2017 at 11:38:52AM +0100, Geert Uytterhoeven wrote: > >> On Mon, Mar 20, 2017 at 11:31 AM, Uwe Kleine-König > >> wrote: > >> > On

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Linus Walleij
On Mon, Mar 20, 2017 at 12:07 PM, Uwe Kleine-König wrote: > Hello Geert, > > On Mon, Mar 20, 2017 at 11:38:52AM +0100, Geert Uytterhoeven wrote: >> On Mon, Mar 20, 2017 at 11:31 AM, Uwe Kleine-König >> wrote: >> > On Mon, Mar 20,

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-23 Thread Linus Walleij
On Mon, Mar 20, 2017 at 12:07 PM, Uwe Kleine-König wrote: > Hello Geert, > > On Mon, Mar 20, 2017 at 11:38:52AM +0100, Geert Uytterhoeven wrote: >> On Mon, Mar 20, 2017 at 11:31 AM, Uwe Kleine-König >> wrote: >> > On Mon, Mar 20, 2017 at 10:56:14AM +0100, Geert Uytterhoeven wrote: >> >>

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-20 Thread Uwe Kleine-König
Hello Geert, On Mon, Mar 20, 2017 at 11:38:52AM +0100, Geert Uytterhoeven wrote: > On Mon, Mar 20, 2017 at 11:31 AM, Uwe Kleine-König > wrote: > > On Mon, Mar 20, 2017 at 10:56:14AM +0100, Geert Uytterhoeven wrote: > >> Documentation/gpio/consumer.txt rightfully

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-20 Thread Uwe Kleine-König
Hello Geert, On Mon, Mar 20, 2017 at 11:38:52AM +0100, Geert Uytterhoeven wrote: > On Mon, Mar 20, 2017 at 11:31 AM, Uwe Kleine-König > wrote: > > On Mon, Mar 20, 2017 at 10:56:14AM +0100, Geert Uytterhoeven wrote: > >> Documentation/gpio/consumer.txt rightfully sates: > >> | Note that

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-20 Thread Geert Uytterhoeven
Hi Uwe, On Mon, Mar 20, 2017 at 11:31 AM, Uwe Kleine-König wrote: > On Mon, Mar 20, 2017 at 10:56:14AM +0100, Geert Uytterhoeven wrote: >> Documentation/gpio/consumer.txt rightfully sates: >> | Note that gpio_get*_optional() functions (and their managed variants),

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-20 Thread Geert Uytterhoeven
Hi Uwe, On Mon, Mar 20, 2017 at 11:31 AM, Uwe Kleine-König wrote: > On Mon, Mar 20, 2017 at 10:56:14AM +0100, Geert Uytterhoeven wrote: >> Documentation/gpio/consumer.txt rightfully sates: >> | Note that gpio_get*_optional() functions (and their managed variants), >> unlike >> | the rest of

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-20 Thread Uwe Kleine-König
Hello Geert, On Mon, Mar 20, 2017 at 10:56:14AM +0100, Geert Uytterhoeven wrote: > Documentation/gpio/consumer.txt rightfully sates: > | Note that gpio_get*_optional() functions (and their managed variants), > unlike > | the rest of gpiolib API, also return NULL when gpiolib support is disabled.

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-20 Thread Uwe Kleine-König
Hello Geert, On Mon, Mar 20, 2017 at 10:56:14AM +0100, Geert Uytterhoeven wrote: > Documentation/gpio/consumer.txt rightfully sates: > | Note that gpio_get*_optional() functions (and their managed variants), > unlike > | the rest of gpiolib API, also return NULL when gpiolib support is disabled.

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-20 Thread Geert Uytterhoeven
On Mon, Mar 20, 2017 at 10:56 AM, Geert Uytterhoeven wrote: > drivers/tty/serial/serial_mctrl_gpio.o already compiles fine if > CONFIG_GPIOLIB=n, which reduces its size by ca. 25%. That is: after removing the #ifdef and dummies in serial_mctrl_gpio.h Gr{oetje,eeting}s,

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-20 Thread Geert Uytterhoeven
On Mon, Mar 20, 2017 at 10:56 AM, Geert Uytterhoeven wrote: > drivers/tty/serial/serial_mctrl_gpio.o already compiles fine if > CONFIG_GPIOLIB=n, which reduces its size by ca. 25%. That is: after removing the #ifdef and dummies in serial_mctrl_gpio.h Gr{oetje,eeting}s,

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-20 Thread Geert Uytterhoeven
Hi Linus, On Thu, Mar 16, 2017 at 5:38 PM, Geert Uytterhoeven wrote: >> They actually all even do things like this in Kconfig: >> >> config SERIAL_ATMEL >> (...) >> select SERIAL_MCTRL_GPIO if GPIOLIB >> >> What stops us from removing all the stubs in >>

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-20 Thread Geert Uytterhoeven
Hi Linus, On Thu, Mar 16, 2017 at 5:38 PM, Geert Uytterhoeven wrote: >> They actually all even do things like this in Kconfig: >> >> config SERIAL_ATMEL >> (...) >> select SERIAL_MCTRL_GPIO if GPIOLIB >> >> What stops us from removing all the stubs in >>

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-16 Thread Geert Uytterhoeven
Hi Linus, On Thu, Mar 16, 2017 at 4:18 PM, Linus Walleij wrote: > On Mon, Mar 6, 2017 at 11:02 AM, Uwe Kleine-König > wrote: >> On Mon, Mar 06, 2017 at 10:53:27AM +0100, Geert Uytterhoeven wrote: >>> On Mon, Mar 6, 2017 at 10:30 AM, Uwe

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-16 Thread Geert Uytterhoeven
Hi Linus, On Thu, Mar 16, 2017 at 4:18 PM, Linus Walleij wrote: > On Mon, Mar 6, 2017 at 11:02 AM, Uwe Kleine-König > wrote: >> On Mon, Mar 06, 2017 at 10:53:27AM +0100, Geert Uytterhoeven wrote: >>> On Mon, Mar 6, 2017 at 10:30 AM, Uwe Kleine-König >>> > I wouldn't want to code this in each

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-16 Thread Uwe Kleine-König
On Thu, Mar 16, 2017 at 04:18:52PM +0100, Linus Walleij wrote: > On Mon, Mar 6, 2017 at 11:02 AM, Uwe Kleine-König > wrote: > > On Mon, Mar 06, 2017 at 10:53:27AM +0100, Geert Uytterhoeven wrote: > >> On Mon, Mar 6, 2017 at 10:30 AM, Uwe Kleine-König > > >> > I

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-16 Thread Uwe Kleine-König
On Thu, Mar 16, 2017 at 04:18:52PM +0100, Linus Walleij wrote: > On Mon, Mar 6, 2017 at 11:02 AM, Uwe Kleine-König > wrote: > > On Mon, Mar 06, 2017 at 10:53:27AM +0100, Geert Uytterhoeven wrote: > >> On Mon, Mar 6, 2017 at 10:30 AM, Uwe Kleine-König > > >> > I wouldn't want to code this in each

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-16 Thread Linus Walleij
On Mon, Mar 6, 2017 at 11:02 AM, Uwe Kleine-König wrote: > On Mon, Mar 06, 2017 at 10:53:27AM +0100, Geert Uytterhoeven wrote: >> On Mon, Mar 6, 2017 at 10:30 AM, Uwe Kleine-König >> > I wouldn't want to code this in each driver (something like: >> > >> >

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-16 Thread Linus Walleij
On Mon, Mar 6, 2017 at 11:02 AM, Uwe Kleine-König wrote: > On Mon, Mar 06, 2017 at 10:53:27AM +0100, Geert Uytterhoeven wrote: >> On Mon, Mar 6, 2017 at 10:30 AM, Uwe Kleine-König >> > I wouldn't want to code this in each driver (something like: >> > >> > if (IS_ENABLED(GPIOLIB) ||

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-14 Thread Linus Walleij
On Mon, Mar 6, 2017 at 11:02 AM, Uwe Kleine-König wrote: >> Anyway, for sh-sci.c, platforms either have DT and GPIOLIB, or they do not >> need mctrl-gpio. > > So we're in agreement now that HALFGPIOLIB is the way to go? > Linus, what do you think? I'm too swamped

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-14 Thread Linus Walleij
On Mon, Mar 6, 2017 at 11:02 AM, Uwe Kleine-König wrote: >> Anyway, for sh-sci.c, platforms either have DT and GPIOLIB, or they do not >> need mctrl-gpio. > > So we're in agreement now that HALFGPIOLIB is the way to go? > Linus, what do you think? I'm too swamped in mail and work to figure this

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Geert Uytterhoeven
Hi Uwe, On Mon, Mar 6, 2017 at 10:30 AM, Uwe Kleine-König wrote: > On Mon, Mar 06, 2017 at 10:09:50AM +0100, Geert Uytterhoeven wrote: >> On Mon, Mar 6, 2017 at 9:58 AM, Uwe Kleine-König >> wrote: >> > On Mon, Mar 06, 2017 at

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Geert Uytterhoeven
Hi Uwe, On Mon, Mar 6, 2017 at 10:30 AM, Uwe Kleine-König wrote: > On Mon, Mar 06, 2017 at 10:09:50AM +0100, Geert Uytterhoeven wrote: >> On Mon, Mar 6, 2017 at 9:58 AM, Uwe Kleine-König >> wrote: >> > On Mon, Mar 06, 2017 at 09:49:39AM +0100, Geert Uytterhoeven wrote: >> >> > Given that

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Uwe Kleine-König
Cc += LinusW On Mon, Mar 06, 2017 at 10:53:27AM +0100, Geert Uytterhoeven wrote: > On Mon, Mar 6, 2017 at 10:30 AM, Uwe Kleine-König > wrote: > > On Mon, Mar 06, 2017 at 10:09:50AM +0100, Geert Uytterhoeven wrote: > >> On Mon, Mar 6, 2017 at 9:58 AM, Uwe

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Uwe Kleine-König
Cc += LinusW On Mon, Mar 06, 2017 at 10:53:27AM +0100, Geert Uytterhoeven wrote: > On Mon, Mar 6, 2017 at 10:30 AM, Uwe Kleine-König > wrote: > > On Mon, Mar 06, 2017 at 10:09:50AM +0100, Geert Uytterhoeven wrote: > >> On Mon, Mar 6, 2017 at 9:58 AM, Uwe Kleine-König > >> wrote: > >> > On Mon,

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Uwe Kleine-König
Hello Geert, On Mon, Mar 06, 2017 at 10:09:50AM +0100, Geert Uytterhoeven wrote: > On Mon, Mar 6, 2017 at 9:58 AM, Uwe Kleine-König > wrote: > > On Mon, Mar 06, 2017 at 09:49:39AM +0100, Geert Uytterhoeven wrote: > >> > Given that mctrl-gpio can be useful on

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Uwe Kleine-König
Hello Geert, On Mon, Mar 06, 2017 at 10:09:50AM +0100, Geert Uytterhoeven wrote: > On Mon, Mar 6, 2017 at 9:58 AM, Uwe Kleine-König > wrote: > > On Mon, Mar 06, 2017 at 09:49:39AM +0100, Geert Uytterhoeven wrote: > >> > Given that mctrl-gpio can be useful on legacy platforms, a device could > >>

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Geert Uytterhoeven
Hi Uwe, On Mon, Mar 6, 2017 at 9:58 AM, Uwe Kleine-König wrote: > On Mon, Mar 06, 2017 at 09:49:39AM +0100, Geert Uytterhoeven wrote: >> > Given that mctrl-gpio can be useful on legacy platforms, a device could >> > silently run without cts-gpio even there. >> >>

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Geert Uytterhoeven
Hi Uwe, On Mon, Mar 6, 2017 at 9:58 AM, Uwe Kleine-König wrote: > On Mon, Mar 06, 2017 at 09:49:39AM +0100, Geert Uytterhoeven wrote: >> > Given that mctrl-gpio can be useful on legacy platforms, a device could >> > silently run without cts-gpio even there. >> >> On platforms were

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Uwe Kleine-König
Hello Geert, On Mon, Mar 06, 2017 at 09:49:39AM +0100, Geert Uytterhoeven wrote: > > Given that mctrl-gpio can be useful on legacy platforms, a device could > > silently run without cts-gpio even there. > > On platforms were CONFIG_GPIOLIB=n, this is not true, so the issue is moot. > > All

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Uwe Kleine-König
Hello Geert, On Mon, Mar 06, 2017 at 09:49:39AM +0100, Geert Uytterhoeven wrote: > > Given that mctrl-gpio can be useful on legacy platforms, a device could > > silently run without cts-gpio even there. > > On platforms were CONFIG_GPIOLIB=n, this is not true, so the issue is moot. > > All

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Geert Uytterhoeven
Hi Uwe, On Sat, Mar 4, 2017 at 6:48 PM, Uwe Kleine-König wrote: > Cc += linux-g...@vger.kernel.org > > On Sat, Mar 04, 2017 at 04:35:46PM +0100, Geert Uytterhoeven wrote: >> On Fri, Mar 3, 2017 at 8:44 PM, Uwe Kleine-König >>

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-06 Thread Geert Uytterhoeven
Hi Uwe, On Sat, Mar 4, 2017 at 6:48 PM, Uwe Kleine-König wrote: > Cc += linux-g...@vger.kernel.org > > On Sat, Mar 04, 2017 at 04:35:46PM +0100, Geert Uytterhoeven wrote: >> On Fri, Mar 3, 2017 at 8:44 PM, Uwe Kleine-König >> wrote: >> > On Fri, Mar 03, 2017 at 08:21:05PM +0100, Geert

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-04 Thread Uwe Kleine-König
Hello, Cc += linux-g...@vger.kernel.org On Sat, Mar 04, 2017 at 04:35:46PM +0100, Geert Uytterhoeven wrote: > On Fri, Mar 3, 2017 at 8:44 PM, Uwe Kleine-König > wrote: > > On Fri, Mar 03, 2017 at 08:21:05PM +0100, Geert Uytterhoeven wrote: > >> > diff --git

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-04 Thread Uwe Kleine-König
Hello, Cc += linux-g...@vger.kernel.org On Sat, Mar 04, 2017 at 04:35:46PM +0100, Geert Uytterhoeven wrote: > On Fri, Mar 3, 2017 at 8:44 PM, Uwe Kleine-König > wrote: > > On Fri, Mar 03, 2017 at 08:21:05PM +0100, Geert Uytterhoeven wrote: > >> > diff --git a/drivers/tty/serial/sh-sci.c

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-04 Thread Geert Uytterhoeven
Hi Uwe, On Fri, Mar 3, 2017 at 8:44 PM, Uwe Kleine-König wrote: > On Fri, Mar 03, 2017 at 08:21:05PM +0100, Geert Uytterhoeven wrote: >> > diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c >> > index 91e7dddbf72c..2f4cdd4e7b4f 100644 >> > ---

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-04 Thread Geert Uytterhoeven
Hi Uwe, On Fri, Mar 3, 2017 at 8:44 PM, Uwe Kleine-König wrote: > On Fri, Mar 03, 2017 at 08:21:05PM +0100, Geert Uytterhoeven wrote: >> > diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c >> > index 91e7dddbf72c..2f4cdd4e7b4f 100644 >> > --- a/drivers/tty/serial/sh-sci.c >>

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-03 Thread Uwe Kleine-König
Hello Geert, On Fri, Mar 03, 2017 at 08:21:05PM +0100, Geert Uytterhoeven wrote: > > diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c > > index 91e7dddbf72c..2f4cdd4e7b4f 100644 > > --- a/drivers/tty/serial/sh-sci.c > > +++ b/drivers/tty/serial/sh-sci.c > > @@ -3022,7

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-03 Thread Uwe Kleine-König
Hello Geert, On Fri, Mar 03, 2017 at 08:21:05PM +0100, Geert Uytterhoeven wrote: > > diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c > > index 91e7dddbf72c..2f4cdd4e7b4f 100644 > > --- a/drivers/tty/serial/sh-sci.c > > +++ b/drivers/tty/serial/sh-sci.c > > @@ -3022,7

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-03 Thread Geert Uytterhoeven
Hi Uwe, On Fri, Mar 3, 2017 at 8:12 PM, Uwe Kleine-König wrote: > On Fri, Mar 03, 2017 at 07:58:36PM +0100, Geert Uytterhoeven wrote: >> On Fri, Mar 3, 2017 at 3:22 PM, Richard Genoud >> wrote: >> > Since commit 1d267ea6539f ("serial:

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-03 Thread Geert Uytterhoeven
Hi Uwe, On Fri, Mar 3, 2017 at 8:12 PM, Uwe Kleine-König wrote: > On Fri, Mar 03, 2017 at 07:58:36PM +0100, Geert Uytterhoeven wrote: >> On Fri, Mar 3, 2017 at 3:22 PM, Richard Genoud >> wrote: >> > Since commit 1d267ea6539f ("serial: mctrl-gpio: simplify init routine"), >> > the

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-03 Thread Uwe Kleine-König
On Fri, Mar 03, 2017 at 07:58:36PM +0100, Geert Uytterhoeven wrote: > Hi Richard, > > On Fri, Mar 3, 2017 at 3:22 PM, Richard Genoud > wrote: > > Since commit 1d267ea6539f ("serial: mctrl-gpio: simplify init routine"), > > the mctrl_gpio_to_gpiod() function can't

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-03 Thread Uwe Kleine-König
On Fri, Mar 03, 2017 at 07:58:36PM +0100, Geert Uytterhoeven wrote: > Hi Richard, > > On Fri, Mar 3, 2017 at 3:22 PM, Richard Genoud > wrote: > > Since commit 1d267ea6539f ("serial: mctrl-gpio: simplify init routine"), > > the mctrl_gpio_to_gpiod() function can't return an error anymore. > >

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-03 Thread Geert Uytterhoeven
Hi Richard, On Fri, Mar 3, 2017 at 3:22 PM, Richard Genoud wrote: > Since commit 1d267ea6539f ("serial: mctrl-gpio: simplify init routine"), > the mctrl_gpio_to_gpiod() function can't return an error anymore. > So, just testing for a NULL pointer is ok. If

Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-03 Thread Geert Uytterhoeven
Hi Richard, On Fri, Mar 3, 2017 at 3:22 PM, Richard Genoud wrote: > Since commit 1d267ea6539f ("serial: mctrl-gpio: simplify init routine"), > the mctrl_gpio_to_gpiod() function can't return an error anymore. > So, just testing for a NULL pointer is ok. If CONFIG_GPIOLIB=n,

[PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-03 Thread Richard Genoud
Since commit 1d267ea6539f ("serial: mctrl-gpio: simplify init routine"), the mctrl_gpio_to_gpiod() function can't return an error anymore. So, just testing for a NULL pointer is ok. Signed-off-by: Richard Genoud --- drivers/tty/serial/sh-sci.c | 12 +--- 1 file

[PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

2017-03-03 Thread Richard Genoud
Since commit 1d267ea6539f ("serial: mctrl-gpio: simplify init routine"), the mctrl_gpio_to_gpiod() function can't return an error anymore. So, just testing for a NULL pointer is ok. Signed-off-by: Richard Genoud --- drivers/tty/serial/sh-sci.c | 12 +--- 1 file changed, 5 insertions(+),