[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen/x86: Identify legitimate fallthrough cases



On 18/07/16 10:30, Andrew Cooper wrote:
> 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 <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx>

Given the simplicity of the patch, I think this could be checked in with
one of THE REST's review while Jan is away.

 -George

> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Xen Coverity <coverity@xxxxxxxxxxxxxx>
> ---
>  xen/arch/x86/domain.c     | 1 +
>  xen/arch/x86/hvm/vlapic.c | 3 +--
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
> index c8c7e2d..1133ea2 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 e2f4450..ba9b293 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",
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.