Merge tag 'x86-urgent-2020-04-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Ingo Molnar: "A single fix addressing Sparse warnings. <asm/bitops.h> is changed non-trivially to avoid the warnings, but generated code is not supposed to be affected" * tag 'x86-urgent-2020-04-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Fix bitops.h warning with a moved cast
This commit is contained in:
@@ -54,7 +54,7 @@ arch_set_bit(long nr, volatile unsigned long *addr)
|
||||
if (__builtin_constant_p(nr)) {
|
||||
asm volatile(LOCK_PREFIX "orb %1,%0"
|
||||
: CONST_MASK_ADDR(nr, addr)
|
||||
: "iq" ((u8)CONST_MASK(nr))
|
||||
: "iq" (CONST_MASK(nr) & 0xff)
|
||||
: "memory");
|
||||
} else {
|
||||
asm volatile(LOCK_PREFIX __ASM_SIZE(bts) " %1,%0"
|
||||
@@ -74,7 +74,7 @@ arch_clear_bit(long nr, volatile unsigned long *addr)
|
||||
if (__builtin_constant_p(nr)) {
|
||||
asm volatile(LOCK_PREFIX "andb %1,%0"
|
||||
: CONST_MASK_ADDR(nr, addr)
|
||||
: "iq" ((u8)~CONST_MASK(nr)));
|
||||
: "iq" (CONST_MASK(nr) ^ 0xff));
|
||||
} else {
|
||||
asm volatile(LOCK_PREFIX __ASM_SIZE(btr) " %1,%0"
|
||||
: : RLONG_ADDR(addr), "Ir" (nr) : "memory");
|
||||
|
||||
Reference in New Issue
Block a user