lkml.org 
[lkml]   [2020]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 2/3] tty/serial: ttvys: add null modem driver emulating serial port
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@intel.com>

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@lists.01.org Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-01-06 22:21    [W:0.121 / U:28.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site