[PATCH 13/15] serial: sc16is7xx: change incorrect indentation

Hugo Villeneuve posted 15 patches 2 months, 3 weeks ago
There is a newer version of this series
[PATCH 13/15] serial: sc16is7xx: change incorrect indentation
Posted by Hugo Villeneuve 2 months, 3 weeks ago
From: Hugo Villeneuve <hvilleneuve@dimonoff.com>

Change incorrect indentation level introduced in commit 9eb90d57b55a
("sc16is7xx: Add flag to activate IrDA mode").

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
---
 drivers/tty/serial/sc16is7xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 9d04d665ec9ab..31d43fc857187 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1181,7 +1181,7 @@ static int sc16is7xx_startup(struct uart_port *port)
 	sc16is7xx_port_update(port, SC16IS7XX_MCR_REG,
 			      SC16IS7XX_MCR_IRDA_BIT,
 			      one->irda_mode ?
-				SC16IS7XX_MCR_IRDA_BIT : 0);
+			      SC16IS7XX_MCR_IRDA_BIT : 0);
 
 	/* Enable the Rx and Tx FIFO */
 	sc16is7xx_port_update(port, SC16IS7XX_EFCR_REG,
-- 
2.39.5
RE: [PATCH 13/15] serial: sc16is7xx: change incorrect indentation
Posted by Maarten Brock 2 months, 3 weeks ago
Hi Hugo,

> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> 
> Change incorrect indentation level introduced in commit 9eb90d57b55a
> ("sc16is7xx: Add flag to activate IrDA mode").

> --- a/drivers/tty/serial/sc16is7xx.c
> +++ b/drivers/tty/serial/sc16is7xx.c
> @@ -1181,7 +1181,7 @@ static int sc16is7xx_startup(struct uart_port *port)
>  	sc16is7xx_port_update(port, SC16IS7XX_MCR_REG,
>  			      SC16IS7XX_MCR_IRDA_BIT,
>  			      one->irda_mode ?
> -				SC16IS7XX_MCR_IRDA_BIT : 0);
> +			      SC16IS7XX_MCR_IRDA_BIT : 0);

Are you sure you want to unindent this?
To me it now looks as if both "one->irda_mode" and "SC16IS7XX_MCR_IRDA_BIT : 0" are parameters.
And why not fix this by placing both on one line? Is 76 characters already over the line length limit?

Kind regards,
Maarten Brock

Re: [PATCH 13/15] serial: sc16is7xx: change incorrect indentation
Posted by Hugo Villeneuve 2 months, 3 weeks ago
Hi Maarten,

On Fri, 26 Sep 2025 09:18:38 +0000
Maarten Brock <Maarten.Brock@sttls.nl> wrote:

> Hi Hugo,
> 
> > From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > 
> > Change incorrect indentation level introduced in commit 9eb90d57b55a
> > ("sc16is7xx: Add flag to activate IrDA mode").
> 
> > --- a/drivers/tty/serial/sc16is7xx.c
> > +++ b/drivers/tty/serial/sc16is7xx.c
> > @@ -1181,7 +1181,7 @@ static int sc16is7xx_startup(struct uart_port *port)
> >  	sc16is7xx_port_update(port, SC16IS7XX_MCR_REG,
> >  			      SC16IS7XX_MCR_IRDA_BIT,
> >  			      one->irda_mode ?
> > -				SC16IS7XX_MCR_IRDA_BIT : 0);
> > +			      SC16IS7XX_MCR_IRDA_BIT : 0);
> 
> Are you sure you want to unindent this?
> To me it now looks as if both "one->irda_mode" and "SC16IS7XX_MCR_IRDA_BIT : 0" are parameters.
> And why not fix this by placing both on one line? Is 76 characters already over the line length limit?

Excellent suggestion, will look much better. Will do it in V2.

-- 
Hugo Villeneuve