Blackfin: Annotate strncpy_from_user src parameter with __user
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 17 Oct 2012 14:28:02 +0000 (16:28 +0200)
committerBob Liu <lliubbo@gmail.com>
Thu, 13 Dec 2012 05:50:56 +0000 (13:50 +0800)
commitd95dcaa06ba895ec379d80b35c25ddba3a71943a
tree82e135400f20a33709b90b100c86c82167a3cf19
parente9dfcdbd76b14a24e751d6e0bfb29dc262c69b0c
Blackfin: Annotate strncpy_from_user src parameter with __user

The src parameter of strncpy_from_user is supposed to take a string from
userspace, so it should be annotated with __user. Doing so fixes the following
and similar warnings from sparse:

kernel/sys.c:491:51: warning: incorrect type in argument 2 (different address spaces)
kernel/sys.c:491:51:    expected char const *src
kernel/sys.c:491:51:    got void [noderef] <asn:1>*arg
kernel/sys.c:2061:54: warning: incorrect type in argument 2 (different address spaces)
kernel/sys.c:2061:54:    expected char const *src
kernel/sys.c:2061:54:    got char [noderef] <asn:1>*<noident>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
arch/blackfin/include/asm/uaccess.h