[PATCH v2 2/7] serial: amba-pl011: get rid of useless wrapper pl011_get_rs485_mode()

Lino Sanfilippo posted 7 patches 2 years, 2 months ago
There is a newer version of this series
[PATCH v2 2/7] serial: amba-pl011: get rid of useless wrapper pl011_get_rs485_mode()
Posted by Lino Sanfilippo 2 years, 2 months ago
Due to earlier code changes function pl011_get_rs485_mode() is now merely
a wrapper for uart_get_rs485_mode() which does not add any further
functionality. So remove it and instead call uart_get_rs485_mode()
directly.

Reviewed-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
---
 drivers/tty/serial/amba-pl011.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 3dc9b0fcab1c..70b44f3e9eb7 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2716,18 +2716,6 @@ static int pl011_find_free_port(void)
 	return -EBUSY;
 }
 
-static int pl011_get_rs485_mode(struct uart_amba_port *uap)
-{
-	struct uart_port *port = &uap->port;
-	int ret;
-
-	ret = uart_get_rs485_mode(port);
-	if (ret)
-		return ret;
-
-	return 0;
-}
-
 static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap,
 			    struct resource *mmiobase, int index)
 {
@@ -2748,7 +2736,7 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap,
 	uap->port.flags = UPF_BOOT_AUTOCONF;
 	uap->port.line = index;
 
-	ret = pl011_get_rs485_mode(uap);
+	ret = uart_get_rs485_mode(&uap->port);
 	if (ret)
 		return ret;
 
-- 
2.40.1

Re: [PATCH v2 2/7] serial: amba-pl011: get rid of useless wrapper pl011_get_rs485_mode()
Posted by Greg KH 2 years, 2 months ago
On Wed, Oct 11, 2023 at 07:38:24PM +0200, Lino Sanfilippo wrote:
> Due to earlier code changes function pl011_get_rs485_mode() is now merely
> a wrapper for uart_get_rs485_mode() which does not add any further
> functionality. So remove it and instead call uart_get_rs485_mode()
> directly.
> 
> Reviewed-by: Lukas Wunner <lukas@wunner.de>
> Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
> ---
>  drivers/tty/serial/amba-pl011.c | 14 +-------------
>  1 file changed, 1 insertion(+), 13 deletions(-)

Why is patch 2/7 not cc: stable, when patches 3-7 are?  Either this
patch isn't needed in this series, and can go later (or to a different
branch), or it also needs to be marked for stable as the later patches
depend on it?

thanks,

greg k-h
Re: [PATCH v2 2/7] serial: amba-pl011: get rid of useless wrapper pl011_get_rs485_mode()
Posted by Lino Sanfilippo 2 years, 2 months ago
Hi,

On 11.10.23 at 19:42, Greg KH wrote:
> On Wed, Oct 11, 2023 at 07:38:24PM +0200, Lino Sanfilippo wrote:
>> Due to earlier code changes function pl011_get_rs485_mode() is now merely
>> a wrapper for uart_get_rs485_mode() which does not add any further
>> functionality. So remove it and instead call uart_get_rs485_mode()
>> directly.
>>
>> Reviewed-by: Lukas Wunner <lukas@wunner.de>
>> Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
>> ---
>>  drivers/tty/serial/amba-pl011.c | 14 +-------------
>>  1 file changed, 1 insertion(+), 13 deletions(-)
>
> Why is patch 2/7 not cc: stable, when patches 3-7 are?  Either this
> patch isn't needed in this series, and can go later (or to a different
> branch), or it also needs to be marked for stable as the later patches
> depend on it?
>

2/7 is really only a cleanup patch that does not provide a bugfix.
Should I remove it from this series?

Regards,
Lino
Re: [PATCH v2 2/7] serial: amba-pl011: get rid of useless wrapper pl011_get_rs485_mode()
Posted by Greg KH 2 years, 2 months ago
On Wed, Oct 11, 2023 at 07:44:51PM +0200, Lino Sanfilippo wrote:
> 
> Hi,
> 
> On 11.10.23 at 19:42, Greg KH wrote:
> > On Wed, Oct 11, 2023 at 07:38:24PM +0200, Lino Sanfilippo wrote:
> >> Due to earlier code changes function pl011_get_rs485_mode() is now merely
> >> a wrapper for uart_get_rs485_mode() which does not add any further
> >> functionality. So remove it and instead call uart_get_rs485_mode()
> >> directly.
> >>
> >> Reviewed-by: Lukas Wunner <lukas@wunner.de>
> >> Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
> >> ---
> >>  drivers/tty/serial/amba-pl011.c | 14 +-------------
> >>  1 file changed, 1 insertion(+), 13 deletions(-)
> >
> > Why is patch 2/7 not cc: stable, when patches 3-7 are?  Either this
> > patch isn't needed in this series, and can go later (or to a different
> > branch), or it also needs to be marked for stable as the later patches
> > depend on it?
> >
> 
> 2/7 is really only a cleanup patch that does not provide a bugfix.
> Should I remove it from this series?

Please do, and send it later, or as part of a separate patch series
independant of this one.

thanks,

greg k-h
Re: [PATCH v2 2/7] serial: amba-pl011: get rid of useless wrapper pl011_get_rs485_mode()
Posted by Lino Sanfilippo 2 years, 2 months ago
On 11.10.23 at 19:47, Greg KH wrote:
> On Wed, Oct 11, 2023 at 07:44:51PM +0200, Lino Sanfilippo wrote:
>>
>> Hi,
>>
>> On 11.10.23 at 19:42, Greg KH wrote:
>>> On Wed, Oct 11, 2023 at 07:38:24PM +0200, Lino Sanfilippo wrote:
>>>> Due to earlier code changes function pl011_get_rs485_mode() is now merely
>>>> a wrapper for uart_get_rs485_mode() which does not add any further
>>>> functionality. So remove it and instead call uart_get_rs485_mode()
>>>> directly.
>>>>
>>>> Reviewed-by: Lukas Wunner <lukas@wunner.de>
>>>> Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
>>>> ---
>>>>  drivers/tty/serial/amba-pl011.c | 14 +-------------
>>>>  1 file changed, 1 insertion(+), 13 deletions(-)
>>>
>>> Why is patch 2/7 not cc: stable, when patches 3-7 are?  Either this
>>> patch isn't needed in this series, and can go later (or to a different
>>> branch), or it also needs to be marked for stable as the later patches
>>> depend on it?
>>>
>>
>> 2/7 is really only a cleanup patch that does not provide a bugfix.
>> Should I remove it from this series?
>
> Please do, and send it later, or as part of a separate patch series
> independant of this one.
>

Ok will do so.

BR,
Lino