All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the gpio tree
@ 2017-02-08  5:11 Stephen Rothwell
  2017-02-08  8:48 ` Lee Jones
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Stephen Rothwell @ 2017-02-08  5:11 UTC (permalink / raw)
  To: Linus Walleij, Greg KH
  Cc: linux-next, linux-kernel, Lee Jones, Boris Brezillon,
	Alexander Stein, Andy Shevchenko

Hi Linus,

After merging the gpio tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

drivers/tty/serial/st-asc.c: In function 'asc_set_termios':
drivers/tty/serial/st-asc.c:578:12: error: implicit declaration of function 'devm_get_gpiod_from_child' [-Werror=implicit-function-declaration]
    gpiod = devm_get_gpiod_from_child(port->dev, "rts",
            ^
drivers/tty/serial/st-asc.c:578:10: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    gpiod = devm_get_gpiod_from_child(port->dev, "rts",
          ^

Caused by commits

  a264d10ff45c ("gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO")
  b2987d7438e0 ("gpio: Pass GPIO label down to gpiod_request")
  4b0947974e59 ("gpio: Rename devm_get_gpiod_from_child()")

interacting with commit

  d7356256488c ("serial: st-asc: (De)Register GPIOD and swap Pinctrl profiles")

from the tty tree.

I applied the following merge fix patch (I guessed about the new arguments):

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 8 Feb 2017 15:50:22 +1100
Subject: [PATCH] serial: st-asc: merge fix for devm_get_gpiod_from_child rename

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/tty/serial/st-asc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index bcf1d33e6ffe..c02e6b089364 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -575,8 +575,11 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,
 			pinctrl_select_state(ascport->pinctrl,
 					     ascport->states[NO_HW_FLOWCTRL]);
 
-			gpiod =	devm_get_gpiod_from_child(port->dev, "rts",
-							  &np->fwnode);
+			gpiod =	devm_fwnode_get_gpiod_from_child(port->dev,
+								 "rts",
+								 &np->fwnode,
+								 GPIOD_IN,
+								 np->name);
 			if (!IS_ERR(gpiod)) {
 				gpiod_direction_output(gpiod, 0);
 				ascport->rts = gpiod;
-- 
2.10.2

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build failure after merge of the gpio tree
  2017-02-08  5:11 linux-next: build failure after merge of the gpio tree Stephen Rothwell
@ 2017-02-08  8:48 ` Lee Jones
  2017-02-08  9:05   ` Boris Brezillon
  2017-02-08 10:30   ` Stephen Rothwell
  2017-02-08  9:24 ` [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Lee Jones
  2017-02-13 15:18 ` linux-next: build failure after merge of the gpio tree Linus Walleij
  2 siblings, 2 replies; 16+ messages in thread
From: Lee Jones @ 2017-02-08  8:48 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus Walleij, Greg KH, linux-next, linux-kernel,
	Boris Brezillon, Alexander Stein, Andy Shevchenko

On Wed, 08 Feb 2017, Stephen Rothwell wrote:

> Hi Linus,

I believe this patch would need to go in via Greg's tree.

(see below)

> After merging the gpio tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
> 
> drivers/tty/serial/st-asc.c: In function 'asc_set_termios':
> drivers/tty/serial/st-asc.c:578:12: error: implicit declaration of function 'devm_get_gpiod_from_child' [-Werror=implicit-function-declaration]
>     gpiod = devm_get_gpiod_from_child(port->dev, "rts",
>             ^
> drivers/tty/serial/st-asc.c:578:10: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
>     gpiod = devm_get_gpiod_from_child(port->dev, "rts",
>           ^
> 
> Caused by commits
> 
>   a264d10ff45c ("gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO")
>   b2987d7438e0 ("gpio: Pass GPIO label down to gpiod_request")
>   4b0947974e59 ("gpio: Rename devm_get_gpiod_from_child()")
> 
> interacting with commit
> 
>   d7356256488c ("serial: st-asc: (De)Register GPIOD and swap Pinctrl profiles")
> 
> from the tty tree.
> 
> I applied the following merge fix patch (I guessed about the new arguments):
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 8 Feb 2017 15:50:22 +1100
> Subject: [PATCH] serial: st-asc: merge fix for devm_get_gpiod_from_child rename
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/tty/serial/st-asc.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
> index bcf1d33e6ffe..c02e6b089364 100644
> --- a/drivers/tty/serial/st-asc.c
> +++ b/drivers/tty/serial/st-asc.c
> @@ -575,8 +575,11 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,
>  			pinctrl_select_state(ascport->pinctrl,
>  					     ascport->states[NO_HW_FLOWCTRL]);
>  
> -			gpiod =	devm_get_gpiod_from_child(port->dev, "rts",
> -							  &np->fwnode);
> +			gpiod =	devm_fwnode_get_gpiod_from_child(port->dev,
> +								 "rts",
> +								 &np->fwnode,
> +								 GPIOD_IN,

GPIOD_OUT

> +								 np->name);
>  			if (!IS_ERR(gpiod)) {
>  				gpiod_direction_output(gpiod, 0);
>  				ascport->rts = gpiod;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: linux-next: build failure after merge of the gpio tree
  2017-02-08  8:48 ` Lee Jones
@ 2017-02-08  9:05   ` Boris Brezillon
  2017-02-08 10:30   ` Stephen Rothwell
  1 sibling, 0 replies; 16+ messages in thread
From: Boris Brezillon @ 2017-02-08  9:05 UTC (permalink / raw)
  To: Lee Jones
  Cc: Stephen Rothwell, Linus Walleij, Greg KH, linux-next,
	linux-kernel, Alexander Stein, Andy Shevchenko

On Wed, 8 Feb 2017 08:48:54 +0000
Lee Jones <lee.jones@linaro.org> wrote:

> On Wed, 08 Feb 2017, Stephen Rothwell wrote:
> 
> > Hi Linus,  
> 
> I believe this patch would need to go in via Greg's tree.
> 
> (see below)
> 
> > After merging the gpio tree, today's linux-next build (arm
> > multi_v7_defconfig) failed like this:
> > 
> > drivers/tty/serial/st-asc.c: In function 'asc_set_termios':
> > drivers/tty/serial/st-asc.c:578:12: error: implicit declaration of function 'devm_get_gpiod_from_child' [-Werror=implicit-function-declaration]
> >     gpiod = devm_get_gpiod_from_child(port->dev, "rts",
> >             ^
> > drivers/tty/serial/st-asc.c:578:10: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
> >     gpiod = devm_get_gpiod_from_child(port->dev, "rts",
> >           ^
> > 
> > Caused by commits
> > 
> >   a264d10ff45c ("gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO")
> >   b2987d7438e0 ("gpio: Pass GPIO label down to gpiod_request")
> >   4b0947974e59 ("gpio: Rename devm_get_gpiod_from_child()")
> > 
> > interacting with commit
> > 
> >   d7356256488c ("serial: st-asc: (De)Register GPIOD and swap Pinctrl profiles")
> > 
> > from the tty tree.
> > 
> > I applied the following merge fix patch (I guessed about the new arguments):
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Wed, 8 Feb 2017 15:50:22 +1100
> > Subject: [PATCH] serial: st-asc: merge fix for devm_get_gpiod_from_child rename
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >  drivers/tty/serial/st-asc.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
> > index bcf1d33e6ffe..c02e6b089364 100644
> > --- a/drivers/tty/serial/st-asc.c
> > +++ b/drivers/tty/serial/st-asc.c
> > @@ -575,8 +575,11 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,
> >  			pinctrl_select_state(ascport->pinctrl,
> >  					     ascport->states[NO_HW_FLOWCTRL]);
> >  
> > -			gpiod =	devm_get_gpiod_from_child(port->dev, "rts",
> > -							  &np->fwnode);
> > +			gpiod =	devm_fwnode_get_gpiod_from_child(port->dev,
> > +								 "rts",
> > +								 &np->fwnode,
> > +								 GPIOD_IN,  
> 
> GPIOD_OUT

I think it should be GPIOD_OUT_LOW ...

> 
> > +								 np->name);
> >  			if (!IS_ERR(gpiod)) {
> >  				gpiod_direction_output(gpiod, 0);

... and you should drop this call to gpiod_direction_output().

> >  				ascport->rts = gpiod;  
> 

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

* [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
  2017-02-08  5:11 linux-next: build failure after merge of the gpio tree Stephen Rothwell
  2017-02-08  8:48 ` Lee Jones
@ 2017-02-08  9:24 ` Lee Jones
  2017-02-08 13:00   ` Greg KH
  2017-02-08 13:48   ` kbuild test robot
  2017-02-13 15:18 ` linux-next: build failure after merge of the gpio tree Linus Walleij
  2 siblings, 2 replies; 16+ messages in thread
From: Lee Jones @ 2017-02-08  9:24 UTC (permalink / raw)
  To: Stephen Rothwell, Greg KH
  Cc: Linus Walleij, linux-next, linux-kernel, Boris Brezillon,
	Alexander Stein, Andy Shevchenko

The commits mentioned below adapt the GPIO API to allow more information
to be passed directly through devm_get_gpiod_from_child() in the first
instance.  This facilitates the removal of subsequent calls, such as
gpiod_direction_output().  This patch firstly moves to utilise the new
API and secondly removes the now superfluous call do set the direction.

Fixes: a264d10ff45c ("gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO")
Fixes: b2987d7438e0 ("gpio: Pass GPIO label down to gpiod_request")
Fixes: 4b0947974e59 ("gpio: Rename devm_get_gpiod_from_child()")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/tty/serial/st-asc.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index bcf1d33..c334bcc 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -575,12 +575,13 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,
 			pinctrl_select_state(ascport->pinctrl,
 					     ascport->states[NO_HW_FLOWCTRL]);
 
-			gpiod =	devm_get_gpiod_from_child(port->dev, "rts",
-							  &np->fwnode);
-			if (!IS_ERR(gpiod)) {
-				gpiod_direction_output(gpiod, 0);
+			gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
+								 "rts",
+								 &np->fwnode,
+								 GPIOD_OUT_LOW,
+								 np->name);
+			if (!IS_ERR(gpiod))
 				ascport->rts = gpiod;
-			}
 		}
 	}
 
