From: "tip-bot2 for Li kunyu" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Li kunyu <kunyu@nfschina.com>, Ingo Molnar <mingo@kernel.org>,
Borislav Petkov <bp@suse.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/cleanups] x86/boot: Remove superfluous type casting from arch/x86/boot/bitops.h
Date: Mon, 15 Aug 2022 19:25:36 -0000 [thread overview]
Message-ID: <166059153613.401.18360871834009022723.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220725042358.3377-1-kunyu@nfschina.com>
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@nfschina.com>
AuthorDate: Mon, 25 Jul 2022 12:23:58 +08:00
Committer: Borislav Petkov <bp@suse.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@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
---
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;
prev parent reply other threads:[~2022-08-15 21:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 4:23 [PATCH] x86/boot/arch/variable: I don't think (void *) Pointers need to be cast Li kunyu
2022-08-03 9:33 ` Ingo Molnar
2022-08-03 15:42 ` [tip: x86/cleanups] x86/boot: Remove superfluous type casting from arch/x86/boot/bitops.h tip-bot2 for Li kunyu
2022-08-15 19:25 ` tip-bot2 for Li kunyu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=166059153613.401.18360871834009022723.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@suse.de \
--cc=kunyu@nfschina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®