diff options
author | Tejun Heo <tj@kernel.org> | 2009-11-18 03:53:21 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-12-07 20:28:50 -0500 |
commit | 85438592f179c126ad4cb9a280046d4f0a501e6d (patch) | |
tree | a2c9c86326db44d453d4047604974584b802cf3e /include/linux/percpu-defs.h | |
parent | 545695fb41da117928ab946067a42d9e15fd009d (diff) |
percpu: remove compile warnings caused by __verify_pcpu_ptr()
If percpu pointer is const, __verify_pcpu_ptr() triggers warnings like
the following.
drivers/net/loopback.c: In function 'loopback_get_stats':
drivers/net/loopback.c:109: warning: initialization discards qualifiers from pointer target type
Fix it by adding const to the verification target pointer used in
__verify_pcpu_ptr().
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'include/linux/percpu-defs.h')
-rw-r--r-- | include/linux/percpu-defs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index 1fa36eb54b6a..68567c0b3a5d 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
@@ -24,7 +24,7 @@ | |||
24 | * input parameter is a percpu pointer. | 24 | * input parameter is a percpu pointer. |
25 | */ | 25 | */ |
26 | #define __verify_pcpu_ptr(ptr) do { \ | 26 | #define __verify_pcpu_ptr(ptr) do { \ |
27 | void __percpu *__vpp_verify = (typeof(ptr))NULL; \ | 27 | const void __percpu *__vpp_verify = (typeof(ptr))NULL; \ |
28 | (void)__vpp_verify; \ | 28 | (void)__vpp_verify; \ |
29 | } while (0) | 29 | } while (0) |
30 | 30 | ||