Skip to content

Commit 8d3e761

Browse files
SiFiveHollandpalmer-dabbelt
authored andcommitted
riscv: mm: Make asid_bits a local variable
This variable is only used inside asids_init(). Reviewed-by: Alexandre Ghiti <[email protected]> Signed-off-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent f58e5dc commit 8d3e761

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/riscv/mm/context.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
DEFINE_STATIC_KEY_FALSE(use_asid_allocator);
2222

23-
static unsigned long asid_bits;
2423
static unsigned long num_asids;
2524

2625
static atomic_long_t current_version;
@@ -226,7 +225,7 @@ static inline void set_mm(struct mm_struct *prev,
226225

227226
static int __init asids_init(void)
228227
{
229-
unsigned long old;
228+
unsigned long asid_bits, old;
230229

231230
/* Figure-out number of ASID bits in HW */
232231
old = csr_read(CSR_SATP);

0 commit comments

Comments
 (0)