]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Apr 2025 08:05:44 +0000 (10:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Apr 2025 08:05:44 +0000 (10:05 +0200)
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

queue-6.12/series
queue-6.12/tty-serial-fsl_lpuart-fix-unused-variable-sport-build-warning.patch [new file with mode: 0644]
queue-6.12/tty-serial-fsl_lpuart-use-port-struct-directly-to-simply-code.patch [moved from queue-6.12/tty-serial-fsl_lpuart-use-port-struct-directly-to-si.patch with 85% similarity]

index 84942684502c8aa05b846a1e816c0efbc47d6fb1..fb6db2fafd4eb91da3d10df041a6c235469c41e3 100644 (file)
@@ -354,7 +354,8 @@ tracing-correct-the-refcount-if-the-hist-hist_debug-.patch
 cgroup-rstat-tracking-cgroup-level-niced-cpu-time.patch
 cgroup-rstat-fix-forceidle-time-in-cpu.stat.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.12/tty-serial-fsl_lpuart-fix-unused-variable-sport-build-warning.patch b/queue-6.12/tty-serial-fsl_lpuart-fix-unused-variable-sport-build-warning.patch
new file mode 100644 (file)
index 0000000..835909c
--- /dev/null
@@ -0,0 +1,40 @@
+From 9f8fe348ac9544f6855f82565e754bf085d81f88 Mon Sep 17 00:00:00 2001
+From: Sherry Sun <sherry.sun@nxp.com>
+Date: Mon, 24 Mar 2025 10:10:51 +0800
+Subject: tty: serial: fsl_lpuart: Fix unused variable 'sport' build warning
+
+From: Sherry Sun <sherry.sun@nxp.com>
+
+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 <lkp@intel.com>
+Closes: https://lore.kernel.org/oe-kbuild-all/202503210614.2qGlnbIq-lkp@intel.com/
+Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
+Link: https://lore.kernel.org/r/20250324021051.162676-1-sherry.sun@nxp.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -638,8 +638,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;
+@@ -692,7 +690,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;
similarity index 85%
rename from queue-6.12/tty-serial-fsl_lpuart-use-port-struct-directly-to-si.patch
rename to queue-6.12/tty-serial-fsl_lpuart-use-port-struct-directly-to-simply-code.patch
index d2086ab1744d1f33cdf7f8f221f8d8e21109a5e7..d1c01cfc0b14103dc929c7f30e697ac429370fcd 100644 (file)
@@ -1,11 +1,11 @@
-From 937ce975f6fc60b4ad00a4759e55b66820814c4c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
+From 3cc16ae096f164ae0c6b98416c25a01db5f3a529 Mon Sep 17 00:00:00 2001
+From: Sherry Sun <sherry.sun@nxp.com>
 Date: Wed, 12 Mar 2025 10:39:03 +0800
 Subject: tty: serial: fsl_lpuart: use port struct directly to simply code
 
 From: Sherry Sun <sherry.sun@nxp.com>
 
-[ 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 <sherry.sun@nxp.com>
 Link: https://lore.kernel.org/r/20250312023904.1343351-3-sherry.sun@nxp.com
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Stable-dep-of: e98ab45ec518 ("tty: serial: lpuart: only disable CTS instead of overwriting the whole UARTMODIR register")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- 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 e86fb9c60f1c3..c2b522843b72c 100644
 --- a/drivers/tty/serial/fsl_lpuart.c
 +++ b/drivers/tty/serial/fsl_lpuart.c
-@@ -580,7 +580,7 @@ static int lpuart_dma_tx_request(struct uart_port *port)
+@@ -580,7 +580,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 e86fb9c60f1c3..c2b522843b72c 100644
                                "DMA slave config failed, err = %d\n", ret);
                return ret;
        }
-@@ -610,13 +610,13 @@ static void lpuart_flush_buffer(struct uart_port *port)
+@@ -610,13 +610,13 @@ static void lpuart_flush_buffer(struct u
        }
  
        if (lpuart_is_32(sport)) {
@@ -52,12 +48,7 @@ index e86fb9c60f1c3..c2b522843b72c 100644
        }
  }
  
-@@ -638,38 +638,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);
+@@ -643,33 +643,33 @@ static int lpuart_poll_init(struct uart_
        unsigned long flags;
        u8 temp;
  
@@ -104,11 +95,8 @@ index e86fb9c60f1c3..c2b522843b72c 100644
  
        return 0;
  }
-@@ -692,33 +690,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);
+@@ -695,30 +695,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 e86fb9c60f1c3..c2b522843b72c 100644
  
        return 0;
  }
