diff mbox series

MIPS: KVM: Convert a fallthrough comment to fallthrough

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

Commit Message

Jiaxun Yang July 6, 2020, 1:45 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>
---
 arch/mips/kvm/emulate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Huacai Chen July 8, 2020, 8:04 a.m. UTC | #1
Reviewed-by: Huacai Chen <chenhc@lemote.com>

On Mon, Jul 6, 2020 at 9:53 AM Jiaxun Yang <jiaxun.yang@flygoat.com> 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>
> ---
>  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 5ae82d925197..bb17d8274462 100644
> --- a/arch/mips/kvm/emulate.c
> +++ b/arch/mips/kvm/emulate.c
> @@ -1934,7 +1934,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;
> --
> 2.27.0
>
Jiaxun Yang Aug. 3, 2020, 3:11 a.m. UTC | #2
Hi Paoli,

Could you please take a look at this patch?

Thanks.

- Jiaxun

在 2020/7/8 下午4:04, Huacai Chen 写道:
> Reviewed-by: Huacai Chen <chenhc@lemote.com>
>
> On Mon, Jul 6, 2020 at 9:53 AM Jiaxun Yang <jiaxun.yang@flygoat.com> 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>
>> ---
>>   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 5ae82d925197..bb17d8274462 100644
>> --- a/arch/mips/kvm/emulate.c
>> +++ b/arch/mips/kvm/emulate.c
>> @@ -1934,7 +1934,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;
>> --
>> 2.27.0
>>
diff mbox series

Patch

diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c
index 5ae82d925197..bb17d8274462 100644
--- a/arch/mips/kvm/emulate.c
+++ b/arch/mips/kvm/emulate.c
@@ -1934,7 +1934,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;