diff options
author | Li kunyu <kunyu@nfschina.com> | 2022-07-25 12:23:58 +0800 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-08-15 19:17:43 +0200 |
commit | 039f0e054a29d06970892240d70143150d2aaec2 (patch) | |
tree | 19eebf0efc67a32c1db647f249f02e40100890c5 /arch | |
parent | 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff) | |
download | linux-039f0e054a29d06970892240d70143150d2aaec2.tar.gz linux-039f0e054a29d06970892240d70143150d2aaec2.tar.bz2 linux-039f0e054a29d06970892240d70143150d2aaec2.zip |
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
Diffstat (limited to 'arch')
-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; |