Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1576278 > unrolled thread

linux-next: build failure after merge of the gpio tree

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2017-02-08 06:20 +0100
Last post2017-02-13 16:30 +0100
Articles 11 — 5 participants

Back to article view | Back to linux.kernel


Contents

  linux-next: build failure after merge of the gpio tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-02-08 06:20 +0100
    Re: linux-next: build failure after merge of the gpio tree Lee Jones <lee.jones@linaro.org> - 2017-02-08 10:00 +0100
      Re: linux-next: build failure after merge of the gpio tree Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-02-08 10:20 +0100
      Re: linux-next: build failure after merge of the gpio tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-02-08 11:40 +0100
    [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Lee Jones <lee.jones@linaro.org> - 2017-02-08 10:30 +0100
      Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Greg KH <greg@kroah.com> - 2017-02-08 14:10 +0100
        Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Lee Jones <lee.jones@linaro.org> - 2017-02-09 09:30 +0100
          Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Greg KH <greg@kroah.com> - 2017-02-09 10:00 +0100
            Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Lee Jones <lee.jones@linaro.org> - 2017-02-13 11:00 +0100
        Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Linus Walleij <linus.walleij@linaro.org> - 2017-02-21 11:30 +0100
    Re: linux-next: build failure after merge of the gpio tree Linus Walleij <linus.walleij@linaro.org> - 2017-02-13 16:30 +0100

#1576278 — linux-next: build failure after merge of the gpio tree

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2017-02-08 06:20 +0100
Subjectlinux-next: build failure after merge of the gpio tree
Message-ID<t8sPD-4lA-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1576365

FromLee Jones <lee.jones@linaro.org>
Date2017-02-08 10:00 +0100
Message-ID<t8wgy-6w4-27@gated-at.bofh.it>
In reply to#1576278
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

[toc] | [prev] | [next] | [standalone]


#1576373

FromBoris Brezillon <boris.brezillon@free-electrons.com>
Date2017-02-08 10:20 +0100
Message-ID<t8wzT-6Sa-5@gated-at.bofh.it>
In reply to#1576365
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;  
> 

[toc] | [prev] | [next] | [standalone]


#1576421

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2017-02-08 11:40 +0100
Message-ID<t8xPj-7AX-5@gated-at.bofh.it>
In reply to#1576365
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

[toc] | [prev] | [next] | [standalone]


#1576386 — [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin

FromLee Jones <lee.jones@linaro.org>
Date2017-02-08 10:30 +0100
Subject[PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
Message-ID<t8wJA-6VL-13@gated-at.bofh.it>
In reply to#1576278
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

[toc] | [prev] | [next] | [standalone]


#1576547 — Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin

FromGreg KH <greg@kroah.com>
Date2017-02-08 14:10 +0100
SubjectRe: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
Message-ID<t8Aav-Kl-45@gated-at.bofh.it>
In reply to#1576386
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

[toc] | [prev] | [next] | [standalone]


#1577368 — Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin

FromLee Jones <lee.jones@linaro.org>
Date2017-02-09 09:30 +0100
SubjectRe: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
Message-ID<t8Sh4-3NI-7@gated-at.bofh.it>
In reply to#1576547
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

[toc] | [prev] | [next] | [standalone]


#1577387 — Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin

FromGreg KH <greg@kroah.com>
Date2017-02-09 10:00 +0100
SubjectRe: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
Message-ID<t8SK6-3XY-19@gated-at.bofh.it>
In reply to#1577368
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

[toc] | [prev] | [next] | [standalone]


#1579567 — Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin

FromLee Jones <lee.jones@linaro.org>
Date2017-02-13 11:00 +0100
SubjectRe: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
Message-ID<talAn-1ZB-41@gated-at.bofh.it>
In reply to#1577387
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

[toc] | [prev] | [next] | [standalone]


#1585190 — Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-02-21 11:30 +0100
SubjectRe: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
Message-ID<tdfRM-1cI-5@gated-at.bofh.it>
In reply to#1576547
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

[toc] | [prev] | [next] | [standalone]


#1579851

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-02-13 16:30 +0100
Message-ID<taqJI-5u1-3@gated-at.bofh.it>
In reply to#1576278
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web