arch/riscv/kernel/cpufeature.c: declare hide_v0p7 only if CONFIG_VECTOR=y

This variable is used only in the CONFIG_VECTOR branch. Declaring it
there avoids an unused variable warning from GCC when CONFIG_VECTOR=n.
This commit is contained in:
Michael Orlitzky 2024-09-03 10:53:00 -04:00 committed by xingxg2022
parent 6e563b3bc8
commit e7804b9743
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,6 @@
#define NUM_ALPHA_EXTS ('z' - 'a' + 1)
unsigned long elf_hwcap __read_mostly;
static bool hide_v0p7 = 0;
/* Host ISA bitmap */
static DECLARE_BITMAP(riscv_isa, RISCV_ISA_EXT_MAX) __read_mostly;
@ -37,6 +36,7 @@ EXPORT_SYMBOL(riscv_isa_ext_keys);
#ifdef CONFIG_VECTOR
__ro_after_init DEFINE_STATIC_KEY_FALSE(cpu_hwcap_vector);
static bool hide_v0p7 = 0;
static int __init do_hide_v0p7_ext(char *str)
{
hide_v0p7 = 1;