diff options
author | Li kunyu <[email protected]> | 2022-07-25 12:23:58 +0800 |
---|---|---|
committer | Borislav Petkov <[email protected]> | 2022-08-15 19:17:43 +0200 |
commit | 039f0e054a29d06970892240d70143150d2aaec2 (patch) | |
tree | 19eebf0efc67a32c1db647f249f02e40100890c5 | |
parent | 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff) |
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 <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | arch/x86/boot/bitops.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h index 02e1dea11d94..8518ae214c9b 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; |