Skip to content

Commit

Permalink
riscv: drop cpufeature_apply_feature tracking variable
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Reviewed-by: Guo Ren <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Fixes: ff689fd ("riscv: add RISC-V Svpbmt extension support")
Signed-off-by: Palmer Dabbelt <[email protected]>
  • Loading branch information
mmind authored and palmer-dabbelt committed Jun 16, 2022
1 parent 21f356f commit 237c0ee
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions arch/riscv/kernel/cpufeature.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ void __init_or_module riscv_cpufeature_patch_func(struct alt_entry *begin,
unsigned int stage)
{
u32 cpu_req_feature = cpufeature_probe(stage);
u32 cpu_apply_feature = 0;
struct alt_entry *alt;
u32 tmp;

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

tmp = (1U << alt->errata_id);
if (cpu_req_feature & tmp) {
if (cpu_req_feature & tmp)
patch_text_nosync(alt->old_ptr, alt->alt_ptr, alt->alt_len);
cpu_apply_feature |= tmp;
}
}
}
#endif

0 comments on commit 237c0ee

Please sign in to comment.