diff mbox series

[v9,03/10] serial: sc16is7xx: remove obsolete out_thread label

Message ID 20230725142343.1724130-4-hugo@hugovil.com
State Superseded
Headers show
Series None | expand

Commit Message

Hugo Villeneuve July 25, 2023, 2:23 p.m. UTC
From: Hugo Villeneuve <hvilleneuve@dimonoff.com>

Commit c8f71b49ee4d ("serial: sc16is7xx: setup GPIO controller later
in probe") moved GPIO setup code later in probe function. Doing so
also required to move ports cleanup code (out_ports label) after the
GPIO cleanup code.

After these moves, the out_thread label becomes misplaced and makes
part of the cleanup code illogical.

This patch remove the now obsolete out_thread label and make GPIO
setup code jump to out_ports label if it fails.

Fixes: c8f71b49ee4d ("serial: sc16is7xx: setup GPIO controller later in probe")
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Lech Perczak <lech.perczak@camlingroup.com>
Tested-by: Lech Perczak <lech.perczak@camlingroup.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 drivers/tty/serial/sc16is7xx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Greg Kroah-Hartman July 31, 2023, 3:53 p.m. UTC | #1
On Tue, Jul 25, 2023 at 10:23:35AM -0400, Hugo Villeneuve wrote:
> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> 
> Commit c8f71b49ee4d ("serial: sc16is7xx: setup GPIO controller later
> in probe") moved GPIO setup code later in probe function. Doing so
> also required to move ports cleanup code (out_ports label) after the
> GPIO cleanup code.
> 
> After these moves, the out_thread label becomes misplaced and makes
> part of the cleanup code illogical.
> 
> This patch remove the now obsolete out_thread label and make GPIO
> setup code jump to out_ports label if it fails.
> 
> Fixes: c8f71b49ee4d ("serial: sc16is7xx: setup GPIO controller later in probe")
> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> Reviewed-by: Lech Perczak <lech.perczak@camlingroup.com>
> Tested-by: Lech Perczak <lech.perczak@camlingroup.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

Why is this not ok for stable kernels yet it has a Fixes: tag?

Please fix.

thanks,

greg k-h
Hugo Villeneuve Aug. 1, 2023, 5:29 p.m. UTC | #2
On Mon, 31 Jul 2023 17:53:10 +0200
Greg KH <gregkh@linuxfoundation.org> wrote:

> On Tue, Jul 25, 2023 at 10:23:35AM -0400, Hugo Villeneuve wrote:
> > From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > 
> > Commit c8f71b49ee4d ("serial: sc16is7xx: setup GPIO controller later
> > in probe") moved GPIO setup code later in probe function. Doing so
> > also required to move ports cleanup code (out_ports label) after the
> > GPIO cleanup code.
> > 
> > After these moves, the out_thread label becomes misplaced and makes
> > part of the cleanup code illogical.
> > 
> > This patch remove the now obsolete out_thread label and make GPIO
> > setup code jump to out_ports label if it fails.
> > 
> > Fixes: c8f71b49ee4d ("serial: sc16is7xx: setup GPIO controller later in probe")
> > Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > Reviewed-by: Lech Perczak <lech.perczak@camlingroup.com>
> > Tested-by: Lech Perczak <lech.perczak@camlingroup.com>
> > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> 
> Why is this not ok for stable kernels yet it has a Fixes: tag?
> 
> Please fix.
> 
> thanks,
> 
> greg k-h

Hi,
this is a somewhat particular case. It is a change that "fixes" some
previously unseen consequence in original commit, but that does not
result in any binary change in the end. That is why I decided not to
put in a "stable" tag.

If you want, maybe it would be simpler to remove the "Fixes" tag? I
originally put this tag to have a reference to the original commit, but
since it is already mentioned in the commit log message body, it can be
removed.

Hugo.
Greg Kroah-Hartman Aug. 3, 2023, 7:55 a.m. UTC | #3
On Tue, Aug 01, 2023 at 01:29:59PM -0400, Hugo Villeneuve wrote:
> On Mon, 31 Jul 2023 17:53:10 +0200
> Greg KH <gregkh@linuxfoundation.org> wrote:
> 
> > On Tue, Jul 25, 2023 at 10:23:35AM -0400, Hugo Villeneuve wrote:
> > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > > 
> > > Commit c8f71b49ee4d ("serial: sc16is7xx: setup GPIO controller later
> > > in probe") moved GPIO setup code later in probe function. Doing so
> > > also required to move ports cleanup code (out_ports label) after the
> > > GPIO cleanup code.
> > > 
> > > After these moves, the out_thread label becomes misplaced and makes
> > > part of the cleanup code illogical.
> > > 
> > > This patch remove the now obsolete out_thread label and make GPIO
> > > setup code jump to out_ports label if it fails.
> > > 
> > > Fixes: c8f71b49ee4d ("serial: sc16is7xx: setup GPIO controller later in probe")
> > > Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > > Reviewed-by: Lech Perczak <lech.perczak@camlingroup.com>
> > > Tested-by: Lech Perczak <lech.perczak@camlingroup.com>
> > > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> > 
> > Why is this not ok for stable kernels yet it has a Fixes: tag?
> > 
> > Please fix.
> > 
> > thanks,
> > 
> > greg k-h
> 
> Hi,
> this is a somewhat particular case. It is a change that "fixes" some
> previously unseen consequence in original commit, but that does not
> result in any binary change in the end. That is why I decided not to
> put in a "stable" tag.
> 
> If you want, maybe it would be simpler to remove the "Fixes" tag? I
> originally put this tag to have a reference to the original commit, but
> since it is already mentioned in the commit log message body, it can be
> removed.

Yes, please just remove it, otherwise it will just confuse us.

thanks,

greg k-h
diff mbox series

Patch

diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 306ae512b38a..32d43d00a583 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1516,7 +1516,7 @@  static int sc16is7xx_probe(struct device *dev,
 		s->gpio.can_sleep	 = 1;
 		ret = gpiochip_add_data(&s->gpio, s);
 		if (ret)
-			goto out_thread;
+			goto out_ports;
 	}
 #endif
 
@@ -1542,8 +1542,6 @@  static int sc16is7xx_probe(struct device *dev,
 #ifdef CONFIG_GPIOLIB
 	if (devtype->nr_gpio)
 		gpiochip_remove(&s->gpio);
-
-out_thread:
 #endif
 
 out_ports: