KVM: arm64: Refactor kvm_arm_num_regs() for easier maintenance
authorDave Martin <Dave.Martin@arm.com>
Fri, 28 Sep 2018 13:39:07 +0000 (14:39 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 29 Mar 2019 14:41:52 +0000 (14:41 +0000)
commit7aa92cf318f8136c445c1656d291f50df189b56a
tree266ad111857dc89860af977955a27d5806d19c55
parent38abf22e122e00d20e99408fce4471b5cb65133b
KVM: arm64: Refactor kvm_arm_num_regs() for easier maintenance

kvm_arm_num_regs() adds together various partial register counts in
a freeform sum expression, which makes it harder than necessary to
read diffs that add, modify or remove a single term in the sum
(which is expected to the common case under maintenance).

This patch refactors the code to add the term one per line, for
maximum readability.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: zhang.lei <zhang.lei@jp.fujitsu.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/kvm/guest.c