From: Greg Kroah-Hartman Date: Wed, 9 Apr 2025 08:05:56 +0000 (+0200) Subject: 6.13-stable patches X-Git-Tag: v5.4.292~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=71ffdb2a756aad1a90bf450f8c0f8ff59a6db470;p=thirdparty%2Fkernel%2Fstable-queue.git 6.13-stable patches added patches: tty-serial-fsl_lpuart-fix-unused-variable-sport-build-warning.patch tty-serial-fsl_lpuart-use-port-struct-directly-to-simply-code.patch --- diff --git a/queue-6.13/series b/queue-6.13/series index 094f8f6b2b..9e78c79292 100644 --- a/queue-6.13/series +++ b/queue-6.13/series @@ -427,7 +427,8 @@ staging-gpib-agilent-usb-code-cleanup.patch staging-gpib-agilent-usb-console-messaging-cleanup.patch staging-gpib-fix-oops-after-disconnect-in-agilent-us.patch tty-serial-fsl_lpuart-use-u32-and-u8-for-register-va.patch -tty-serial-fsl_lpuart-use-port-struct-directly-to-si.patch +tty-serial-fsl_lpuart-use-port-struct-directly-to-simply-code.patch +tty-serial-fsl_lpuart-fix-unused-variable-sport-build-warning.patch tty-serial-lpuart-only-disable-cts-instead-of-overwr.patch wifi-mac80211-fix-sparse-warning-for-monitor_sdata.patch usbnet-fix-npe-during-rx_complete.patch diff --git a/queue-6.13/tty-serial-fsl_lpuart-fix-unused-variable-sport-build-warning.patch b/queue-6.13/tty-serial-fsl_lpuart-fix-unused-variable-sport-build-warning.patch new file mode 100644 index 0000000000..263b36934f --- /dev/null +++ b/queue-6.13/tty-serial-fsl_lpuart-fix-unused-variable-sport-build-warning.patch @@ -0,0 +1,40 @@ +From 9f8fe348ac9544f6855f82565e754bf085d81f88 Mon Sep 17 00:00:00 2001 +From: Sherry Sun +Date: Mon, 24 Mar 2025 10:10:51 +0800 +Subject: tty: serial: fsl_lpuart: Fix unused variable 'sport' build warning + +From: Sherry Sun + +commit 9f8fe348ac9544f6855f82565e754bf085d81f88 upstream. + +Remove the unused variable 'sport' to avoid the kernel build warning. + +Fixes: 3cc16ae096f1 ("tty: serial: fsl_lpuart: use port struct directly to simply code") +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-kbuild-all/202503210614.2qGlnbIq-lkp@intel.com/ +Signed-off-by: Sherry Sun +Link: https://lore.kernel.org/r/20250324021051.162676-1-sherry.sun@nxp.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/fsl_lpuart.c | 3 --- + 1 file changed, 3 deletions(-) + +--- a/drivers/tty/serial/fsl_lpuart.c ++++ b/drivers/tty/serial/fsl_lpuart.c +@@ -639,8 +639,6 @@ static void lpuart32_wait_bit_set(struct + + static int lpuart_poll_init(struct uart_port *port) + { +- struct lpuart_port *sport = container_of(port, +- struct lpuart_port, port); + unsigned long flags; + u8 temp; + +@@ -693,7 +691,6 @@ static int lpuart_poll_get_char(struct u + static int lpuart32_poll_init(struct uart_port *port) + { + unsigned long flags; +- struct lpuart_port *sport = container_of(port, struct lpuart_port, port); + u32 temp; + + port->fifosize = 0; diff --git a/queue-6.13/tty-serial-fsl_lpuart-use-port-struct-directly-to-si.patch b/queue-6.13/tty-serial-fsl_lpuart-use-port-struct-directly-to-simply-code.patch similarity index 85% rename from queue-6.13/tty-serial-fsl_lpuart-use-port-struct-directly-to-si.patch rename to queue-6.13/tty-serial-fsl_lpuart-use-port-struct-directly-to-simply-code.patch index 3ef732cf90..9af40262da 100644 --- a/queue-6.13/tty-serial-fsl_lpuart-use-port-struct-directly-to-si.patch +++ b/queue-6.13/tty-serial-fsl_lpuart-use-port-struct-directly-to-simply-code.patch @@ -1,11 +1,11 @@ -From 9223be8453b362b46aff91a9d0f140f9c8b4e3d5 Mon Sep 17 00:00:00 2001 -From: Sasha Levin +From 3cc16ae096f164ae0c6b98416c25a01db5f3a529 Mon Sep 17 00:00:00 2001 +From: Sherry Sun Date: Wed, 12 Mar 2025 10:39:03 +0800 Subject: tty: serial: fsl_lpuart: use port struct directly to simply code From: Sherry Sun -[ Upstream commit 3cc16ae096f164ae0c6b98416c25a01db5f3a529 ] +commit 3cc16ae096f164ae0c6b98416c25a01db5f3a529 upstream. Most lpuart functions have the parameter struct uart_port *port, but still use the &sport->port to get the uart_port instead of use it @@ -15,17 +15,13 @@ of covert it from struct sport. Signed-off-by: Sherry Sun Link: https://lore.kernel.org/r/20250312023904.1343351-3-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman -Stable-dep-of: e98ab45ec518 ("tty: serial: lpuart: only disable CTS instead of overwriting the whole UARTMODIR register") -Signed-off-by: Sasha Levin --- - drivers/tty/serial/fsl_lpuart.c | 213 +++++++++++++++----------------- - 1 file changed, 102 insertions(+), 111 deletions(-) + drivers/tty/serial/fsl_lpuart.c | 210 +++++++++++++++++++--------------------- + 1 file changed, 102 insertions(+), 108 deletions(-) -diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c -index 1afcfc40079d5..2971de64f6a3d 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -581,7 +581,7 @@ static int lpuart_dma_tx_request(struct uart_port *port) +@@ -581,7 +581,7 @@ static int lpuart_dma_tx_request(struct ret = dmaengine_slave_config(sport->dma_tx_chan, &dma_tx_sconfig); if (ret) { @@ -34,7 +30,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 "DMA slave config failed, err = %d\n", ret); return ret; } -@@ -611,13 +611,13 @@ static void lpuart_flush_buffer(struct uart_port *port) +@@ -611,13 +611,13 @@ static void lpuart_flush_buffer(struct u } if (lpuart_is_32(sport)) { @@ -52,12 +48,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 } } -@@ -639,38 +639,36 @@ static void lpuart32_wait_bit_set(struct uart_port *port, unsigned int offset, - - static int lpuart_poll_init(struct uart_port *port) - { -- struct lpuart_port *sport = container_of(port, -- struct lpuart_port, port); +@@ -644,33 +644,33 @@ static int lpuart_poll_init(struct uart_ unsigned long flags; u8 temp; @@ -104,11 +95,8 @@ index 1afcfc40079d5..2971de64f6a3d 100644 return 0; } -@@ -693,33 +691,32 @@ static int lpuart_poll_get_char(struct uart_port *port) - static int lpuart32_poll_init(struct uart_port *port) - { - unsigned long flags; -- struct lpuart_port *sport = container_of(port, struct lpuart_port, port); +@@ -696,30 +696,30 @@ static int lpuart32_poll_init(struct uar + struct lpuart_port *sport = container_of(port, struct lpuart_port, port); u32 temp; - sport->port.fifosize = 0; @@ -149,7 +137,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 return 0; } -@@ -1449,12 +1446,9 @@ static void lpuart_dma_rx_free(struct uart_port *port) +@@ -1449,12 +1449,9 @@ static void lpuart_dma_rx_free(struct ua static int lpuart_config_rs485(struct uart_port *port, struct ktermios *termios, struct serial_rs485 *rs485) { @@ -164,7 +152,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 if (rs485->flags & SER_RS485_ENABLED) { /* Enable auto RS-485 RTS mode */ -@@ -1472,32 +1466,29 @@ static int lpuart_config_rs485(struct uart_port *port, struct ktermios *termios, +@@ -1472,32 +1469,29 @@ static int lpuart_config_rs485(struct ua modem &= ~UARTMODEM_TXRTSPOL; } @@ -204,7 +192,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 if (rs485->flags & SER_RS485_ENABLED) { /* Enable auto RS-485 RTS mode */ -@@ -1515,10 +1506,10 @@ static int lpuart32_config_rs485(struct uart_port *port, struct ktermios *termio +@@ -1515,10 +1509,10 @@ static int lpuart32_config_rs485(struct modem &= ~UARTMODIR_TXRTSPOL; } @@ -217,7 +205,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 return 0; } -@@ -1829,11 +1820,11 @@ static int lpuart_startup(struct uart_port *port) +@@ -1829,11 +1823,11 @@ static int lpuart_startup(struct uart_po u8 temp; /* determine FIFO size and enable FIFO mode */ @@ -231,7 +219,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTPFIFO_RXSIZE_OFF) & UARTPFIFO_FIFOSIZE_MASK); -@@ -1889,11 +1880,11 @@ static int lpuart32_startup(struct uart_port *port) +@@ -1889,11 +1883,11 @@ static int lpuart32_startup(struct uart_ u32 temp; /* determine FIFO size */ @@ -245,7 +233,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTFIFO_RXSIZE_OFF) & UARTFIFO_FIFOSIZE_MASK); -@@ -1906,7 +1897,7 @@ static int lpuart32_startup(struct uart_port *port) +@@ -1906,7 +1900,7 @@ static int lpuart32_startup(struct uart_ if (is_layerscape_lpuart(sport)) { sport->rxfifo_size = 16; sport->txfifo_size = 16; @@ -254,7 +242,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 } lpuart_request_dma(sport); -@@ -1966,8 +1957,8 @@ static void lpuart32_shutdown(struct uart_port *port) +@@ -1966,8 +1960,8 @@ static void lpuart32_shutdown(struct uar uart_port_lock_irqsave(port, &flags); /* clear status */ @@ -265,7 +253,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 /* disable Rx/Tx DMA */ temp = lpuart32_read(port, UARTBAUD); -@@ -1996,12 +1987,12 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1996,12 +1990,12 @@ lpuart_set_termios(struct uart_port *por unsigned int old_csize = old ? old->c_cflag & CSIZE : CS8; unsigned int sbr, brfa; @@ -284,7 +272,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 /* * only support CS8 and CS7, and for CS7 must enable PE. * supported mode: -@@ -2033,7 +2024,7 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2033,7 +2027,7 @@ lpuart_set_termios(struct uart_port *por * When auto RS-485 RTS mode is enabled, * hardware flow control need to be disabled. */ @@ -293,7 +281,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 termios->c_cflag &= ~CRTSCTS; if (termios->c_cflag & CRTSCTS) -@@ -2074,59 +2065,59 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2074,59 +2068,59 @@ lpuart_set_termios(struct uart_port *por * Need to update the Ring buffer length according to the selected * baud rate and restart Rx DMA path. * @@ -374,7 +362,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 if (old && sport->lpuart_dma_rx_use) { if (!lpuart_start_rx_dma(sport)) -@@ -2135,7 +2126,7 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2135,7 +2129,7 @@ lpuart_set_termios(struct uart_port *por sport->lpuart_dma_rx_use = false; } @@ -383,7 +371,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 } static void __lpuart32_serial_setbrg(struct uart_port *port, -@@ -2233,9 +2224,9 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2233,9 +2227,9 @@ lpuart32_set_termios(struct uart_port *p unsigned int baud; unsigned int old_csize = old ? old->c_cflag & CSIZE : CS8; @@ -396,7 +384,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 sport->is_cs7 = false; /* * only support CS8 and CS7 -@@ -2269,7 +2260,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2269,7 +2263,7 @@ lpuart32_set_termios(struct uart_port *p * When auto RS-485 RTS mode is enabled, * hardware flow control need to be disabled. */ @@ -405,7 +393,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 termios->c_cflag &= ~CRTSCTS; if (termios->c_cflag & CRTSCTS) -@@ -2319,32 +2310,32 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2319,32 +2313,32 @@ lpuart32_set_termios(struct uart_port *p * Need to update the Ring buffer length according to the selected * baud rate and restart Rx DMA path. * @@ -448,7 +436,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 } /* update the per-port timeout */ -@@ -2356,22 +2347,22 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2356,22 +2350,22 @@ lpuart32_set_termios(struct uart_port *p * asserted. */ if (!(old_ctrl & UARTCTRL_SBK)) { @@ -478,7 +466,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 if ((ctrl & (UARTCTRL_PE | UARTCTRL_M)) == UARTCTRL_PE) sport->is_cs7 = true; -@@ -2383,7 +2374,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2383,7 +2377,7 @@ lpuart32_set_termios(struct uart_port *p sport->lpuart_dma_rx_use = false; } @@ -487,7 +475,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 } static const char *lpuart_type(struct uart_port *port) -@@ -2821,7 +2812,7 @@ static int lpuart_global_reset(struct lpuart_port *sport) +@@ -2821,7 +2815,7 @@ static int lpuart_global_reset(struct lp ret = clk_prepare_enable(sport->ipg_clk); if (ret) { @@ -496,7 +484,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 return ret; } -@@ -2832,10 +2823,10 @@ static int lpuart_global_reset(struct lpuart_port *sport) +@@ -2832,10 +2826,10 @@ static int lpuart_global_reset(struct lp */ ctrl = lpuart32_read(port, UARTCTRL); if (ctrl & UARTCTRL_TE) { @@ -509,7 +497,7 @@ index 1afcfc40079d5..2971de64f6a3d 100644 "timeout waiting for transmit engine to complete\n"); clk_disable_unprepare(sport->ipg_clk); return 0; -@@ -3187,7 +3178,7 @@ static void lpuart_console_fixup(struct lpuart_port *sport) +@@ -3187,7 +3181,7 @@ static void lpuart_console_fixup(struct * in VLLS mode, or restore console setting here. */ if (is_imx7ulp_lpuart(sport) && lpuart_uport_is_active(sport) && @@ -518,6 +506,3 @@ index 1afcfc40079d5..2971de64f6a3d 100644 mutex_lock(&port->mutex); memset(&termios, 0, sizeof(struct ktermios)); --- -2.39.5 -