Re: [PATCH v3] x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL
From: Borislav Petkov
Date: Fri May 17 2024 - 13:57:58 EST
On Fri, May 17, 2024 at 05:43:10PM +0000, Luck, Tony wrote:
> What if the bit in flags was named " X86_CPU_ID_FLAG_ENTRY_VALID"
>
> Then the loop in x86_match_cpu() could just be:
>
> for (m = match; m->flags & X86_CPU_ID_FLAG_ENTRY_VALID; m++) {
Yeah, makes sense at a first glance.
This'll keep the terminators "{}" unchanged so that we don't have to
touch all those gazillion places and it'll explicitly state that an
entry is valid or not.
But the devil's in the detail, as always...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette