* [input:master 1384/1384] drivers/input/evdev.c:719:7: warning: passing argument 1 of 'copy_from_user' discards 'const' qualifier from pointer target type
@ 2015-10-27 1:52 kbuild test robot
2015-10-27 2:08 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2015-10-27 1:52 UTC (permalink / raw)
To: David Herrmann; +Cc: kbuild-all, linux-input, Dmitry Torokhov
[-- Attachment #1: Type: text/plain, Size: 2041 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git master
head: 86f77bf98fdd07cd7e9b65014c5f8d8d233b3449
commit: 86f77bf98fdd07cd7e9b65014c5f8d8d233b3449 [1384/1384] Input: evdev - add event-mask API
config: sparc64-allyesconfig (attached as .config)
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 86f77bf98fdd07cd7e9b65014c5f8d8d233b3449
# save the attached .config to linux build tree
make.cross ARCH=sparc64
All warnings (new ones prefixed by >>):
drivers/input/evdev.c: In function 'bits_from_user':
>> drivers/input/evdev.c:719:7: warning: passing argument 1 of 'copy_from_user' discards 'const' qualifier from pointer target type
if (copy_from_user(p, bits, len))
^
In file included from arch/sparc/include/asm/uaccess.h:4:0,
from include/linux/poll.h:11,
from drivers/input/evdev.c:18:
arch/sparc/include/asm/uaccess_64.h:251:1: note: expected 'void *' but argument is of type 'const void *'
copy_from_user(void *to, const void __user *from, unsigned long size)
^
vim +719 drivers/input/evdev.c
703 if (copy_from_user((compat_long_t *) bits +
704 i + 1 - ((i % 2) << 1),
705 (compat_long_t __user *) p + i,
706 sizeof(compat_long_t)))
707 return -EFAULT;
708 if (i % 2)
709 *((compat_long_t *) bits + i - 1) = 0;
710
711 } else {
712 if (maxlen % sizeof(long))
713 return -EINVAL;
714
715 len = BITS_TO_LONGS(maxbit) * sizeof(long);
716 if (len > maxlen)
717 len = maxlen;
718
> 719 if (copy_from_user(p, bits, len))
720 return -EFAULT;
721 }
722
723 return len;
724 }
725
726 #else
727
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 43761 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [input:master 1384/1384] drivers/input/evdev.c:719:7: warning: passing argument 1 of 'copy_from_user' discards 'const' qualifier from pointer target type
2015-10-27 1:52 [input:master 1384/1384] drivers/input/evdev.c:719:7: warning: passing argument 1 of 'copy_from_user' discards 'const' qualifier from pointer target type kbuild test robot
@ 2015-10-27 2:08 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2015-10-27 2:08 UTC (permalink / raw)
To: kbuild test robot; +Cc: David Herrmann, kbuild-all, linux-input
On Tue, Oct 27, 2015 at 09:52:20AM +0800, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git master
> head: 86f77bf98fdd07cd7e9b65014c5f8d8d233b3449
> commit: 86f77bf98fdd07cd7e9b65014c5f8d8d233b3449 [1384/1384] Input: evdev - add event-mask API
> config: sparc64-allyesconfig (attached as .config)
> 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 86f77bf98fdd07cd7e9b65014c5f8d8d233b3449
> # save the attached .config to linux build tree
> make.cross ARCH=sparc64
>
> All warnings (new ones prefixed by >>):
>
> drivers/input/evdev.c: In function 'bits_from_user':
> >> drivers/input/evdev.c:719:7: warning: passing argument 1 of 'copy_from_user' discards 'const' qualifier from pointer target type
> if (copy_from_user(p, bits, len))
> ^
> In file included from arch/sparc/include/asm/uaccess.h:4:0,
> from include/linux/poll.h:11,
> from drivers/input/evdev.c:18:
> arch/sparc/include/asm/uaccess_64.h:251:1: note: expected 'void *' but argument is of type 'const void *'
> copy_from_user(void *to, const void __user *from, unsigned long size)
> ^
Should be fixed now.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-27 2:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-27 1:52 [input:master 1384/1384] drivers/input/evdev.c:719:7: warning: passing argument 1 of 'copy_from_user' discards 'const' qualifier from pointer target type kbuild test robot
2015-10-27 2:08 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).