diff mbox series

[RESEND,for-5.9] MIPS: KVM: Convert a fallthrough comment to fallthrough

Message ID 20200810011749.3211128-1-jiaxun.yang@flygoat.com (mailing list archive)
State New, archived
Headers show
Series [RESEND,for-5.9] MIPS: KVM: Convert a fallthrough comment to fallthrough | expand

Commit Message

Jiaxun Yang Aug. 10, 2020, 1:17 a.m. UTC
There is a fallthrough comment being forgotten,
GCC complains about it:

arch/mips/kvm/emulate.c: In function kvm_mips_emulate_load:
arch/mips/kvm/emulate.c:1936:21: error: this statement may fall through
 1936 |   vcpu->mmio_needed = 1; /* unsigned */
      |   ~~~~~~~~~~~~~~~~~~^~~
arch/mips/kvm/emulate.c:1939:2: note: here
 1939 |  case lw_op:

Just fix it.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Huacai Chen <chenhc@lemote.com>
---
This is blocking KVM MIPS from build, so it needs to get into 5.9.
---
 arch/mips/kvm/emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini Aug. 10, 2020, 8:11 a.m. UTC | #1
On 10/08/20 03:17, Jiaxun Yang wrote:
> There is a fallthrough comment being forgotten,
> GCC complains about it:
> 
> arch/mips/kvm/emulate.c: In function kvm_mips_emulate_load:
> arch/mips/kvm/emulate.c:1936:21: error: this statement may fall through
>  1936 |   vcpu->mmio_needed = 1; /* unsigned */
>       |   ~~~~~~~~~~~~~~~~~~^~~
> arch/mips/kvm/emulate.c:1939:2: note: here
>  1939 |  case lw_op:
> 
> Just fix it.
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> Reviewed-by: Huacai Chen <chenhc@lemote.com>
> ---
> This is blocking KVM MIPS from build, so it needs to get into 5.9.
> ---
>  arch/mips/kvm/emulate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c
> index 703782355318..d70c4f8e14e2 100644
> --- a/arch/mips/kvm/emulate.c
> +++ b/arch/mips/kvm/emulate.c
> @@ -1935,7 +1935,7 @@ enum emulation_result kvm_mips_emulate_load(union mips_instruction inst,
>  
>  	case lwu_op:
>  		vcpu->mmio_needed = 1;	/* unsigned */
> -		/* fall through */
> +		fallthrough;
>  #endif
>  	case lw_op:
>  		run->mmio.len = 4;
> 

Queued, thanks.

Paolo
diff mbox series

Patch

diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c
index 703782355318..d70c4f8e14e2 100644
--- a/arch/mips/kvm/emulate.c
+++ b/arch/mips/kvm/emulate.c
@@ -1935,7 +1935,7 @@  enum emulation_result kvm_mips_emulate_load(union mips_instruction inst,
 
 	case lwu_op:
 		vcpu->mmio_needed = 1;	/* unsigned */
-		/* fall through */
+		fallthrough;
 #endif
 	case lw_op:
 		run->mmio.len = 4;