Re: [PATCH 2/2] [RFC] x86: Remove clear_cpu_bug()

From: Sohil Mehta

Date: Thu Feb 19 2026 - 20:30:24 EST


On 2/16/2026 2:43 AM, Richard Weinberger wrote:
> F00F was the only user of clear_cpu_bug().
> With no users left, remove this helper.
>

Yeah, this function isn't used commonly. The 2nd last user was removed
~9 years back.

> Signed-off-by: Richard Weinberger <richard@xxxxxx>
> ---
> arch/x86/include/asm/cpufeature.h | 1 -
> 1 file changed, 1 deletion(-)
>

Reviewed-by: Sohil Mehta <sohil.mehta@xxxxxxxxx>

> diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
> index 3ddc1d33399b..90680f978d43 100644
> --- a/arch/x86/include/asm/cpufeature.h
> +++ b/arch/x86/include/asm/cpufeature.h
> @@ -125,7 +125,6 @@ static __always_inline bool _static_cpu_has(u16 bit)
>
> #define cpu_has_bug(c, bit) cpu_has(c, (bit))
> #define set_cpu_bug(c, bit) set_cpu_cap(c, (bit))
> -#define clear_cpu_bug(c, bit) clear_cpu_cap(c, (bit))
>
> #define static_cpu_has_bug(bit) static_cpu_has((bit))
> #define boot_cpu_has_bug(bit) cpu_has_bug(&boot_cpu_data, (bit))