Re: [PATCH v12 3/4] x86/cpu: Do a sanity check on required feature bits
From: Maciej Wieczor-Retman
Date: Fri Mar 27 2026 - 13:29:04 EST
On 2026-03-27 at 10:10:33 -0700, Pawan Gupta wrote:
>On Fri, Mar 27, 2026 at 03:10:58PM +0000, Maciej Wieczor-Retman wrote:
>> +static void verify_required_features(const struct cpuinfo_x86 *c)
>> +{
>> + u32 required_features[NCAPINTS + 1] = REQUIRED_MASK_INIT;
>> + char cap_buf[X86_NAMELESS_FEAT_BUFLEN];
>> + int i, error = 0;
>> +
>> + for_each_set_bit(i, (unsigned long *)required_features, NCAPINTS * 32) {
>> + if (test_bit(i, (unsigned long *)c->x86_capability))
>
>This can be simplified to:
>
> if (test_cpu_cap(c, i))
>
Oh, right, thanks! I'll correct that for v13.
--
Kind regards
Maciej Wieczór-Retman