x86/cpu: Remove unnecessary __maybe_unused annotations
Subsystems (2)
PATCH 1/1 x86/cpu: Remove unnecessary __maybe_unused annotations
Remove __maybe_unused from variables and functions that are referenced unconditionally.
Signed-off-by Thorsten Blum <[email protected]>
--- arch/x86/kernel/cpu/common.c | 2 +- arch/x86/kernel/cpu/microcode/amd.c | 3 +-- arch/x86/kernel/cpu/topology_common.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-)
arch/x86/kernel/cpu/common.c +1 -1
@@ -1651,7 +1651,7 @@ static inline bool parse_set_clear_cpuid(char *arg, bool set)int taint =0 ;while (arg) { -bool found__maybe_unused = false; +bool found = false;unsigned int bit; opt =strsep (&arg,"," );
arch/x86/kernel/cpu/microcode/amd.c +1 -2
@@ -136,8 +136,7 @@ struct cont_desc {* Microcode patch container file is prepended to the initrd in cpio * format. See Documentation/arch/x86/microcode.rst */ -static const char -ucode_path[]__maybe_unused ="kernel/x86/microcode/AuthenticAMD.bin" ; +static const char ucode_path[] ="kernel/x86/microcode/AuthenticAMD.bin" ;/* * This is CPUID(1).EAX on the BSP. It is used in two ways:
arch/x86/kernel/cpu/topology_common.c +1 -1
@@ -62,7 +62,7 @@ const char *get_topology_cpu_type_name(struct cpuinfo_x86 *c) } } -static unsigned int __maybe_unused parse_num_cores_legacy (struct cpuinfo_x86 *c) +static unsigned int parse_num_cores_legacy (struct cpuinfo_x86 *c) {struct { u32 cache_type : 5,
The following commit has been merged into the x86/cleanups branch of tip:
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 10b45e63a5b010be59ecbd2e437744adb12f838a Gitweb: https://git.kernel.org/tip/10b45e63a5b010be59ecbd2e437744adb12f838a Author: Thorsten Blum <[email protected]> AuthorDate: Tue, 30 Jun 2026 10:30:30 +02:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 22 Jul 2026 09:09:44 -07:00
x86/cpu: Remove unnecessary __maybe_unused annotations
Remove __maybe_unused from variables and functions that are referenced unconditionally.
Signed-off-by Thorsten Blum <[email protected]>
Signed-off-by Borislav Petkov (AMD) <[email protected]>
--- arch/x86/kernel/cpu/common.c | 2 +- arch/x86/kernel/cpu/microcode/amd.c | 3 +-- arch/x86/kernel/cpu/topology_common.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-)
arch/x86/kernel/cpu/common.c +1 -1
@@ -1651,7 +1651,7 @@ static inline bool parse_set_clear_cpuid(char *arg, bool set)int taint =0 ;while (arg) { -bool found__maybe_unused = false; +bool found = false;unsigned int bit; opt =strsep (&arg,"," );
arch/x86/kernel/cpu/microcode/amd.c +1 -2
@@ -136,8 +136,7 @@ struct cont_desc {* Microcode patch container file is prepended to the initrd in cpio * format. See Documentation/arch/x86/microcode.rst */ -static const char -ucode_path[]__maybe_unused ="kernel/x86/microcode/AuthenticAMD.bin" ; +static const char ucode_path[] ="kernel/x86/microcode/AuthenticAMD.bin" ;/* * This is CPUID(1).EAX on the BSP. It is used in two ways:
arch/x86/kernel/cpu/topology_common.c +1 -1
@@ -62,7 +62,7 @@ const char *get_topology_cpu_type_name(struct cpuinfo_x86 *c) } } -static unsigned int __maybe_unused parse_num_cores_legacy (struct cpuinfo_x86 *c) +static unsigned int parse_num_cores_legacy (struct cpuinfo_x86 *c) {struct { u32 cache_type : 5,