-@@ -1448,12 +1445,9 @@ static void lpuart_dma_rx_free(struct uart_port *port)
+@@ -1448,12 +1448,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 e86fb9c60f1c3..c2b522843b72c 100644
  
        if (rs485->flags & SER_RS485_ENABLED) {
                /* Enable auto RS-485 RTS mode */
-@@ -1471,32 +1465,29 @@ static int lpuart_config_rs485(struct uart_port *port, struct ktermios *termios,
+@@ -1471,32 +1468,29 @@ static int lpuart_config_rs485(struct ua
                        modem &= ~UARTMODEM_TXRTSPOL;
        }
  
@@ -204,7 +192,7 @@ index e86fb9c60f1c3..c2b522843b72c 100644
  
        if (rs485->flags & SER_RS485_ENABLED) {
                /* Enable auto RS-485 RTS mode */
-@@ -1514,10 +1505,10 @@ static int lpuart32_config_rs485(struct uart_port *port, struct ktermios *termio
+@@ -1514,10 +1508,10 @@ static int lpuart32_config_rs485(struct
                        modem &= ~UARTMODIR_TXRTSPOL;
        }
  
@@ -217,7 +205,7 @@ index e86fb9c60f1c3..c2b522843b72c 100644
  
        return 0;
  }
-@@ -1828,11 +1819,11 @@ static int lpuart_startup(struct uart_port *port)
+@@ -1828,11 +1822,11 @@ static int lpuart_startup(struct uart_po
        u8 temp;
  
        /* determine FIFO size and enable FIFO mode */
@@ -231,7 +219,7 @@ index e86fb9c60f1c3..c2b522843b72c 100644
  
        sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTPFIFO_RXSIZE_OFF) &
                                            UARTPFIFO_FIFOSIZE_MASK);
-@@ -1888,11 +1879,11 @@ static int lpuart32_startup(struct uart_port *port)
+@@ -1888,11 +1882,11 @@ static int lpuart32_startup(struct uart_
        u32 temp;
  
        /* determine FIFO size */
@@ -245,7 +233,7 @@ index e86fb9c60f1c3..c2b522843b72c 100644
  
        sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTFIFO_RXSIZE_OFF) &
                                            UARTFIFO_FIFOSIZE_MASK);
-@@ -1905,7 +1896,7 @@ static int lpuart32_startup(struct uart_port *port)
+@@ -1905,7 +1899,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 e86fb9c60f1c3..c2b522843b72c 100644
        }
  
        lpuart_request_dma(sport);
-@@ -1965,8 +1956,8 @@ static void lpuart32_shutdown(struct uart_port *port)
+@@ -1965,8 +1959,8 @@ static void lpuart32_shutdown(struct uar
        uart_port_lock_irqsave(port, &flags);
  
        /* clear status */
@@ -265,7 +253,7 @@ index e86fb9c60f1c3..c2b522843b72c 100644
  
        /* disable Rx/Tx DMA */
        temp = lpuart32_read(port, UARTBAUD);
-@@ -1995,12 +1986,12 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -1995,12 +1989,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 e86fb9c60f1c3..c2b522843b72c 100644
        /*
         * only support CS8 and CS7, and for CS7 must enable PE.
         * supported mode:
-@@ -2032,7 +2023,7 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -2032,7 +2026,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 e86fb9c60f1c3..c2b522843b72c 100644
                termios->c_cflag &= ~CRTSCTS;
  
        if (termios->c_cflag & CRTSCTS)
-@@ -2073,59 +2064,59 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -2073,59 +2067,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 e86fb9c60f1c3..c2b522843b72c 100644
  
        if (old && sport->lpuart_dma_rx_use) {
                if (!lpuart_start_rx_dma(sport))
-@@ -2134,7 +2125,7 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -2134,7 +2128,7 @@ lpuart_set_termios(struct uart_port *por
                        sport->lpuart_dma_rx_use = false;
        }
  
@@ -383,7 +371,7 @@ index e86fb9c60f1c3..c2b522843b72c 100644
  }
  
  static void __lpuart32_serial_setbrg(struct uart_port *port,
-@@ -2232,9 +2223,9 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -2232,9 +2226,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 e86fb9c60f1c3..c2b522843b72c 100644
        sport->is_cs7 = false;
        /*
         * only support CS8 and CS7, and for CS7 must enable PE.
-@@ -2267,7 +2258,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -2267,7 +2261,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 e86fb9c60f1c3..c2b522843b72c 100644
                termios->c_cflag &= ~CRTSCTS;
  
        if (termios->c_cflag & CRTSCTS)
-@@ -2308,32 +2299,32 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -2308,32 +2302,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 e86fb9c60f1c3..c2b522843b72c 100644
        }
  
        /* update the per-port timeout */
-@@ -2345,22 +2336,22 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -2345,22 +2339,22 @@ lpuart32_set_termios(struct uart_port *p
         * asserted.
         */
        if (!(old_ctrl & UARTCTRL_SBK)) {
@@ -478,7 +466,7 @@ index e86fb9c60f1c3..c2b522843b72c 100644
  
        if ((ctrl & (UARTCTRL_PE | UARTCTRL_M)) == UARTCTRL_PE)
                sport->is_cs7 = true;
-@@ -2372,7 +2363,7 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -2372,7 +2366,7 @@ lpuart32_set_termios(struct uart_port *p
                        sport->lpuart_dma_rx_use = false;
        }
  
@@ -487,7 +475,7 @@ index e86fb9c60f1c3..c2b522843b72c 100644
  }
  
  static const char *lpuart_type(struct uart_port *port)
-@@ -2810,7 +2801,7 @@ static int lpuart_global_reset(struct lpuart_port *sport)
+@@ -2810,7 +2804,7 @@ static int lpuart_global_reset(struct lp
  
        ret = clk_prepare_enable(sport->ipg_clk);
        if (ret) {
@@ -496,7 +484,7 @@ index e86fb9c60f1c3..c2b522843b72c 100644
                return ret;
        }
  
-@@ -2821,10 +2812,10 @@ static int lpuart_global_reset(struct lpuart_port *sport)
+@@ -2821,10 +2815,10 @@ static int lpuart_global_reset(struct lp
                 */
                ctrl = lpuart32_read(port, UARTCTRL);
                if (ctrl & UARTCTRL_TE) {
@@ -509,7 +497,7 @@ index e86fb9c60f1c3..c2b522843b72c 100644
                                         "timeout waiting for transmit engine to complete\n");
                                clk_disable_unprepare(sport->ipg_clk);
                                return 0;
-@@ -3176,7 +3167,7 @@ static void lpuart_console_fixup(struct lpuart_port *sport)
+@@ -3176,7 +3170,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 e86fb9c60f1c3..c2b522843b72c 100644
  
                mutex_lock(&port->mutex);
                memset(&termios, 0, sizeof(struct ktermios));
--- 
-2.39.5
-