Re: [PATCH 1/2] kernel: add platform_has() infrastructure

From: Borislav Petkov
Date: Tue Apr 26 2022 - 16:10:13 EST


On Tue, Apr 26, 2022 at 09:53:42PM +0200, Heiko Carstens wrote:
> > You probably should make that thing static and use only accessors to
> > modify it in case you wanna change the underlying data structure in the
> > future.
>
> That would add another indirection, which at least I think is not
> necessary and would make it less likely that this infrastructure is
> used.

So if you want to have a single variable which contains platform feature
bits, you don't need any platform_<bla> accessors but use this variable
directly.

I'd prefer the accessors any day of the week, though.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette