Re: [PATCH RFC v1 01/11] x86/fpu/xstate: Simplify print_xstate_features()

From: Ingo Molnar
Date: Thu Feb 27 2025 - 13:54:00 EST



* Chang S. Bae <chang.seok.bae@xxxxxxxxx> wrote:

> print_xstate_features() currently invokes print_xstate_feature() multiple
> times on separate lines, which can be simplified in a loop.
>
> print_xstate_feature() already checks the feature's enabled status and is
> only called within print_xstate_features(). Inline print_xstate_feature()
> and iterate over features in a loop to streamline the enabling message.
>
> No functional changes.
>
> Signed-off-by: Chang S. Bae <chang.seok.bae@xxxxxxxxx>
> ---
> I find it difficult to justify using separate lines for printing when
> they can be efficiently grouped under a simple for-loop. While this
> cleanup isn't directly related to APX, it felt like a necessary
> improvement, especially when new xstates are introduced.

Agreed, and I've picked up this simplification independently in
tip:x86/fpu.

Thanks,

Ingo