Re: [PATCH v11 2/4] x86/cpu: Check if feature string is non-zero
From: Borislav Petkov
Date: Mon Mar 23 2026 - 14:06:14 EST
On Mon, Mar 23, 2026 at 04:58:20PM +0000, Maciej Wieczor-Retman wrote:
> Ah sorry, it's a bit of a misunderstanding, the X86_CAP_BUF_SIZE refers only to
> the value that's needed for a buffer when the word:bit format is returned.
> Otherwise the const char * is returned from the x86_cap_flags[] array.
Yes, I know that. That's why I said:
"But this macro name is generically saying, this is the cap string size. Which
makes it misleading."
> So I guess the constant name should be different? Maybe X86_CAP_NUM_BUF_SIZE?
#define X86_NAMELESS_FEAT_STRLEN
or so.
Your naming must be explicit and denote for what this is used.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette