[vfs:for-next 86/91] arch/mips/lasat/picvue_proc.c:73:6: error: implicit declaration of function 'copy_from_user'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git for-next
head:   6731cb0ff06845c60d2c01880a885c7cad5a9356
commit: 58a8f3b69e071ba6c51a93f182e16184e2500c54 [86/91] mips: separate extable.h, switch module.h to it
config: mips-lasat_defconfig (attached as .config)
compiler: mipsel-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 58a8f3b69e071ba6c51a93f182e16184e2500c54
        # save the attached .config to linux build tree
        make.cross ARCH=mips 

All errors (new ones prefixed by >>):

   arch/mips/lasat/picvue_proc.c: In function 'pvc_line_proc_write':
>> arch/mips/lasat/picvue_proc.c:73:6: error: implicit declaration of function 'copy_from_user' [-Werror=implicit-function-declaration]
     if (copy_from_user(kbuf, buf, len))
         ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/copy_from_user +73 arch/mips/lasat/picvue_proc.c

1f21d2bd Brian Murphy    2007-08-21  57  
c0b4abdd Alexey Dobriyan 2009-11-27  58  static int pvc_line_proc_open(struct inode *inode, struct file *file)
1f21d2bd Brian Murphy    2007-08-21  59  {
d9dda78b Al Viro         2013-03-31  60  	return single_open(file, pvc_line_proc_show, PDE_DATA(inode));
1f21d2bd Brian Murphy    2007-08-21  61  }
1f21d2bd Brian Murphy    2007-08-21  62  
c0b4abdd Alexey Dobriyan 2009-11-27  63  static ssize_t pvc_line_proc_write(struct file *file, const char __user *buf,
c0b4abdd Alexey Dobriyan 2009-11-27  64  				   size_t count, loff_t *pos)
c0b4abdd Alexey Dobriyan 2009-11-27  65  {
d9dda78b Al Viro         2013-03-31  66  	int lineno = *(int *)PDE_DATA(file_inode(file));
c0b4abdd Alexey Dobriyan 2009-11-27  67  	char kbuf[PVC_LINELEN];
c0b4abdd Alexey Dobriyan 2009-11-27  68  	size_t len;
c0b4abdd Alexey Dobriyan 2009-11-27  69  
9b987c4d Dan Carpenter   2013-11-08  70  	BUG_ON(lineno < 0 || lineno >= PVC_NLINES);
c0b4abdd Alexey Dobriyan 2009-11-27  71  
c0b4abdd Alexey Dobriyan 2009-11-27  72  	len = min(count, sizeof(kbuf) - 1);
c0b4abdd Alexey Dobriyan 2009-11-27 @73  	if (copy_from_user(kbuf, buf, len))
c0b4abdd Alexey Dobriyan 2009-11-27  74  		return -EFAULT;
c0b4abdd Alexey Dobriyan 2009-11-27  75  	kbuf[len] = '\0';
1f21d2bd Brian Murphy    2007-08-21  76  
c0b4abdd Alexey Dobriyan 2009-11-27  77  	if (len > 0 && kbuf[len - 1] == '\n')
c0b4abdd Alexey Dobriyan 2009-11-27  78  		len--;
1f21d2bd Brian Murphy    2007-08-21  79  
8a39c520 Daniel Walker   2008-01-10  80  	mutex_lock(&pvc_mutex);
c0b4abdd Alexey Dobriyan 2009-11-27  81  	strncpy(pvc_lines[lineno], kbuf, len);

:::::: The code at line 73 was first introduced by commit
:::::: c0b4abdd529d8256acc4cf0094db385877f34ae6 MIPS: Lasat: Convert to proc_fops / seq_file

:::::: TO: Alexey Dobriyan <adobriyan@xxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux