[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <166059153613.401.18360871834009022723.tip-bot2@tip-bot2>
Date: Mon, 15 Aug 2022 19:25:36 -0000
From: "tip-bot2 for Li kunyu" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Li kunyu <kunyu@...china.com>, Ingo Molnar <mingo@...nel.org>,
Borislav Petkov <bp@...e.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/cleanups] x86/boot: Remove superfluous type casting from
arch/x86/boot/bitops.h
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 039f0e054a29d06970892240d70143150d2aaec2
Gitweb: https://git.kernel.org/tip/039f0e054a29d06970892240d70143150d2aaec2
Author: Li kunyu <kunyu@...china.com>
AuthorDate: Mon, 25 Jul 2022 12:23:58 +08:00
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Mon, 15 Aug 2022 19:17:43 +02: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@...china.com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Signed-off-by: Borislav Petkov <bp@...e.de>
Link: https://lore.kernel.org/r/20220725042358.3377-1-kunyu@nfschina.com
---
arch/x86/boot/bitops.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h
index 02e1dea..8518ae2 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;
Powered by blists - more mailing lists