linux-mips
[Top] [All Lists]

[PATCH] add __user tag to csum_partial_copy_from_user

To: linux-mips@linux-mips.org
Subject: [PATCH] add __user tag to csum_partial_copy_from_user
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Mon, 24 Oct 2005 23:19:53 +0900 (JST)
Cc: ralf@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Add __user tag to csum_partial_copy_from_user to fix some sparse
warnings.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/arch/mips/lib/csum_partial_copy.c 
b/arch/mips/lib/csum_partial_copy.c
--- a/arch/mips/lib/csum_partial_copy.c
+++ b/arch/mips/lib/csum_partial_copy.c
@@ -33,7 +33,7 @@ unsigned int csum_partial_copy_nocheck(c
  * Copy from userspace and compute checksum.  If we catch an exception
  * then zero the rest of the buffer.
  */
-unsigned int csum_partial_copy_from_user (const unsigned char *src,
+unsigned int csum_partial_copy_from_user (const unsigned char __user *src,
        unsigned char *dst, int len, unsigned int sum, int *err_ptr)
 {
        int missing;
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h
--- a/include/asm-mips/checksum.h
+++ b/include/asm-mips/checksum.h
@@ -34,8 +34,9 @@ unsigned int csum_partial(const unsigned
  * this is a new version of the above that records errors it finds in *errp,
  * but continues and zeros the rest of the buffer.
  */
-unsigned int csum_partial_copy_from_user(const unsigned char *src, unsigned 
char *dst, int len,
-                                         unsigned int sum, int *errp);
+unsigned int csum_partial_copy_from_user(const unsigned char __user *src,
+                                        unsigned char *dst, int len,
+                                        unsigned int sum, int *errp);
 
 /*
  * Copy and checksum to user

<Prev in Thread] Current Thread [Next in Thread>