RISC-V: KVM: Use switch-case in kvm_riscv_vcpu_set/get_reg()
authorAnup Patel <apatel@ventanamicro.com>
Wed, 7 Dec 2022 03:47:19 +0000 (09:17 +0530)
committerAnup Patel <anup@brainfault.org>
Wed, 7 Dec 2022 03:47:19 +0000 (09:17 +0530)
commite81af89baebf86938cda1a7c2bee51c676c04e21
tree7cd4cfc270f56742f6daf05939c4354cace56d96
parent1343c61a7032cf85680b666a340d9c4c683b2ec8
RISC-V: KVM: Use switch-case in kvm_riscv_vcpu_set/get_reg()

We should use switch-case in kvm_riscv_vcpu_set/get_reg() functions
because the else-if ladder is quite big now.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/vcpu.c