mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
x86/boot: Remove superfluous type casting from arch/x86/boot/bitops.h
'const void *' will auto-type-convert to just about any other const pointer type, no need to force it. [ mingo: Rewrote the changelog. ] Signed-off-by: Li kunyu <kunyu@nfschina.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20220725042358.3377-1-kunyu@nfschina.com
This commit is contained in:
parent
568035b01c
commit
039f0e054a
@ -19,13 +19,13 @@
|
||||
|
||||
static inline bool constant_test_bit(int nr, const void *addr)
|
||||
{
|
||||
const u32 *p = (const u32 *)addr;
|
||||
const u32 *p = addr;
|
||||
return ((1UL << (nr & 31)) & (p[nr >> 5])) != 0;
|
||||
}
|
||||
static inline bool variable_test_bit(int nr, const void *addr)
|
||||
{
|
||||
bool v;
|
||||
const u32 *p = (const u32 *)addr;
|
||||
const u32 *p = addr;
|
||||
|
||||
asm("btl %2,%1" CC_SET(c) : CC_OUT(c) (v) : "m" (*p), "Ir" (nr));
|
||||
return v;
|
||||
|
Loading…
Reference in New Issue
Block a user