From: Peng Liu <pngliu@hotmail.com>
Cc: tglx@linutronix.de, mingo@redhat.com, rick.p.edgecombe@intel.com,
daniel.sneddon@linux.intel.com, dave.hansen@linux.intel.com,
linux-kernel@vger.kernel.org, x86@kernel.org,
Peng Liu <pngliu@hotmail.com>
Subject: [PATCH] x86/apic: Delete useless BUG_ON in validate_apic_and_package_id()
Date: Fri, 8 Mar 2024 16:01:52 +0800 [thread overview]
Message-ID: <TYCP286MB21461411BA788E6681AF448FC6272@TYCP286MB2146.JPNP286.PROD.OUTLOOK.COM> (raw)
Both topology_update_package_map() and topology_update_die_map() have a fixed
return value 0. That is, they never fail. So the BUG_ON() checks on them are
useless and better be deleted.
Signed-off-by: Peng Liu <pngliu@hotmail.com>
---
arch/x86/kernel/cpu/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index fbc4e60d027c..44b08de3971c 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1796,8 +1796,8 @@ static void validate_apic_and_package_id(struct cpuinfo_x86 *c)
pr_err(FW_BUG "CPU%u: APIC id mismatch. Firmware: %x APIC: %x\n",
cpu, apicid, c->topo.initial_apicid);
}
- BUG_ON(topology_update_package_map(c->topo.pkg_id, cpu));
- BUG_ON(topology_update_die_map(c->topo.die_id, cpu));
+ topology_update_package_map(c->topo.pkg_id, cpu);
+ topology_update_die_map(c->topo.die_id, cpu);
#else
c->topo.logical_pkg_id = 0;
#endif
--
2.34.1
next reply other threads:[~2024-03-08 8:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 8:01 Peng Liu [this message]
2024-03-08 8:51 ` Borislav Petkov
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=TYCP286MB21461411BA788E6681AF448FC6272@TYCP286MB2146.JPNP286.PROD.OUTLOOK.COM \
--to=pngliu@hotmail.com \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rick.p.edgecombe@intel.com \
--cc=tglx@linutronix.de \
--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®