From: Russ Cox Date: Mon, 26 Mar 2007 15:23:56 +0000 (-0400) Subject: [PATCH] Add const to pointer qualifiers for __chk_user_ptr and __chk_io_ptr. X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=04a395233089ed160ef87a6c2155e5dedc6f7d15;p=openwrt%2Fstaging%2Fblogic.git [PATCH] Add const to pointer qualifiers for __chk_user_ptr and __chk_io_ptr. Change prototypes for __chk_user_ptr and __chk_io_ptr to take const void* instead of void*, so that code can pass "const void *" to them. (Right now sparse does not warn about passing const void* to void* functions, but that is a separate bug that I believe Josh is working on, and once sparse does check this, the changed prototypes will be necessary.) Signed-off-by: Russ Cox Signed-off-by: Josh Triplett Acked-by: Christopher Li Signed-off-by: Linus Torvalds --- diff --git a/include/linux/compiler.h b/include/linux/compiler.h index aca66984aafd..3b6949b41745 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -15,8 +15,8 @@ # define __acquire(x) __context__(x,1) # define __release(x) __context__(x,-1) # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) -extern void __chk_user_ptr(void __user *); -extern void __chk_io_ptr(void __iomem *); +extern void __chk_user_ptr(const void __user *); +extern void __chk_io_ptr(const void __iomem *); #else # define __user # define __kernel