mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: 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
Subject: Re: [PATCH] x86/apic: Delete useless BUG_ON in validate_apic_and_package_id()
Date: Fri, 8 Mar 2024 09:51:37 +0100	[thread overview]
Message-ID: <20240308085137.GAZerRmfUsYBfZeDYr@fat_crate.local> (raw)
In-Reply-To: <TYCP286MB21461411BA788E6681AF448FC6272@TYCP286MB2146.JPNP286.PROD.OUTLOOK.COM>

On Fri, Mar 08, 2024 at 04:01:52PM +0800, Peng Liu wrote:
> 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
> -- 

https://lore.kernel.org/r/20240213210252.901865302@linutronix.de

If you wanna do arch/x86/ patches, do them always ontop of tip/master or
the current linux-next master branch.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

      reply	other threads:[~2024-03-08  8:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08  8:01 Peng Liu
2024-03-08  8:51 ` Borislav Petkov [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=20240308085137.GAZerRmfUsYBfZeDYr@fat_crate.local \
    --to=bp@alien8.de \
    --cc=daniel.sneddon@linux.intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pngliu@hotmail.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®