aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/percpu.h
diff options
context:
space:
mode:
authorLance Richardson <lrichard@redhat.com>2016-09-22 10:03:57 -0400
committerTejun Heo <tj@kernel.org>2016-09-22 12:14:29 -0400
commit799bc3c51b2b120ca6e59e702ede23fff2efaf43 (patch)
treed852e8832d0d86f188e1ec117adac70749d36b25 /arch/x86/include/asm/percpu.h
parentpercpu: improve generic percpu modify-return implementation (diff)
downloadlinux-dev-799bc3c51b2b120ca6e59e702ede23fff2efaf43.tar.xz
linux-dev-799bc3c51b2b120ca6e59e702ede23fff2efaf43.zip
percpu: eliminate two sparse warnings
Fix two cases where a __percpu pointer cast drops __percpu. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/percpu.h')
-rw-r--r--arch/x86/include/asm/percpu.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h
index e02e3f80d363..84f58de08c2b 100644
--- a/arch/x86/include/asm/percpu.h
+++ b/arch/x86/include/asm/percpu.h
@@ -521,7 +521,8 @@ do { \
static __always_inline bool x86_this_cpu_constant_test_bit(unsigned int nr,
const unsigned long __percpu *addr)
{
- unsigned long __percpu *a = (unsigned long *)addr + nr / BITS_PER_LONG;
+ unsigned long __percpu *a =
+ (unsigned long __percpu *)addr + nr / BITS_PER_LONG;
#ifdef CONFIG_X86_64
return ((1UL << (nr % BITS_PER_LONG)) & raw_cpu_read_8(*a)) != 0;
@@ -538,7 +539,7 @@ static inline bool x86_this_cpu_variable_test_bit(int nr,
asm volatile("bt "__percpu_arg(2)",%1\n\t"
CC_SET(c)
: CC_OUT(c) (oldbit)
- : "m" (*(unsigned long *)addr), "Ir" (nr));
+ : "m" (*(unsigned long __percpu *)addr), "Ir" (nr));
return oldbit;
}