]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tty: serial: fsl_lpuart: Fix unused variable 'sport' build warning
authorSherry Sun <sherry.sun@nxp.com>
Mon, 24 Mar 2025 02:10:51 +0000 (10:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Mar 2025 13:27:10 +0000 (06:27 -0700)
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

index 33eeefa6fa8f8dfdef3e9d46eebb5e6ed27807d4..4470966b826ccabc34eb4a1641b1568d5d164b93 100644 (file)
@@ -639,8 +639,6 @@ 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);
        unsigned long flags;
        u8 fifo;
 
@@ -693,7 +691,6 @@ 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);
        u32 fifo;
 
        port->fifosize = 0;