Skip to content

Commit 039f0e0

Browse files
likunyursuryasaimadhu
authored andcommitted
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
1 parent 568035b commit 039f0e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/boot/bitops.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919

2020
static inline bool constant_test_bit(int nr, const void *addr)
2121
{
22-
const u32 *p = (const u32 *)addr;
22+
const u32 *p = addr;
2323
return ((1UL << (nr & 31)) & (p[nr >> 5])) != 0;
2424
}
2525
static inline bool variable_test_bit(int nr, const void *addr)
2626
{
2727
bool v;
28-
const u32 *p = (const u32 *)addr;
28+
const u32 *p = addr;
2929

3030
asm("btl %2,%1" CC_SET(c) : CC_OUT(c) (v) : "m" (*p), "Ir" (nr));
3131
return v;

0 commit comments

Comments
 (0)