Messages in this thread | | | Date | Tue, 22 Feb 2022 18:10:57 +0100 | From | Borislav Petkov <> | Subject | Re: [PATCH] x86/mce: Simplify CPU vendor checks for AMD/Hygon and Intel/Zhaoxin |
| |
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
| |