[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201020073749.rxfdggobl5gv7vn4@pengutronix.de>
Date: Tue, 20 Oct 2020 09:37:49 +0200
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: trix@...hat.com
Cc: gregkh@...uxfoundation.org, jirislaby@...nel.org,
shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
festevam@...il.com, linux-imx@....com,
linux-arm-kernel@...ts.infradead.org, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: remove unneeded break
On Mon, Oct 19, 2020 at 10:59:15AM -0700, trix@...hat.com wrote:
> From: Tom Rix <trix@...hat.com>
>
> A break is not needed if it is preceded by a return
>
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
> drivers/tty/serial/imx.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index 1731d9728865..09703079db7b 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -320,7 +320,6 @@ static u32 imx_uart_readl(struct imx_port *sport, u32 offset)
> switch (offset) {
> case UCR1:
> return sport->ucr1;
> - break;
> case UCR2:
> /*
> * UCR2_SRST is the only bit in the cached registers that might
> @@ -331,16 +330,12 @@ static u32 imx_uart_readl(struct imx_port *sport, u32 offset)
> if (!(sport->ucr2 & UCR2_SRST))
> sport->ucr2 = readl(sport->port.membase + offset);
> return sport->ucr2;
> - break;
> case UCR3:
> return sport->ucr3;
> - break;
> case UCR4:
> return sport->ucr4;
> - break;
> case UFCR:
> return sport->ufcr;
> - break;
> default:
> return readl(sport->port.membase + offset);
> }
this might be subjective, but I like the break being there for clearity.
So I object to make a patch to remove them. In case I'm outvoted I'd at
least want empty lines instead.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists