2019-11-30 03:34:49

by Heyi Guo

[permalink] [raw]
Subject: [PATCH] trivial: kvm/arm: merge cases to reduce code lines

It seems a little confusing for KVM_CAP_ARM_SET_DEVICE_ADDR to have a
separate branch while it doesn't have any difference with the above
cases. So we merge it to the above cases, which can also save 2 lines.

Signed-off-by: Heyi Guo <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: James Morse <[email protected]>
Cc: Julien Thierry <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Cc: Jiri Kosina <[email protected]>
---
virt/kvm/arm/arm.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index 86c6aa1cb58e..6f94080969d1 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -197,8 +197,6 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
case KVM_CAP_IMMEDIATE_EXIT:
case KVM_CAP_VCPU_EVENTS:
case KVM_CAP_ARM_IRQ_LINE_LAYOUT_2:
- r = 1;
- break;
case KVM_CAP_ARM_SET_DEVICE_ADDR:
r = 1;
break;
--
2.19.1