Thread (2 messages) 2 messages, 2 authors, 2021-05-19

Re: [PATCH] serial: drop irq-flags initialisations

From: Uwe Kleine-König <hidden>
Date: 2021-05-19 09:46:10
Also in: lkml

On Wed, May 19, 2021 at 11:25:41AM +0200, Johan Hovold wrote:
quoted hunk ↗ jump to hunk
There's no need to initialise irq-flags variables before saving the
interrupt state.

Drop the redundant initialisations from drivers that got this wrong.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/tty/serial/amba-pl011.c    |  2 +-
 drivers/tty/serial/imx.c           |  2 +-
 drivers/tty/serial/omap-serial.c   | 10 +++++-----
 drivers/tty/serial/serial_core.c   |  4 ++--
 drivers/tty/serial/st-asc.c        |  2 +-
 drivers/tty/serial/stm32-usart.c   |  2 +-
 drivers/tty/serial/xilinx_uartps.c |  8 ++++----
 7 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 78682c12156a..e14f3378b8a0 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1062,7 +1062,7 @@ static void pl011_dma_rx_poll(struct timer_list *t)
 	struct tty_port *port = &uap->port.state->port;
 	struct pl011_dmarx_data *dmarx = &uap->dmarx;
 	struct dma_chan *rxchan = uap->dmarx.chan;
-	unsigned long flags = 0;
+	unsigned long flags;
 	unsigned int dmataken = 0;
 	unsigned int size = 0;
 	struct pl011_sgbuf *sgbuf;
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 7d5a8dfa3e91..4b838601cdce 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1975,8 +1975,8 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count)
 {
 	struct imx_port *sport = imx_uart_ports[co->index];
 	struct imx_port_ucrs old_ucr;
+	unsigned long flags;
 	unsigned int ucr1;
-	unsigned long flags = 0;
 	int locked = 1;
 
 	if (sport->port.sysrq)
Apart from changing the order here being unnecessary, the patch looks
right. Ditto for serial_core.c and xilinx_uartps.c.
I don't care much though, so

Acked-by: Uwe Kleine-König <redacted>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help