From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] lib/usercopy: fix sparse errors
Date: Sat, 9 Dec 2017 17:24:24 +0100 (CET) [thread overview]
Message-ID: <20171209162424.E5CEF41C4C@localhost.localdomain> (raw)
CHECK lib/usercopy.c
lib/usercopy.c:26:13: warning: incorrect type in argument 1 (different address spaces)
lib/usercopy.c:26:13: expected void const volatile [noderef] <asn:1>*<noident>
lib/usercopy.c:26:13: got void *to
lib/usercopy.c:27:34: warning: incorrect type in argument 1 (different address spaces)
lib/usercopy.c:27:34: expected void const volatile *p
lib/usercopy.c:27:34: got void const [noderef] <asn:1>*from
lib/usercopy.c:28:38: warning: incorrect type in argument 1 (different address spaces)
lib/usercopy.c:28:38: expected void [noderef] <asn:1>*to
lib/usercopy.c:28:38: got void *to
lib/usercopy.c:28:42: warning: incorrect type in argument 2 (different address spaces)
lib/usercopy.c:28:42: expected void const *from
lib/usercopy.c:28:42: got void const [noderef] <asn:1>*from
lib/usercopy.c:23:15: error: symbol '_copy_to_user' redeclared with different type (originally declared at ./include/linux/uaccess.h:140) - incompatible argument 1 (different address spaces)
CC lib/usercopy.o
Fixes: d597580d37377 ("generic ...copy_..._user primitives")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
lib/usercopy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/usercopy.c b/lib/usercopy.c
index 15e2e6f..3744b2a 100644
--- a/lib/usercopy.c
+++ b/lib/usercopy.c
@@ -20,7 +20,7 @@ EXPORT_SYMBOL(_copy_from_user);
#endif
#ifndef INLINE_COPY_TO_USER
-unsigned long _copy_to_user(void *to, const void __user *from, unsigned long n)
+unsigned long _copy_to_user(void __user *to, const void *from, unsigned long n)
{
might_fault();
if (likely(access_ok(VERIFY_WRITE, to, n))) {
--
2.2.2
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
next reply other threads:[~2017-12-09 16:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-09 16:24 Christophe Leroy [this message]
2017-12-17 17:21 ` Luc Van Oostenryck
2017-12-17 17:31 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171209162424.E5CEF41C4C@localhost.localdomain \
--to=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®