lkml.org 
[lkml]   [2018]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: arch/x86/kvm/x86.c:7111:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
From
Date
On 15/01/2018 13:34, David Binderman wrote:
> Hello there,
>
>
> Source code is
>
>
>     switch(vcpu->arch.mp_state) {
>     case KVM_MP_STATE_HALTED:
>         vcpu->arch.pv.pv_unhalted = false;
>         vcpu->arch.mp_state =
>             KVM_MP_STATE_RUNNABLE;
>     case KVM_MP_STATE_RUNNABLE:
>         vcpu->arch.apf.halted = false;
>         break;
>
> Suggest either add the missing break or add a fallthrough comment.

It's meant to be a fall-through to the "runnable" case (note that
mp_state becomes KVM_MP_STATE_RUNNABLE at the end of the first "case").

Would you like to post a patch yourself?

Thanks,

Paolo

>
>
> Regards
>
>
> David Binderman
>
>

\
 
 \ /
  Last update: 2018-01-15 14:32    [W:0.034 / U:3.168 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site