Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: drop irq-flags initialisations

There's no need to initialise irq-flags variables before saving the
interrupt state.

Drop the redundant initialisations from drivers that got this wrong.

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210519092541.10137-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
18ee37e1 1d751b04

+15 -15
+1 -1
drivers/tty/serial/amba-pl011.c
··· 1062 1062 struct tty_port *port = &uap->port.state->port; 1063 1063 struct pl011_dmarx_data *dmarx = &uap->dmarx; 1064 1064 struct dma_chan *rxchan = uap->dmarx.chan; 1065 - unsigned long flags = 0; 1065 + unsigned long flags; 1066 1066 unsigned int dmataken = 0; 1067 1067 unsigned int size = 0; 1068 1068 struct pl011_sgbuf *sgbuf;
+1 -1
drivers/tty/serial/imx.c
··· 1975 1975 { 1976 1976 struct imx_port *sport = imx_uart_ports[co->index]; 1977 1977 struct imx_port_ucrs old_ucr; 1978 + unsigned long flags; 1978 1979 unsigned int ucr1; 1979 - unsigned long flags = 0; 1980 1980 int locked = 1; 1981 1981 1982 1982 if (sport->port.sysrq)
+5 -5
drivers/tty/serial/omap-serial.c
··· 626 626 static unsigned int serial_omap_tx_empty(struct uart_port *port) 627 627 { 628 628 struct uart_omap_port *up = to_uart_omap_port(port); 629 - unsigned long flags = 0; 629 + unsigned long flags; 630 630 unsigned int ret = 0; 631 631 632 632 pm_runtime_get_sync(up->dev); ··· 704 704 static void serial_omap_break_ctl(struct uart_port *port, int break_state) 705 705 { 706 706 struct uart_omap_port *up = to_uart_omap_port(port); 707 - unsigned long flags = 0; 707 + unsigned long flags; 708 708 709 709 dev_dbg(up->port.dev, "serial_omap_break_ctl+%d\n", up->port.line); 710 710 pm_runtime_get_sync(up->dev); ··· 722 722 static int serial_omap_startup(struct uart_port *port) 723 723 { 724 724 struct uart_omap_port *up = to_uart_omap_port(port); 725 - unsigned long flags = 0; 725 + unsigned long flags; 726 726 int retval; 727 727 728 728 /* ··· 797 797 static void serial_omap_shutdown(struct uart_port *port) 798 798 { 799 799 struct uart_omap_port *up = to_uart_omap_port(port); 800 - unsigned long flags = 0; 800 + unsigned long flags; 801 801 802 802 dev_dbg(up->port.dev, "serial_omap_shutdown+%d\n", up->port.line); 803 803 ··· 845 845 { 846 846 struct uart_omap_port *up = to_uart_omap_port(port); 847 847 unsigned char cval = 0; 848 - unsigned long flags = 0; 848 + unsigned long flags; 849 849 unsigned int baud, quot; 850 850 851 851 switch (termios->c_cflag & CSIZE) {
+2 -2
drivers/tty/serial/serial_core.c
··· 184 184 int init_hw) 185 185 { 186 186 struct uart_port *uport = uart_port_check(state); 187 + unsigned long flags; 187 188 unsigned long page; 188 - unsigned long flags = 0; 189 189 int retval = 0; 190 190 191 191 if (uport->type == PORT_UNKNOWN) ··· 275 275 { 276 276 struct uart_port *uport = uart_port_check(state); 277 277 struct tty_port *port = &state->port; 278 - unsigned long flags = 0; 278 + unsigned long flags; 279 279 char *xmit_buf = NULL; 280 280 281 281 /*
+1 -1
drivers/tty/serial/st-asc.c
··· 478 478 unsigned int oldstate) 479 479 { 480 480 struct asc_port *ascport = to_asc_port(port); 481 - unsigned long flags = 0; 481 + unsigned long flags; 482 482 u32 ctl; 483 483 484 484 switch (state) {
+1 -1
drivers/tty/serial/stm32-usart.c
··· 980 980 struct stm32_port, port); 981 981 const struct stm32_usart_offsets *ofs = &stm32port->info->ofs; 982 982 const struct stm32_usart_config *cfg = &stm32port->info->cfg; 983 - unsigned long flags = 0; 983 + unsigned long flags; 984 984 985 985 switch (state) { 986 986 case UART_PM_STATE_ON:
+4 -4
drivers/tty/serial/xilinx_uartps.c
··· 497 497 struct uart_port *port; 498 498 int locked = 0; 499 499 struct clk_notifier_data *ndata = data; 500 - unsigned long flags = 0; 501 500 struct cdns_uart *cdns_uart = to_cdns_uart(nb); 501 + unsigned long flags; 502 502 503 503 port = cdns_uart->port; 504 504 if (port->suspended) ··· 1210 1210 unsigned int count) 1211 1211 { 1212 1212 struct uart_port *port = console_port; 1213 - unsigned long flags = 0; 1213 + unsigned long flags; 1214 1214 unsigned int imr, ctrl; 1215 1215 int locked = 1; 1216 1216 ··· 1308 1308 may_wake = device_may_wakeup(device); 1309 1309 1310 1310 if (console_suspend_enabled && uart_console(port) && may_wake) { 1311 - unsigned long flags = 0; 1311 + unsigned long flags; 1312 1312 1313 1313 spin_lock_irqsave(&port->lock, flags); 1314 1314 /* Empty the receive FIFO 1st before making changes */ ··· 1339 1339 { 1340 1340 struct uart_port *port = dev_get_drvdata(device); 1341 1341 struct cdns_uart *cdns_uart = port->private_data; 1342 - unsigned long flags = 0; 1342 + unsigned long flags; 1343 1343 u32 ctrl_reg; 1344 1344 int may_wake; 1345 1345