Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Linux MIPS List <linux-mips@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>, zhangfx@lemote.com, yanh@lemote.com
Subject: [PATCH] fix warning: incompatiable argument type of clear_user
Date: Tue, 12 May 2009 14:22:32 +0800	[thread overview]
Message-ID: <1242109352.4890.11.camel@falcon> (raw)

hi, Ralf

there are lots of warnings about the macro: clear_user in linux-mips.
in linux-2.6.29.3, it will come with errors, so, must be fixed.

the type of the second argument of access_ok should be void __user *,
but there is an un-needed (unsigned long) conversion before __cl_addr,
so remove the (unsigned long) will fix this problem.

       best regards, 
       Wu Zhangjin

--
diff --git a/arch/mips/include/asm/uaccess.h
b/arch/mips/include/asm/uaccess.h
index 42b9cec..cd32e9f 100644
--- a/arch/mips/include/asm/uaccess.h
+++ b/arch/mips/include/asm/uaccess.h
@@ -936,7 +936,7 @@ __clear_user(void __user *addr, __kernel_size_t
size)
 	void __user * __cl_addr = (addr);				\
 	unsigned long __cl_size = (n);					\
 	if (__cl_size && access_ok(VERIFY_WRITE,			\
-		((unsigned long)(__cl_addr)), __cl_size))		\
+					__cl_addr, __cl_size))		\
 		__cl_size = __clear_user(__cl_addr, __cl_size);		\
 	__cl_size;							\
 })

                 reply	other threads:[~2009-05-12  6:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1242109352.4890.11.camel@falcon \
    --to=wuzhangjin@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=yanh@lemote.com \
    --cc=zhangfx@lemote.com \
    /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