lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204120057.UCJiKzhW-lkp@intel.com>
Date:   Tue, 12 Apr 2022 00:08:41 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jiri Slaby <jslaby@...e.cz>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [jirislaby:devel 48/48] drivers/tty/serial/max310x.c:750:45: error:
 'struct uart_state' has no member named 'xmit'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head:   c196e3b15cddb539135de6a3c6bcf32b89213b4c
commit: c196e3b15cddb539135de6a3c6bcf32b89213b4c [48/48] tty: serial, use kfifo
config: parisc-buildonly-randconfig-r003-20220411 (https://download.01.org/0day-ci/archive/20220412/202204120057.UCJiKzhW-lkp@intel.com/config)
compiler: hppa-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://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/commit/?id=c196e3b15cddb539135de6a3c6bcf32b89213b4c
        git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
        git fetch --no-tags jirislaby devel
        git checkout c196e3b15cddb539135de6a3c6bcf32b89213b4c
        # 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=parisc SHELL=/bin/bash drivers/tty/serial/

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

All errors (new ones prefixed by >>):

   drivers/tty/serial/max310x.c: In function 'max310x_handle_tx':
>> drivers/tty/serial/max310x.c:750:45: error: 'struct uart_state' has no member named 'xmit'
     750 |         struct circ_buf *xmit = &port->state->xmit;
         |                                             ^~
>> drivers/tty/serial/max310x.c:760:13: error: implicit declaration of function 'uart_circ_empty' [-Werror=implicit-function-declaration]
     760 |         if (uart_circ_empty(xmit) || uart_tx_stopped(port))
         |             ^~~~~~~~~~~~~~~
>> drivers/tty/serial/max310x.c:764:19: error: implicit declaration of function 'uart_circ_chars_pending' [-Werror=implicit-function-declaration]
     764 |         to_send = uart_circ_chars_pending(xmit);
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/serial/max310x.c:765:21: error: implicit declaration of function 'CIRC_CNT_TO_END' [-Werror=implicit-function-declaration]
     765 |         until_end = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE);
         |                     ^~~~~~~~~~~~~~~
>> drivers/tty/serial/max310x.c:765:41: error: invalid use of undefined type 'struct circ_buf'
     765 |         until_end = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE);
         |                                         ^~
   drivers/tty/serial/max310x.c:765:53: error: invalid use of undefined type 'struct circ_buf'
     765 |         until_end = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE);
         |                                                     ^~
   drivers/tty/serial/max310x.c:775:55: error: invalid use of undefined type 'struct circ_buf'
     775 |                         max310x_batch_write(port, xmit->buf + xmit->tail, until_end);
         |                                                       ^~
   drivers/tty/serial/max310x.c:775:67: error: invalid use of undefined type 'struct circ_buf'
     775 |                         max310x_batch_write(port, xmit->buf + xmit->tail, until_end);
         |                                                                   ^~
   drivers/tty/serial/max310x.c:776:55: error: invalid use of undefined type 'struct circ_buf'
     776 |                         max310x_batch_write(port, xmit->buf, to_send - until_end);
         |                                                       ^~
   drivers/tty/serial/max310x.c:778:55: error: invalid use of undefined type 'struct circ_buf'
     778 |                         max310x_batch_write(port, xmit->buf + xmit->tail, to_send);
         |                                                       ^~
   drivers/tty/serial/max310x.c:778:67: error: invalid use of undefined type 'struct circ_buf'
     778 |                         max310x_batch_write(port, xmit->buf + xmit->tail, to_send);
         |                                                                   ^~
   drivers/tty/serial/max310x.c:783:21: error: invalid use of undefined type 'struct circ_buf'
     783 |                 xmit->tail = (xmit->tail + to_send) & (UART_XMIT_SIZE - 1);
         |                     ^~
   drivers/tty/serial/max310x.c:783:35: error: invalid use of undefined type 'struct circ_buf'
     783 |                 xmit->tail = (xmit->tail + to_send) & (UART_XMIT_SIZE - 1);
         |                                   ^~
   cc1: some warnings being treated as errors
--
   drivers/tty/serial/men_z135_uart.c: In function 'men_z135_handle_tx':
>> drivers/tty/serial/men_z135_uart.c:296:45: error: 'struct uart_state' has no member named 'xmit'
     296 |         struct circ_buf *xmit = &port->state->xmit;
         |                                             ^~
>> drivers/tty/serial/men_z135_uart.c:306:13: error: implicit declaration of function 'uart_circ_empty' [-Werror=implicit-function-declaration]
     306 |         if (uart_circ_empty(xmit))
         |             ^~~~~~~~~~~~~~~
>> drivers/tty/serial/men_z135_uart.c:316:16: error: implicit declaration of function 'uart_circ_chars_pending' [-Werror=implicit-function-declaration]
     316 |         qlen = uart_circ_chars_pending(xmit);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/serial/men_z135_uart.c:348:20: error: invalid use of undefined type 'struct circ_buf'
     348 |         head = xmit->head & (UART_XMIT_SIZE - 1);
         |                    ^~
   drivers/tty/serial/men_z135_uart.c:349:20: error: invalid use of undefined type 'struct circ_buf'
     349 |         tail = xmit->tail & (UART_XMIT_SIZE - 1);
         |                    ^~
   drivers/tty/serial/men_z135_uart.c:354:59: error: invalid use of undefined type 'struct circ_buf'
     354 |         memcpy_toio(port->membase + MEN_Z135_TX_RAM, &xmit->buf[xmit->tail], n);
         |                                                           ^~
   drivers/tty/serial/men_z135_uart.c:354:69: error: invalid use of undefined type 'struct circ_buf'
     354 |         memcpy_toio(port->membase + MEN_Z135_TX_RAM, &xmit->buf[xmit->tail], n);
         |                                                                     ^~
   drivers/tty/serial/men_z135_uart.c:355:13: error: invalid use of undefined type 'struct circ_buf'
     355 |         xmit->tail = (xmit->tail + n) & (UART_XMIT_SIZE - 1);
         |             ^~
   drivers/tty/serial/men_z135_uart.c:355:27: error: invalid use of undefined type 'struct circ_buf'
     355 |         xmit->tail = (xmit->tail + n) & (UART_XMIT_SIZE - 1);
         |                           ^~
   cc1: some warnings being treated as errors


