]> git.dujemihanovic.xyz Git - linux.git/commit
LoongArch: KVM: Streamline kvm_check_cpucfg() and improve comments
authorWANG Xuerui <git@xen0n.name>
Fri, 23 Feb 2024 06:36:31 +0000 (14:36 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Fri, 23 Feb 2024 06:36:31 +0000 (14:36 +0800)
commitf0f5c4894f89bac9074b45bccc447c3659a0fa6f
tree0c9d29fcd857ceb01d706504f9450a3e9a1cc708
parentec83f39d2b078d6dd029bbde601835b5368fc886
LoongArch: KVM: Streamline kvm_check_cpucfg() and improve comments

All the checks currently done in kvm_check_cpucfg can be realized with
early returns, so just do that to avoid extra cognitive burden related
to the return value handling.

While at it, clean up comments of _kvm_get_cpucfg_mask() and
kvm_check_cpucfg(), by removing comments that are merely restatement of
the code nearby, and paraphrasing the rest so they read more natural for
English speakers (that likely are not familiar with the actual Chinese-
influenced grammar).

No functional changes intended.

Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kvm/vcpu.c