From: Tejun Heo Date: Wed, 18 Nov 2009 08:53:21 +0000 (+0900) Subject: percpu: remove compile warnings caused by __verify_pcpu_ptr() X-Git-Tag: v2.6.34-rc1~223^2~13 X-Git-Url: http://ftp.safe.ca/?a=commitdiff_plain;h=85438592f179c126ad4cb9a280046d4f0a501e6d;hp=545695fb41da117928ab946067a42d9e15fd009d;p=safe%2Fjmp%2Flinux-2.6 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 Reported-by: Stephen Rothwell --- diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index 1fa36eb..68567c0 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h @@ -24,7 +24,7 @@ * input parameter is a percpu pointer. */ #define __verify_pcpu_ptr(ptr) do { \ - void __percpu *__vpp_verify = (typeof(ptr))NULL; \ + const void __percpu *__vpp_verify = (typeof(ptr))NULL; \ (void)__vpp_verify; \ } while (0)