* [PATCH] percpu: eliminate two sparse warnings
@ 2016-09-22 14:03 Lance Richardson
2016-09-22 16:14 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Lance Richardson @ 2016-09-22 14:03 UTC (permalink / raw)
To: linux-kernel; +Cc: tj, cl, tglx, mingo, hpa, x86
Fix two cases where a __percpu pointer cast drops __percpu.
Signed-off-by: Lance Richardson <lrichard@redhat.com>
---
arch/x86/include/asm/percpu.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h
index e02e3f8..84f58de 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;
}
--
2.5.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] percpu: eliminate two sparse warnings
2016-09-22 14:03 [PATCH] percpu: eliminate two sparse warnings Lance Richardson
@ 2016-09-22 16:14 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2016-09-22 16:14 UTC (permalink / raw)
To: Lance Richardson; +Cc: linux-kernel, cl, tglx, mingo, hpa, x86
On Thu, Sep 22, 2016 at 10:03:57AM -0400, Lance Richardson wrote:
> Fix two cases where a __percpu pointer cast drops __percpu.
>
> Signed-off-by: Lance Richardson <lrichard@redhat.com>
Applied to percpu/for-4.9.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-22 16:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 14:03 [PATCH] percpu: eliminate two sparse warnings Lance Richardson
2016-09-22 16:14 ` Tejun Heo
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®