vim +750 drivers/tty/serial/max310x.c

f65444187a66bf Alexander Shiyan 2012-08-06  747  
10d8b34a421716 Alexander Shiyan 2013-06-29  748  static void max310x_handle_tx(struct uart_port *port)
f65444187a66bf Alexander Shiyan 2012-08-06  749  {
10d8b34a421716 Alexander Shiyan 2013-06-29 @750  	struct circ_buf *xmit = &port->state->xmit;
d584b65c0ddf20 Jan Kundrát      2017-12-13  751  	unsigned int txlen, to_send, until_end;
f65444187a66bf Alexander Shiyan 2012-08-06  752  
10d8b34a421716 Alexander Shiyan 2013-06-29  753  	if (unlikely(port->x_char)) {
10d8b34a421716 Alexander Shiyan 2013-06-29  754  		max310x_port_write(port, MAX310X_THR_REG, port->x_char);
10d8b34a421716 Alexander Shiyan 2013-06-29  755  		port->icount.tx++;
10d8b34a421716 Alexander Shiyan 2013-06-29  756  		port->x_char = 0;
f65444187a66bf Alexander Shiyan 2012-08-06  757  		return;
f65444187a66bf Alexander Shiyan 2012-08-06  758  	}
f65444187a66bf Alexander Shiyan 2012-08-06  759  
10d8b34a421716 Alexander Shiyan 2013-06-29 @760  	if (uart_circ_empty(xmit) || uart_tx_stopped(port))
f65444187a66bf Alexander Shiyan 2012-08-06  761  		return;
f65444187a66bf Alexander Shiyan 2012-08-06  762  
f65444187a66bf Alexander Shiyan 2012-08-06  763  	/* Get length of data pending in circular buffer */
f65444187a66bf Alexander Shiyan 2012-08-06 @764  	to_send = uart_circ_chars_pending(xmit);
d584b65c0ddf20 Jan Kundrát      2017-12-13 @765  	until_end = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE);
f65444187a66bf Alexander Shiyan 2012-08-06  766  	if (likely(to_send)) {
f65444187a66bf Alexander Shiyan 2012-08-06  767  		/* Limit to size of TX FIFO */
10d8b34a421716 Alexander Shiyan 2013-06-29  768  		txlen = max310x_port_read(port, MAX310X_TXFIFOLVL_REG);
10d8b34a421716 Alexander Shiyan 2013-06-29  769  		txlen = port->fifosize - txlen;
f65444187a66bf Alexander Shiyan 2012-08-06  770  		to_send = (to_send > txlen) ? txlen : to_send;
f65444187a66bf Alexander Shiyan 2012-08-06  771  
d584b65c0ddf20 Jan Kundrát      2017-12-13  772  		if (until_end < to_send) {
d584b65c0ddf20 Jan Kundrát      2017-12-13  773  			/* It's a circ buffer -- wrap around.
d584b65c0ddf20 Jan Kundrát      2017-12-13  774  			 * We could do that in one SPI transaction, but meh. */
d584b65c0ddf20 Jan Kundrát      2017-12-13  775  			max310x_batch_write(port, xmit->buf + xmit->tail, until_end);
d584b65c0ddf20 Jan Kundrát      2017-12-13  776  			max310x_batch_write(port, xmit->buf, to_send - until_end);
d584b65c0ddf20 Jan Kundrát      2017-12-13  777  		} else {
d584b65c0ddf20 Jan Kundrát      2017-12-13  778  			max310x_batch_write(port, xmit->buf + xmit->tail, to_send);
d584b65c0ddf20 Jan Kundrát      2017-12-13  779  		}
d584b65c0ddf20 Jan Kundrát      2017-12-13  780  
f65444187a66bf Alexander Shiyan 2012-08-06  781  		/* Add data to send */
10d8b34a421716 Alexander Shiyan 2013-06-29  782  		port->icount.tx += to_send;
d584b65c0ddf20 Jan Kundrát      2017-12-13  783  		xmit->tail = (xmit->tail + to_send) & (UART_XMIT_SIZE - 1);
f65444187a66bf Alexander Shiyan 2012-08-06  784  	}
f65444187a66bf Alexander Shiyan 2012-08-06  785  
f65444187a66bf Alexander Shiyan 2012-08-06  786  	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
10d8b34a421716 Alexander Shiyan 2013-06-29  787  		uart_write_wakeup(port);
f65444187a66bf Alexander Shiyan 2012-08-06  788  }
f65444187a66bf Alexander Shiyan 2012-08-06  789  

:::::: The code at line 750 was first introduced by commit
:::::: 10d8b34a421716d55a4ff7c2d427c35e88b8fd60 serial: max310x: Driver rework

:::::: TO: Alexander Shiyan <shc_work@...l.ru>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