From: Andrew Cooper Date: Fri, 15 Jul 2016 15:36:07 +0000 (+0000) Subject: xen/x86: Identify legitimate fallthrough cases X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~736 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e763268781d341fef05d461f3057e6ced5e033f2;p=xen.git xen/x86: Identify legitimate fallthrough cases The case in arch_set_info_guest() is a legitimate fallthrough. Mark it as such. The cases in vlapic_accept_irq() are a terminal error path, but Coverity fails to spot this. Reorder the comment to the end. No functional change, but fixes two MISSING_BREAK Coverity defects. Signed-off-by: Andrew Cooper Reviewed-by: George Dunlap --- diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index c8c7e2da44..1133ea2226 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -1223,6 +1223,7 @@ int arch_set_info_guest( { case -EINTR: rc = -ERESTART; + /* Fallthrough */ case -ERESTART: v->arch.old_guest_table = pagetable_get_page(v->arch.guest_table); diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c index e2f44501b1..ba9b293376 100644 --- a/xen/arch/x86/hvm/vlapic.c +++ b/xen/arch/x86/hvm/vlapic.c @@ -374,8 +374,7 @@ static void vlapic_accept_irq(struct vcpu *v, uint32_t icr_low) case APIC_DM_INIT: case APIC_DM_STARTUP: - /* Handled in vlapic_ipi(). */ - BUG(); + BUG(); /* Handled in vlapic_ipi(). */ default: gdprintk(XENLOG_ERR, "TODO: unsupported delivery mode in ICR %x\n",