From: Li kunyu Date: Mon, 25 Jul 2022 04:23:58 +0000 (+0800) Subject: x86/boot: Remove superfluous type casting from arch/x86/boot/bitops.h X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=039f0e054a29d06970892240d70143150d2aaec2;p=linux.git 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 Signed-off-by: Ingo Molnar Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20220725042358.3377-1-kunyu@nfschina.com --- diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h index 02e1dea11d94b..8518ae214c9b3 100644 --- a/arch/x86/boot/bitops.h +++ b/arch/x86/boot/bitops.h @@ -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;