Re: [PATCH v1 2/3] tty/serial: ttvys: add null modem driver emulating serial port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rishi,

I love your patch! Yet something to improve:

[auto build test ERROR on tty/tty-testing]
[also build test ERROR on robh/for-next usb/usb-testing linus/master v5.5-rc5 next-20200106]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Rishi-Gupta/Add-virtual-serial-null-modem-emulation-driver/20200106-155424
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers//tty/ttyvs.c: In function 'vs_get_serinfo':
>> drivers//tty/ttyvs.c:1012:8: error: implicit declaration of function 'copy_to_user'; did you mean 'cpu_to_mem'? [-Werror=implicit-function-declaration]
     ret = copy_to_user((void __user *)arg, &info,
           ^~~~~~~~~~~~
           cpu_to_mem
   drivers//tty/ttyvs.c: In function 'vs_card_write':
>> drivers//tty/ttyvs.c:1996:7: error: implicit declaration of function 'copy_from_user'; did you mean 'copy_creds'? [-Werror=implicit-function-declaration]
      if (copy_from_user(data, buf, length) != 0)
          ^~~~~~~~~~~~~~
          copy_creds
   cc1: some warnings being treated as errors

vim +1012 drivers//tty/ttyvs.c

   985	
   986	/* Provides information as a repsonse to TIOCGSERIAL IOCTL */
   987	static int vs_get_serinfo(struct tty_struct *tty, unsigned long arg)
   988	{
   989		int ret;
   990		struct serial_struct info;
   991		struct vs_dev *local_vsdev = db[tty->index].vsdev;
   992		struct serial_struct serial = local_vsdev->serial;
   993	
   994		if (!arg)
   995			return -EFAULT;
   996	
   997		memset(&info, 0, sizeof(info));
   998	
   999		info.type		    = PORT_UNKNOWN;
  1000		info.line		    = serial.line;
  1001		info.port		    = tty->index;
  1002		info.irq			= 0;
  1003		info.flags		    = tty->port->flags;
  1004		info.xmit_fifo_size = 0;
  1005		info.baud_base	    = 0;
  1006		info.close_delay	= tty->port->close_delay;
  1007		info.closing_wait   = tty->port->closing_wait;
  1008		info.custom_divisor = 0;
  1009		info.hub6		    = 0;
  1010		info.io_type		= SERIAL_IO_MEM;
  1011	
> 1012		ret = copy_to_user((void __user *)arg, &info,
  1013					sizeof(struct serial_struct));
  1014	
  1015		return ret ? -EFAULT : 0;
  1016	}
  1017	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux