linux-mips
[Top] [All Lists]

[loongson-PATCH-v1 03/27] fix-error: incompatiable argument type of clea

To: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Subject: [loongson-PATCH-v1 03/27] fix-error: incompatiable argument type of clear_user
From: wuzhangjin@gmail.com
Date: Thu, 21 May 2009 05:50:01 +0800
Cc: Wu Zhangjin <wuzhangjin@gmail.com>, Yan hua <yanh@lemote.com>, Philippe Vachon <philippe@cowpig.ca>, Zhang Le <r0bertz@gentoo.org>, Zhang Fuxin <zhangfx@lemote.com>, Arnaud Patard <apatard@mandriva.com>, loongson-dev@googlegroups.com, gnewsense-dev@nongnu.org, Nicholas Mc Guire <hofrat@hofr.at>, Liu Junliang <liujl@lemote.com>, Erwan Lerale <erwan@thiscow.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=7GLYgYkPVMqlFOYAg0mBhsTUdUm3NMkeOoXKoKbSbZc=; b=KyWTbKXB95Tz4bbXCrg67KCnQqz9YuTd8hN5s7ZJkXSC8slCKjQFOmB3fnc5qY4wCY znkdcCfjAqjlu7ZQY30hBo5Y36RPPvFHeLBu8J/Q7tM1jQfJphPpooKncARe4Dst+OBU 9d3FSQ3d2dsynnEL3PUw7A/L0cltAaUrXgRI0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=FuTvYVwgf2Xyq4EzL5iEFgfU3Ki/WYLaVMzKQAlugmqll1NgFljSLIHq8tR9cWLIPK 4r0ABBH8i8ykAsKMBs20F/2O6rloxcsz7vmhrdHuEmkA3s1CAB5A84inOsc3bwrqPsFv NkJQk4kjA9nBJsYw4F+cslOe0vTiUIkwOw5DA=
In-reply-to: <cover.1242855716.git.wuzhangjin@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <cover.1242855716.git.wuzhangjin@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: Wu Zhangjin <wuzhangjin@gmail.com>

there are lots of warnings about the macro: clear_user in linux-mips.

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.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
 arch/mips/include/asm/uaccess.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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;                                                      \
 })
-- 
1.6.2.1


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