Skip to content

Commit 237c0ee

Browse files
mmindpalmer-dabbelt
authored andcommitted
riscv: drop cpufeature_apply_feature tracking variable
The variable was tracking which feature patches got applied but that information was never actually used - and thus resulted in a warning as well. Drop the variable. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Guo Ren <guoren@kernel.org> Link: https://lore.kernel.org/r/20220526205646.258337-2-heiko@sntech.de Fixes: ff689fd ("riscv: add RISC-V Svpbmt extension support") Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 21f356f commit 237c0ee

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

arch/riscv/kernel/cpufeature.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ void __init_or_module riscv_cpufeature_patch_func(struct alt_entry *begin,
293293
unsigned int stage)
294294
{
295295
u32 cpu_req_feature = cpufeature_probe(stage);
296-
u32 cpu_apply_feature = 0;
297296
struct alt_entry *alt;
298297
u32 tmp;
299298

@@ -307,10 +306,8 @@ void __init_or_module riscv_cpufeature_patch_func(struct alt_entry *begin,
307306
}
308307

309308
tmp = (1U << alt->errata_id);
310-
if (cpu_req_feature & tmp) {
309+
if (cpu_req_feature & tmp)
311310
patch_text_nosync(alt->old_ptr, alt->alt_ptr, alt->alt_len);
312-
cpu_apply_feature |= tmp;
313-
}
314311
}
315312
}
316313
#endif

0 commit comments

Comments
 (0)