KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID
PATCH 1/1 KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID
Avoid open-coding and just use the helper to encode the ID from the sysreg table entry.
No functional change intended.
Signed-off-by Oliver Upton <[email protected]>
---
Applies to github.com/oupton/linux kvm-arm64/nv-prefix
arch/arm64/kvm/nested.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/kvm/nested.c +1 -2
@@ -26,8 +26,7 @@void access_nested_id_reg (struct kvm_vcpu *v,struct sys_reg_params *p,const struct sys_reg_desc *r) { -u32 id =sys_reg ((u32 )r->Op0, (u32 )r->Op1, - (u32 )r->CRn, (u32 )r->CRm, (u32 )r->Op2); +u32 id =reg_to_encoding (r);u64 val, tmp; val = p->regval;
Signature · 7 lines
2.39.1.581.gbfd45094c4-goog _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 lines · Oliver Upton
Avoid open-coding and just use the helper to encode the ID from the sysreg table entry.
No functional change intended.
Signed-off-by Oliver Upton <[email protected]>
Acked-by Marc Zyngier <[email protected]>
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.