From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5028690116442699102==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [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 Date: Tue, 07 Dec 2021 21:38:07 +0800 Message-ID: <202112072106.s3cRBA7y-lkp@intel.com> List-Id: --===============5028690116442699102== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/2= 02112072106.s3cRBA7y-lkp(a)intel.com/config) compiler: nds32le-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/a34e97d69a97d0317= 57c8e68207de5922d211f14 git remote add intel-lts https://github.com/intel/linux-intel-lts.g= it 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=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dnds32 SHELL=3D/bin/bash drivers/tty/serial/8250/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot 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 =3D 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 in= terrupt 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 =3D up_to_u8250p(port); f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19 @1890 bool skip_rx =3D fals= e; 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(&po= rt->lock, flags); b6830f6df8914f Peter Hurley 2015-06-27 1896 = b6830f6df8914f Peter Hurley 2015-06-27 1897 status =3D serial_por= t_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 d= rain the FIFO, as this may lead to TTY buffer f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19 1902 * overflow. Not serv= icing, 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 o= nly 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_stat= us_mask & UART_LSR_DR)) f19c3f6c8109b8 Vignesh Raghavendra 2020-03-19 1910 skip_rx =3D 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_L= SR_DR | UART_LSR_BI) && a34e97d69a97d0 Aman Kumar 2021-03-09 1914 iir & UART_IIR_R= DI) { 33d9b8b23a73d5 Peter Hurley 2016-04-09 1915 if (!up->dma || han= dle_rx_dma(up, iir)) b6830f6df8914f Peter Hurley 2015-06-27 1916 status =3D serial8= 250_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_L= SR_DR | UART_LSR_BI)) { a34e97d69a97d0 Aman Kumar 2021-03-09 1920 if (!up->dma || han= dle_rx_dma(up, iir)) a34e97d69a97d0 Aman Kumar 2021-03-09 1921 status =3D serial8= 250_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_stat= us(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(seri= al8250_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 se= rvice RX FIFO if throttled :::::: TO: Vignesh Raghavendra :::::: CC: Greg Kroah-Hartman --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============5028690116442699102==--