From: Radim Krčmář Date: Fri, 16 Dec 2016 15:10:04 +0000 (+0100) Subject: KVM: x86: refactor pic setup in kvm_set_routing_entry X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e5dc48777dcc898210e2f16d80d44718db38cdc3;p=openwrt%2Fstaging%2Fblogic.git KVM: x86: refactor pic setup in kvm_set_routing_entry Reviewed-by: Paolo Bonzini Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c index 6c0191615f23..1dfeb185a1e3 100644 --- a/arch/x86/kvm/irq_comm.c +++ b/arch/x86/kvm/irq_comm.c @@ -297,14 +297,12 @@ int kvm_set_routing_entry(struct kvm *kvm, case KVM_IRQ_ROUTING_IRQCHIP: delta = 0; switch (ue->u.irqchip.irqchip) { - case KVM_IRQCHIP_PIC_MASTER: - e->set = kvm_set_pic_irq; - max_pin = PIC_NUM_PINS; - break; case KVM_IRQCHIP_PIC_SLAVE: + delta = 8; + /* fall through */ + case KVM_IRQCHIP_PIC_MASTER: e->set = kvm_set_pic_irq; max_pin = PIC_NUM_PINS; - delta = 8; break; case KVM_IRQCHIP_IOAPIC: max_pin = KVM_IOAPIC_NUM_PINS;