kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: KVM: Convert a fallthrough comment to fallthrough
@ 2020-07-06  1:45 Jiaxun Yang
  2020-07-08  8:04 ` Huacai Chen
  0 siblings, 1 reply; 3+ messages in thread
From: Jiaxun Yang @ 2020-07-06  1:45 UTC (permalink / raw)
  To: kvm; +Cc: chenhc, aleksandar.qemu.devel, linux-mips, tsbogend, Jiaxun Yang

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: KVM: Convert a fallthrough comment to fallthrough
  2020-07-06  1:45 [PATCH] MIPS: KVM: Convert a fallthrough comment to fallthrough Jiaxun Yang
@ 2020-07-08  8:04 ` Huacai Chen
  2020-08-03  3:11   ` Jiaxun Yang
  0 siblings, 1 reply; 3+ messages in thread
From: Huacai Chen @ 2020-07-08  8:04 UTC (permalink / raw)
  To: Jiaxun Yang; +Cc: kvm, Aleksandar Markovic, open list:MIPS, Thomas Bogendoerfer

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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: KVM: Convert a fallthrough comment to fallthrough
  2020-07-08  8:04 ` Huacai Chen
@ 2020-08-03  3:11   ` Jiaxun Yang
  0 siblings, 0 replies; 3+ messages in thread
From: Jiaxun Yang @ 2020-08-03  3:11 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: kvm, Aleksandar Markovic, open list:MIPS, Thomas Bogendoerfer


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
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-03  3:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06  1:45 [PATCH] MIPS: KVM: Convert a fallthrough comment to fallthrough Jiaxun Yang
2020-07-08  8:04 ` Huacai Chen
2020-08-03  3:11   ` Jiaxun Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).