mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 4/4] asm-generic: uaccess: fix access_ok() prototype
Date: Sun, 14 Jun 2009 02:00:04 -0400	[thread overview]
Message-ID: <1244959204-11269-4-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1244959204-11269-1-git-send-email-vapier@gentoo.org>

From: Arnd Bergmann <arnd@arndb.de>

The access_ok() function operates on a pointer, not unsigned long.
Otherwise builds result in a crazy amount of warnings such as:

 CC [M]  fs/smbfs/request.o
In file included from
/usr/local/src/linux/linux-2.6/arch/blackfin/include/asm/uaccess.h:17,
                from include/net/checksum.h:26,
                from include/linux/skbuff.h:28,
                from include/linux/ip.h:109,
                from include/net/ip.h:27,
                from fs/smbfs/smbiod.c:23:
include/asm-generic/uaccess.h: In function ‘copy_from_user’:
include/asm-generic/uaccess.h:247: warning: passing argument 1 of
	‘_access_ok’ makes integer from pointer without a cast
include/asm-generic/uaccess.h: In function ‘copy_to_user’:
include/asm-generic/uaccess.h:257: warning: passing argument 1 of
	‘_access_ok’ makes integer from pointer without a cast
include/asm-generic/uaccess.h: In function ‘strncpy_from_user’:
include/asm-generic/uaccess.h:281: warning: passing argument 1 of
	‘_access_ok’ makes integer from pointer without a cast
include/asm-generic/uaccess.h: In function ‘clear_user’:
include/asm-generic/uaccess.h:319: warning: passing argument 1 of
	‘_access_ok’ makes integer from pointer without a cast

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 include/asm-generic/uaccess.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h
index d3a9519..4b32dab 100644
--- a/include/asm-generic/uaccess.h
+++ b/include/asm-generic/uaccess.h
@@ -37,14 +37,14 @@ static inline void set_fs(mm_segment_t fs)
 #define VERIFY_READ	0
 #define VERIFY_WRITE	1
 
-#define access_ok(type, addr, size) __access_ok((unsigned long)(addr),(size))
+#define access_ok(type, addr, size) __access_ok((addr), (size))
 
 /*
  * The architecture should really override this if possible, at least
  * doing a check on the get_fs()
  */
 #ifndef __access_ok
-static inline int __access_ok(unsigned long addr, unsigned long size)
+static inline int __access_ok(void __user *ptr, unsigned long size)
 {
 	return 1;
 }
-- 
1.6.3.1


  parent reply	other threads:[~2009-06-14  6:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-14  6:00 [PATCH 1/4] asm-generic: uaccess: do not expand args multiple times Mike Frysinger
2009-06-14  6:00 ` [PATCH 2/4] asm-generic: uaccess: add missing access_ok() check to strnlen_user() Mike Frysinger
2009-06-14 20:35   ` Arnd Bergmann
2009-06-14  6:00 ` [PATCH 3/4] asm-generic: uaccess: fix up local access_ok() usage Mike Frysinger
2009-06-14 20:35   ` Arnd Bergmann
2009-06-14  6:00 ` Mike Frysinger [this message]
2009-06-14 20:17   ` [PATCH 4/4] asm-generic: uaccess: fix access_ok() prototype Arnd Bergmann
2009-06-16 10:34     ` Mike Frysinger
2009-06-14 20:14 ` [PATCH 1/4] asm-generic: uaccess: do not expand args multiple times Arnd Bergmann
2009-06-24  4:38   ` Al Viro
2009-06-24 11:35     ` Mike Frysinger

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=1244959204-11269-4-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    /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®