All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-lts:5.10/KMB-yocto 8210/8457] drivers/tty/serial/8250/8250_port.c:1890:14: warning: variable 'skip_rx' set but not used
@ 2021-12-07 13:38 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-12-07 13:38 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6293 bytes --]

tree:   https://github.com/intel/linux-intel-lts.git 5.10/KMB-yocto
head:   e00ba07ec4720ed356ee8a0ae9a1f53f754b7577
commit: a34e97d69a97d031757c8e68207de5922d211f14 [8210/8457] Bug fixes for UART
config: nds32-defconfig (https://download.01.org/0day-ci/archive/20211207/202112072106.s3cRBA7y-lkp(a)intel.com/config)
compiler: nds32le-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel/linux-intel-lts/commit/a34e97d69a97d031757c8e68207de5922d211f14
        git remote add intel-lts https://github.com/intel/linux-intel-lts.git
        git fetch --no-tags intel-lts 5.10/KMB-yocto
        git checkout a34e97d69a97d031757c8e68207de5922d211f14
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/tty/serial/8250/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/tty/serial/8250/8250_port.c: In function 'serial8250_handle_irq':
>> drivers/tty/serial/8250/8250_port.c:1890:14: warning: variable 'skip_rx' set but not used [-Wunused-but-set-variable]
    1890 |         bool skip_rx = false;
         |              ^~~~~~~


vim +/skip_rx +1890 drivers/tty/serial/8250/8250_port.c

33d9b8b23a73d5 Peter Hurley        2016-04-09  1881  
b6830f6df8914f Peter Hurley        2015-06-27  1882  /*
b6830f6df8914f Peter Hurley        2015-06-27  1883   * This handles the interrupt from one port.
b6830f6df8914f Peter Hurley        2015-06-27  1884   */
b6830f6df8914f Peter Hurley        2015-06-27  1885  int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
b6830f6df8914f Peter Hurley        2015-06-27  1886  {
b6830f6df8914f Peter Hurley        2015-06-27  1887  	unsigned char status;
b6830f6df8914f Peter Hurley        2015-06-27  1888  	unsigned long flags;
b6830f6df8914f Peter Hurley        2015-06-27  1889  	struct uart_8250_port *up = up_to_u8250p(port);
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19 @1890  	bool skip_rx = false;
b6830f6df8914f Peter Hurley        2015-06-27  1891  
b6830f6df8914f Peter Hurley        2015-06-27  1892  	if (iir & UART_IIR_NO_INT)
b6830f6df8914f Peter Hurley        2015-06-27  1893  		return 0;
b6830f6df8914f Peter Hurley        2015-06-27  1894  
b6830f6df8914f Peter Hurley        2015-06-27  1895  	spin_lock_irqsave(&port->lock, flags);
b6830f6df8914f Peter Hurley        2015-06-27  1896  
b6830f6df8914f Peter Hurley        2015-06-27  1897  	status = serial_port_in(port, UART_LSR);
b6830f6df8914f Peter Hurley        2015-06-27  1898  
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1899  	/*
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1900  	 * If port is stopped and there are no error conditions in the
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1901  	 * FIFO, then don't drain the FIFO, as this may lead to TTY buffer
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1902  	 * overflow. Not servicing, RX FIFO would trigger auto HW flow
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1903  	 * control when FIFO occupancy reaches preset threshold, thus
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1904  	 * halting RX. This only works when auto HW flow control is
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1905  	 * available.
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1906  	 */
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1907  	if (!(status & (UART_LSR_FIFOE | UART_LSR_BRK_ERROR_BITS)) &&
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1908  	    (port->status & (UPSTAT_AUTOCTS | UPSTAT_AUTORTS)) &&
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1909  	    !(port->read_status_mask & UART_LSR_DR))
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1910  		skip_rx = true;
f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19  1911  
a34e97d69a97d0 Aman Kumar          2021-03-09  1912  	if (port->iir_rdi) {
a34e97d69a97d0 Aman Kumar          2021-03-09  1913  		if (status & (UART_LSR_DR | UART_LSR_BI) &&
a34e97d69a97d0 Aman Kumar          2021-03-09  1914  		    iir & UART_IIR_RDI) {
33d9b8b23a73d5 Peter Hurley        2016-04-09  1915  			if (!up->dma || handle_rx_dma(up, iir))
b6830f6df8914f Peter Hurley        2015-06-27  1916  				status = serial8250_rx_chars(up, status);
b6830f6df8914f Peter Hurley        2015-06-27  1917  		}
a34e97d69a97d0 Aman Kumar          2021-03-09  1918  	} else {
a34e97d69a97d0 Aman Kumar          2021-03-09  1919  		if (status & (UART_LSR_DR | UART_LSR_BI)) {
a34e97d69a97d0 Aman Kumar          2021-03-09  1920  			if (!up->dma || handle_rx_dma(up, iir))
a34e97d69a97d0 Aman Kumar          2021-03-09  1921  				status = serial8250_rx_chars(up, status);
a34e97d69a97d0 Aman Kumar          2021-03-09  1922  		}
a34e97d69a97d0 Aman Kumar          2021-03-09  1923  	}
b6830f6df8914f Peter Hurley        2015-06-27  1924  	serial8250_modem_status(up);
db1b5bc047b3ca Rautkoski Kimmo EXT 2019-05-24  1925  	if ((!up->dma || up->dma->tx_err) && (status & UART_LSR_THRE) &&
db1b5bc047b3ca Rautkoski Kimmo EXT 2019-05-24  1926  		(up->ier & UART_IER_THRI))
b6830f6df8914f Peter Hurley        2015-06-27  1927  		serial8250_tx_chars(up);
b6830f6df8914f Peter Hurley        2015-06-27  1928  
596f63da42b928 Douglas Anderson    2018-10-30  1929  	uart_unlock_and_check_sysrq(port, flags);
b6830f6df8914f Peter Hurley        2015-06-27  1930  	return 1;
b6830f6df8914f Peter Hurley        2015-06-27  1931  }
b6830f6df8914f Peter Hurley        2015-06-27  1932  EXPORT_SYMBOL_GPL(serial8250_handle_irq);
b6830f6df8914f Peter Hurley        2015-06-27  1933  

:::::: The code at line 1890 was first introduced by commit
:::::: f19c3f6c8109b8bab000afd35580929958e087a9 serial: 8250_port: Don't service RX FIFO if throttled

:::::: TO: Vignesh Raghavendra <vigneshr@ti.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-07 13:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 13:38 [intel-lts:5.10/KMB-yocto 8210/8457] drivers/tty/serial/8250/8250_port.c:1890:14: warning: variable 'skip_rx' set but not used kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.