-- 
2.9.3

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

* Re: linux-next: build failure after merge of the gpio tree
  2017-02-08  8:48 ` Lee Jones
  2017-02-08  9:05   ` Boris Brezillon
@ 2017-02-08 10:30   ` Stephen Rothwell
  1 sibling, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2017-02-08 10:30 UTC (permalink / raw)
  To: Lee Jones
  Cc: Linus Walleij, Greg KH, linux-next, linux-kernel,
	Boris Brezillon, Alexander Stein, Andy Shevchenko

Hi Lee,

On Wed, 8 Feb 2017 08:48:54 +0000 Lee Jones <lee.jones@linaro.org> wrote:
>
> On Wed, 08 Feb 2017, Stephen Rothwell wrote:
> 
> > Hi Linus,  
> 
> I believe this patch would need to go in via Greg's tree.

Except his tree does not have the rename and extra arguments for
devm_get_gpiod_from_child(), so it can't unless he merges (part of) the
gpio tree as well ...

-- 
Cheers,
Stephen Rothwell

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

* Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
  2017-02-08  9:24 ` [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Lee Jones
@ 2017-02-08 13:00   ` Greg KH
  2017-02-09  8:21     ` Lee Jones
  2017-02-21 10:26     ` Linus Walleij
  2017-02-08 13:48   ` kbuild test robot
  1 sibling, 2 replies; 16+ messages in thread
From: Greg KH @ 2017-02-08 13:00 UTC (permalink / raw)
  To: Lee Jones
  Cc: Stephen Rothwell, Linus Walleij, linux-next, linux-kernel,
	Boris Brezillon, Alexander Stein, Andy Shevchenko

On Wed, Feb 08, 2017 at 09:24:25AM +0000, Lee Jones wrote:
> The commits mentioned below adapt the GPIO API to allow more information
> to be passed directly through devm_get_gpiod_from_child() in the first
> instance.  This facilitates the removal of subsequent calls, such as
> gpiod_direction_output().  This patch firstly moves to utilise the new
> API and secondly removes the now superfluous call do set the direction.
> 
> Fixes: a264d10ff45c ("gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO")
> Fixes: b2987d7438e0 ("gpio: Pass GPIO label down to gpiod_request")
> Fixes: 4b0947974e59 ("gpio: Rename devm_get_gpiod_from_child()")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/tty/serial/st-asc.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
> index bcf1d33..c334bcc 100644
> --- a/drivers/tty/serial/st-asc.c
> +++ b/drivers/tty/serial/st-asc.c
> @@ -575,12 +575,13 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,
>  			pinctrl_select_state(ascport->pinctrl,
>  					     ascport->states[NO_HW_FLOWCTRL]);
>  
> -			gpiod =	devm_get_gpiod_from_child(port->dev, "rts",
> -							  &np->fwnode);
> -			if (!IS_ERR(gpiod)) {
> -				gpiod_direction_output(gpiod, 0);
> +			gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
> +								 "rts",
> +								 &np->fwnode,
> +								 GPIOD_OUT_LOW,
> +								 np->name);

I can't apply this :(

Usually, when you move apis around, you add it, then convert it, wait a
kernel release, then remove the old one.  That allows for issues like
this when new code is added in one maintainer's branch but not yours.

So how about reverting your "drop the function" patch and then wait for
-rc2 to really remove it?

thanks,

greg k-h

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

* Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
  2017-02-08  9:24 ` [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Lee Jones
  2017-02-08 13:00   ` Greg KH
@ 2017-02-08 13:48   ` kbuild test robot
  2017-02-08 16:31     ` Andy Shevchenko
  1 sibling, 1 reply; 16+ messages in thread
From: kbuild test robot @ 2017-02-08 13:48 UTC (permalink / raw)
  To: Lee Jones
  Cc: kbuild-all, Stephen Rothwell, Greg KH, Linus Walleij, linux-next,
	linux-kernel, Boris Brezillon, Alexander Stein, Andy Shevchenko

[-- Attachment #1: Type: text/plain, Size: 1841 bytes --]

Hi Lee,

[auto build test ERROR on tty/tty-testing]
[cannot apply to v4.10-rc7 next-20170208]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Lee-Jones/serial-st-asc-Use-new-GPIOD-API-to-obtain-RTS-pin/20170208-180609
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/tty/serial/st-asc.c: In function 'asc_set_termios':
>> drivers/tty/serial/st-asc.c:578:12: error: implicit declaration of function 'devm_fwnode_get_gpiod_from_child' [-Werror=implicit-function-declaration]
       gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/tty/serial/st-asc.c:578:10: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
       gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
             ^
   cc1: some warnings being treated as errors

vim +/devm_fwnode_get_gpiod_from_child +578 drivers/tty/serial/st-asc.c

   572		} else {
   573			/* If flow-control disabled, it's safe to handle RTS manually */
   574			if (!ascport->rts && ascport->states[NO_HW_FLOWCTRL]) {
   575				pinctrl_select_state(ascport->pinctrl,
   576						     ascport->states[NO_HW_FLOWCTRL]);
   577	
 > 578				gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
   579									 "rts",
   580									 &np->fwnode,
   581									 GPIOD_OUT_LOW,

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 57826 bytes --]

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

* Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
  2017-02-08 13:48   ` kbuild test robot
@ 2017-02-08 16:31     ` Andy Shevchenko
  2017-02-08 17:47       ` Greg KH
  0 siblings, 1 reply; 16+ messages in thread
From: Andy Shevchenko @ 2017-02-08 16:31 UTC (permalink / raw)
  To: kbuild test robot, Lee Jones
  Cc: kbuild-all, Stephen Rothwell, Greg KH, Linus Walleij, linux-next,
	linux-kernel, Boris Brezillon, Alexander Stein

On Wed, 2017-02-08 at 21:48 +0800, kbuild test robot wrote:
> Hi Lee,
> 
> [auto build test ERROR on tty/tty-testing]
> [cannot apply to v4.10-rc7 next-20170208]
> [if your patch is applied to the wrong git tree, please drop us a note
> to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Lee-Jones/serial-st-a
> sc-Use-new-GPIOD-API-to-obtain-RTS-pin/20170208-180609
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
>  tty-testing
> config: x86_64-allmodconfig (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64 
> 

It requires to have immutable branch in one of the subsystem which the
other one can pull.

> All errors (new ones prefixed by >>):
> 
>    drivers/tty/serial/st-asc.c: In function 'asc_set_termios':
> > > drivers/tty/serial/st-asc.c:578:12: error: implicit declaration of
> > > function 'devm_fwnode_get_gpiod_from_child' [-Werror=implicit-
> > > function-declaration]
> 
>        gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
>                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    drivers/tty/serial/st-asc.c:578:10: warning: assignment makes
> pointer from integer without a cast [-Wint-conversion]
>        gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
>              ^
>    cc1: some warnings being treated as errors
> 
> vim +/devm_fwnode_get_gpiod_from_child +578 drivers/tty/serial/st-
> asc.c
> 
>    572		} else {
>    573			/* If flow-control disabled, it's safe
> to handle RTS manually */
>    574			if (!ascport->rts && ascport-
> >states[NO_HW_FLOWCTRL]) {
>    575				pinctrl_select_state(ascport-
> >pinctrl,
>    576						     ascport-
> >states[NO_HW_FLOWCTRL]);
>    577	
>  > 578				gpiod =
> devm_fwnode_get_gpiod_from_child(port->dev,
>    579									
>  "rts",
>    580									
>  &np->fwnode,
>    581									
>  GPIOD_OUT_LOW,
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology
> Center
> https://lists.01.org/pipermail/kbuild-all                   Intel
> Corporation

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
  2017-02-08 16:31     ` Andy Shevchenko
@ 2017-02-08 17:47       ` Greg KH
  2017-02-08 19:42         ` Andy Shevchenko
  0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2017-02-08 17:47 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kbuild test robot, Lee Jones, kbuild-all, Stephen Rothwell,
	Linus Walleij, linux-next, linux-kernel, Boris Brezillon,
	Alexander Stein

On Wed, Feb 08, 2017 at 06:31:10PM +0200, Andy Shevchenko wrote:
> On Wed, 2017-02-08 at 21:48 +0800, kbuild test robot wrote:
> > Hi Lee,
> > 
> > [auto build test ERROR on tty/tty-testing]
> > [cannot apply to v4.10-rc7 next-20170208]
> > [if your patch is applied to the wrong git tree, please drop us a note
> > to help improve the system]
> > 
> > url:    https://github.com/0day-ci/linux/commits/Lee-Jones/serial-st-a
> > sc-Use-new-GPIOD-API-to-obtain-RTS-pin/20170208-180609
> > base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
> >  tty-testing
> > config: x86_64-allmodconfig (attached as .config)
> > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> > reproduce:
> >         # save the attached .config to linux build tree
> >         make ARCH=x86_64 
> > 
> 
> It requires to have immutable branch in one of the subsystem which the
> other one can pull.

Which sucks, and is why you should not do api changes this way!

greg k-h

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

* Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
  2017-02-08 17:47       ` Greg KH
@ 2017-02-08 19:42         ` Andy Shevchenko
  2017-02-08 21:24           ` Stephen Rothwell
  0 siblings, 1 reply; 16+ messages in thread
From: Andy Shevchenko @ 2017-02-08 19:42 UTC (permalink / raw)
  To: Greg KH
  Cc: kbuild test robot, Lee Jones, kbuild-all, Stephen Rothwell,
	Linus Walleij, linux-next, linux-kernel, Boris Brezillon,
	Alexander Stein

On Wed, 2017-02-08 at 18:47 +0100, Greg KH wrote:
> On Wed, Feb 08, 2017 at 06:31:10PM +0200, Andy Shevchenko wrote:
> > On Wed, 2017-02-08 at 21:48 +0800, kbuild test robot wrote:
> > > Hi Lee,
> > > 
> > > [auto build test ERROR on tty/tty-testing]
> > > [cannot apply to v4.10-rc7 next-20170208]
> > > [if your patch is applied to the wrong git tree, please drop us a
> > > note
> > > to help improve the system]
> > > 
> > > url:    https://github.com/0day-ci/linux/commits/Lee-Jones/serial-
> > > st-a
> > > sc-Use-new-GPIOD-API-to-obtain-RTS-pin/20170208-180609
> > > base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
> > > .git
> > >  tty-testing
> > > config: x86_64-allmodconfig (attached as .config)
> > > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> > > reproduce:
> > >         # save the attached .config to linux build tree
> > >         make ARCH=x86_64 
> > > 
> > 
> > It requires to have immutable branch in one of the subsystem which
> > the
> > other one can pull.
> 
> Which sucks, and is why you should not do api changes this way!

Not only me :-)

If above will not work we may do something like below for this cycle:

static inline ... devm_get_gpiod_from_child()
{
 return devm_fwnode_get_gpiod_from_child(..., GPIO_AS_IS, "?");
}

in GPIO tree.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
  2017-02-08 19:42         ` Andy Shevchenko
@ 2017-02-08 21:24           ` Stephen Rothwell
  0 siblings, 0 replies; 16+ messages in thread
From: Stephen Rothwell @ 2017-02-08 21:24 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Greg KH, kbuild test robot, Lee Jones, kbuild-all, Linus Walleij,
	linux-next, linux-kernel, Boris Brezillon, Alexander Stein

Hi all,

On Wed, 08 Feb 2017 21:42:47 +0200 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
>
> On Wed, 2017-02-08 at 18:47 +0100, Greg KH wrote:
> > On Wed, Feb 08, 2017 at 06:31:10PM +0200, Andy Shevchenko wrote:  
> > > 
> > > It requires to have immutable branch in one of the subsystem which
> > > the
> > > other one can pull.  
> > 
> > Which sucks, and is why you should not do api changes this way!  
> 
> Not only me :-)
> 
> If above will not work we may do something like below for this cycle:
> 
> static inline ... devm_get_gpiod_from_child()
> {
>  return devm_fwnode_get_gpiod_from_child(..., GPIO_AS_IS, "?");
> }
> 
> in GPIO tree.

I will use Lee's patch as a merge resolution when I merge the gpio
tree (as that is later in my list) from now on.  All that has to happen
now is that whichever tree is merged last by Linus (Torvalds) has to
have this same merge resolution applied.

In general, it is better if API changes can be done either as Greg
suggested or with a separate immutable topic branch merged into
whichever trees need it, but it doesn't happen that way very often, so
this is what we generally do.

-- 
Cheers,
Stephen Rothwell

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

* Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
  2017-02-08 13:00   ` Greg KH
@ 2017-02-09  8:21     ` Lee Jones
  2017-02-09  8:51       ` Greg KH
  2017-02-21 10:26     ` Linus Walleij
  1 sibling, 1 reply; 16+ messages in thread
From: Lee Jones @ 2017-02-09  8:21 UTC (permalink / raw)
  To: Greg KH
  Cc: Stephen Rothwell, Linus Walleij, linux-next, linux-kernel,
	Boris Brezillon, Alexander Stein, Andy Shevchenko

On Wed, 08 Feb 2017, Greg KH wrote:

> On Wed, Feb 08, 2017 at 09:24:25AM +0000, Lee Jones wrote:
> > The commits mentioned below adapt the GPIO API to allow more information
> > to be passed directly through devm_get_gpiod_from_child() in the first
> > instance.  This facilitates the removal of subsequent calls, such as
> > gpiod_direction_output().  This patch firstly moves to utilise the new
> > API and secondly removes the now superfluous call do set the direction.
> > 
> > Fixes: a264d10ff45c ("gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO")
> > Fixes: b2987d7438e0 ("gpio: Pass GPIO label down to gpiod_request")
> > Fixes: 4b0947974e59 ("gpio: Rename devm_get_gpiod_from_child()")
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  drivers/tty/serial/st-asc.c | 11 ++++++-----
> >  1 file changed, 6 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
> > index bcf1d33..c334bcc 100644
> > --- a/drivers/tty/serial/st-asc.c
> > +++ b/drivers/tty/serial/st-asc.c
> > @@ -575,12 +575,13 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,
> >  			pinctrl_select_state(ascport->pinctrl,
> >  					     ascport->states[NO_HW_FLOWCTRL]);
> >  
> > -			gpiod =	devm_get_gpiod_from_child(port->dev, "rts",
> > -							  &np->fwnode);
> > -			if (!IS_ERR(gpiod)) {
> > -				gpiod_direction_output(gpiod, 0);
> > +			gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
> > +								 "rts",
> > +								 &np->fwnode,
> > +								 GPIOD_OUT_LOW,
> > +								 np->name);
> 
> I can't apply this :(
> 
> Usually, when you move apis around, you add it, then convert it, wait a
> kernel release, then remove the old one.  That allows for issues like
> this when new code is added in one maintainer's branch but not yours.
> 
> So how about reverting your "drop the function" patch and then wait for
> -rc2 to really remove it?

I assume this is a question for LinusW?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
  2017-02-09  8:21     ` Lee Jones
@ 2017-02-09  8:51       ` Greg KH
  2017-02-13  9:59         ` Lee Jones
  0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2017-02-09  8:51 UTC (permalink / raw)
  To: Lee Jones
  Cc: Stephen Rothwell, Linus Walleij, linux-next, linux-kernel,
	Boris Brezillon, Alexander Stein, Andy Shevchenko

On Thu, Feb 09, 2017 at 08:21:50AM +0000, Lee Jones wrote:
> On Wed, 08 Feb 2017, Greg KH wrote:
> 
> > On Wed, Feb 08, 2017 at 09:24:25AM +0000, Lee Jones wrote:
> > > The commits mentioned below adapt the GPIO API to allow more information
> > > to be passed directly through devm_get_gpiod_from_child() in the first
> > > instance.  This facilitates the removal of subsequent calls, such as
> > > gpiod_direction_output().  This patch firstly moves to utilise the new
> > > API and secondly removes the now superfluous call do set the direction.
> > > 
> > > Fixes: a264d10ff45c ("gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO")
> > > Fixes: b2987d7438e0 ("gpio: Pass GPIO label down to gpiod_request")
> > > Fixes: 4b0947974e59 ("gpio: Rename devm_get_gpiod_from_child()")
> > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > ---
> > >  drivers/tty/serial/st-asc.c | 11 ++++++-----
> > >  1 file changed, 6 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
> > > index bcf1d33..c334bcc 100644
> > > --- a/drivers/tty/serial/st-asc.c
> > > +++ b/drivers/tty/serial/st-asc.c
> > > @@ -575,12 +575,13 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,
> > >  			pinctrl_select_state(ascport->pinctrl,
> > >  					     ascport->states[NO_HW_FLOWCTRL]);
> > >  
> > > -			gpiod =	devm_get_gpiod_from_child(port->dev, "rts",
> > > -							  &np->fwnode);
> > > -			if (!IS_ERR(gpiod)) {
> > > -				gpiod_direction_output(gpiod, 0);
> > > +			gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
> > > +								 "rts",
> > > +								 &np->fwnode,
> > > +								 GPIOD_OUT_LOW,
> > > +								 np->name);
> > 
> > I can't apply this :(
> > 
> > Usually, when you move apis around, you add it, then convert it, wait a
> > kernel release, then remove the old one.  That allows for issues like
> > this when new code is added in one maintainer's branch but not yours.
> > 
> > So how about reverting your "drop the function" patch and then wait for
> > -rc2 to really remove it?
> 
> I assume this is a question for LinusW?

It's for whom ever is causing this breakage by removing an api in this
manner.

greg k-h

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

* Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
  2017-02-09  8:51       ` Greg KH
@ 2017-02-13  9:59         ` Lee Jones
  0 siblings, 0 replies; 16+ messages in thread
From: Lee Jones @ 2017-02-13  9:59 UTC (permalink / raw)
  To: Greg KH
  Cc: Stephen Rothwell, Linus Walleij, linux-next, linux-kernel,
	Boris Brezillon, Alexander Stein, Andy Shevchenko

On Thu, 09 Feb 2017, Greg KH wrote:

> On Thu, Feb 09, 2017 at 08:21:50AM +0000, Lee Jones wrote:
> > On Wed, 08 Feb 2017, Greg KH wrote:
> > 
> > > On Wed, Feb 08, 2017 at 09:24:25AM +0000, Lee Jones wrote:
> > > > The commits mentioned below adapt the GPIO API to allow more information
> > > > to be passed directly through devm_get_gpiod_from_child() in the first
> > > > instance.  This facilitates the removal of subsequent calls, such as
> > > > gpiod_direction_output().  This patch firstly moves to utilise the new
> > > > API and secondly removes the now superfluous call do set the direction.
> > > > 
> > > > Fixes: a264d10ff45c ("gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO")
> > > > Fixes: b2987d7438e0 ("gpio: Pass GPIO label down to gpiod_request")
> > > > Fixes: 4b0947974e59 ("gpio: Rename devm_get_gpiod_from_child()")
> > > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > > ---
> > > >  drivers/tty/serial/st-asc.c | 11 ++++++-----
> > > >  1 file changed, 6 insertions(+), 5 deletions(-)
> > > > 
> > > > diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
> > > > index bcf1d33..c334bcc 100644
> > > > --- a/drivers/tty/serial/st-asc.c
> > > > +++ b/drivers/tty/serial/st-asc.c
> > > > @@ -575,12 +575,13 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,
> > > >  			pinctrl_select_state(ascport->pinctrl,
> > > >  					     ascport->states[NO_HW_FLOWCTRL]);
> > > >  
> > > > -			gpiod =	devm_get_gpiod_from_child(port->dev, "rts",
> > > > -							  &np->fwnode);
> > > > -			if (!IS_ERR(gpiod)) {
> > > > -				gpiod_direction_output(gpiod, 0);
> > > > +			gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
> > > > +								 "rts",
> > > > +								 &np->fwnode,
> > > > +								 GPIOD_OUT_LOW,
> > > > +								 np->name);
> > > 
> > > I can't apply this :(
> > > 
> > > Usually, when you move apis around, you add it, then convert it, wait a
> > > kernel release, then remove the old one.  That allows for issues like
> > > this when new code is added in one maintainer's branch but not yours.
> > > 
> > > So how about reverting your "drop the function" patch and then wait for
> > > -rc2 to really remove it?
> > 
> > I assume this is a question for LinusW?
> 
> It's for whom ever is causing this breakage by removing an api in this
> manner.

+1

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: linux-next: build failure after merge of the gpio tree
  2017-02-08  5:11 linux-next: build failure after merge of the gpio tree Stephen Rothwell
  2017-02-08  8:48 ` Lee Jones
  2017-02-08  9:24 ` [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Lee Jones
@ 2017-02-13 15:18 ` Linus Walleij
  2 siblings, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2017-02-13 15:18 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Greg KH, linux-next, linux-kernel, Lee Jones, Boris Brezillon,
	Alexander Stein, Andy Shevchenko

On Wed, Feb 8, 2017 at 6:11 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Linus,
>
> After merging the gpio tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> drivers/tty/serial/st-asc.c: In function 'asc_set_termios':
> drivers/tty/serial/st-asc.c:578:12: error: implicit declaration of function 'devm_get_gpiod_from_child' [-Werror=implicit-function-declaration]
>     gpiod = devm_get_gpiod_from_child(port->dev, "rts",
>             ^
> drivers/tty/serial/st-asc.c:578:10: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
>     gpiod = devm_get_gpiod_from_child(port->dev, "rts",
>           ^
>
> Caused by commits
>
>   a264d10ff45c ("gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO")
>   b2987d7438e0 ("gpio: Pass GPIO label down to gpiod_request")
>   4b0947974e59 ("gpio: Rename devm_get_gpiod_from_child()")
>
> interacting with commit
>
>   d7356256488c ("serial: st-asc: (De)Register GPIOD and swap Pinctrl profiles")
>
> from the tty tree.

Ah what a bummer, a new user colliding with the treewide changes of these
prototypes.

> I applied the following merge fix patch (I guessed about the new arguments):

Looks correct. Well not much to do about it apart from mentioning the
problem to Linus (the big penguin) when merging the trees.

Thanks for your efforts!

Yours,
Linus Walleij

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

* Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
  2017-02-08 13:00   ` Greg KH
  2017-02-09  8:21     ` Lee Jones
@ 2017-02-21 10:26     ` Linus Walleij
  1 sibling, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2017-02-21 10:26 UTC (permalink / raw)
  To: Greg KH
  Cc: Lee Jones, Stephen Rothwell, linux-next, linux-kernel,
	Boris Brezillon, Alexander Stein, Andy Shevchenko

On Wed, Feb 8, 2017 at 2:00 PM, Greg KH <greg@kroah.com> wrote:

>> -                     gpiod = devm_get_gpiod_from_child(port->dev, "rts",
>> -                                                       &np->fwnode);
>> -                     if (!IS_ERR(gpiod)) {
>> -                             gpiod_direction_output(gpiod, 0);
>> +                     gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
>> +                                                              "rts",
>> +                                                              &np->fwnode,
>> +                                                              GPIOD_OUT_LOW,
>> +                                                              np->name);
>
> I can't apply this :(
>
> Usually, when you move apis around, you add it, then convert it, wait a
> kernel release, then remove the old one.  That allows for issues like
> this when new code is added in one maintainer's branch but not yours.

Sorry about this, I guess I got a bit stressed too recently so I was not
able to solve this in the ultimate way.

We converted over all existing users of the APIs but I guess I optimistically
assumed no new users would be added in this
kernel cycle, but of course they did.... this new driver was using it, Stephen
fixed that up in next and now a patch to that driver arrived on top, ouch.

> So how about reverting your "drop the function" patch and then wait for
> -rc2 to really remove it?

I never did a thing like this before, hm sorry for the inexperience. :(

I did make an immutable branch like Andy suggested but didn't advertise
it well enough. But as stated that approach sucks anyways.

Typically I saw this suggestion right after sending the pull request to
Torvalds (yeah I should have seen it first, my inbox is chaotic too, mea
culpa).

I'll follow up on it asking him not to pull that and look for a resolution like
you suggest instead. Since it is three patches that then have users on
top I guess it is best to add back the old prototype helper for this driver
exclusively then fix it for -rc2.

Yours,
Linus Walleij

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

end of thread, other threads:[~2017-02-21 10:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08  5:11 linux-next: build failure after merge of the gpio tree Stephen Rothwell
2017-02-08  8:48 ` Lee Jones
2017-02-08  9:05   ` Boris Brezillon
2017-02-08 10:30   ` Stephen Rothwell
2017-02-08  9:24 ` [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Lee Jones
2017-02-08 13:00   ` Greg KH
2017-02-09  8:21     ` Lee Jones
2017-02-09  8:51       ` Greg KH
2017-02-13  9:59         ` Lee Jones
2017-02-21 10:26     ` Linus Walleij
2017-02-08 13:48   ` kbuild test robot
2017-02-08 16:31     ` Andy Shevchenko
2017-02-08 17:47       ` Greg KH
2017-02-08 19:42         ` Andy Shevchenko
2017-02-08 21:24           ` Stephen Rothwell
2017-02-13 15:18 ` linux-next: build failure after merge of the gpio tree Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.