On 10.01.2024 15:16, Alejandro Vallejo wrote: > Review-to-self after running in Gitlab: > > On 09/01/2024 15:38, Alejandro Vallejo wrote: >> + p->basic.lppp = 0xff; >> + if ( threads_per_pkg < 0xff ) >> + p->basic.lppp = threads_per_pkg; >> + >> + switch ( p->x86_vendor ) >> + { >> + case X86_VENDOR_INTEL: >> + struct cpuid_cache_leaf *sl = p->cache.subleaf; >> + for ( size_t i = 0; sl->type && >> + i < ARRAY_SIZE(p->cache.raw); i++, sl++ ) >> + { >> + sl->cores_per_package = cores_per_pkg - 1; >> + sl->threads_per_cache = threads_per_core - 1; >> + if ( sl->type == 3 /* unified cache */ ) >> + sl->threads_per_cache = threads_per_pkg - 1; >> + } >> + break; >> + >> + case X86_VENDOR_AMD: >> + case X86_VENDOR_HYGON: > > Missing braces around the INTEL block due to the variable declarared > there. I'll include that in v2 after the rest of the review comments > come through.
And (just looking at the fragment above) too deep indentation as well. Jan