All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Carlos Bilbao <carlos.bilbao@amd.com>
Cc: tony.luck@intel.com, yazen.ghannam@amd.com,
	Smita.KoralahalliChannabasappa@amd.com,
	linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org
Subject: Re: [PATCH] x86/mce: Simplify CPU vendor checks for AMD/Hygon and Intel/Zhaoxin
Date: Tue, 22 Feb 2022 18:10:57 +0100	[thread overview]
Message-ID: <YhUZISFZRaBLbJ31@zn.tnic> (raw)
In-Reply-To: <4e638a79-8b2e-291c-3b91-57677ffcc1fa@amd.com>

Hi,

On Tue, Feb 22, 2022 at 10:42:25AM -0600, Carlos Bilbao wrote:
> the point is to simplify the code (as the patch stated).

But it doesn't simplify the code - it makes it obscure.

Also, your "simplification" breaks the moment you need to do something
for the one vendor but *not* for the other.

Because in such cases you'll have to do

	if (mce_flags.amd_compatible && m->cpuvendor != X86_VENDOR_HYGON)

which makes me go, "huh what?!"

So no, that's not better.

-- 
Regards/Gruss,
    Boris.

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

      reply	other threads:[~2022-02-22 17:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 15:58 [PATCH] x86/mce: Simplify CPU vendor checks for AMD/Hygon and Intel/Zhaoxin Carlos Bilbao
2022-02-22 16:10 ` Borislav Petkov
2022-02-22 16:42   ` Carlos Bilbao
2022-02-22 17:10     ` 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=YhUZISFZRaBLbJ31@zn.tnic \
    --to=bp@alien8.de \
    --cc=Smita.KoralahalliChannabasappa@amd.com \
    --cc=carlos.bilbao@amd.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --cc=yazen.ghannam@amd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.