qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/i386/kvm: Add missing fallthrough comment
@ 2020-09-11 12:53 Thomas Huth
  2020-09-11 13:43 ` Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Huth @ 2020-09-11 12:53 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini
  Cc: qemu-trivial, Marcelo Tosatti, Eduardo Habkost, Richard Henderson

Let's make this file compilable with -Werror=implicit-fallthrough :
Looking at the code, it seems like the fallthrough is intended here,
so we should add the corresponding "/* fallthrough */" comment here.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 target/i386/kvm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 205b68bc0c..283d3305d5 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -1568,6 +1568,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
             if (env->nr_dies < 2) {
                 break;
             }
+            /* fallthrough */
         case 4:
         case 0xb:
         case 0xd:
-- 
2.18.2



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

* Re: [PATCH] target/i386/kvm: Add missing fallthrough comment
  2020-09-11 12:53 [PATCH] target/i386/kvm: Add missing fallthrough comment Thomas Huth
@ 2020-09-11 13:43 ` Paolo Bonzini
  2020-09-11 13:51 ` no-reply
  2020-09-11 19:23 ` Laurent Vivier
  2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2020-09-11 13:43 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel
  Cc: qemu-trivial, Marcelo Tosatti, Eduardo Habkost, Richard Henderson

On 11/09/20 14:53, Thomas Huth wrote:
> Let's make this file compilable with -Werror=implicit-fallthrough :
> Looking at the code, it seems like the fallthrough is intended here,
> so we should add the corresponding "/* fallthrough */" comment here.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  target/i386/kvm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 205b68bc0c..283d3305d5 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -1568,6 +1568,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
>              if (env->nr_dies < 2) {
>                  break;
>              }
> +            /* fallthrough */
>          case 4:
>          case 0xb:
>          case 0xd:
> 

Acked-by: Paolo Bonzini <pbonzini@redhat.com>



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

* Re: [PATCH] target/i386/kvm: Add missing fallthrough comment
  2020-09-11 12:53 [PATCH] target/i386/kvm: Add missing fallthrough comment Thomas Huth
  2020-09-11 13:43 ` Paolo Bonzini
@ 2020-09-11 13:51 ` no-reply
  2020-09-11 19:23 ` Laurent Vivier
  2 siblings, 0 replies; 4+ messages in thread
From: no-reply @ 2020-09-11 13:51 UTC (permalink / raw)
  To: thuth; +Cc: ehabkost, qemu-trivial, mtosatti, qemu-devel, pbonzini, rth

Patchew URL: https://patchew.org/QEMU/20200911125301.413081-1-thuth@redhat.com/



Hi,

This series failed build test on FreeBSD host. Please find the details below.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
# Testing script will be invoked under the git checkout with
# HEAD pointing to a commit that has the patches applied on top of "base"
# branch
if qemu-system-x86_64 --help >/dev/null 2>&1; then
  QEMU=qemu-system-x86_64
elif /usr/libexec/qemu-kvm --help >/dev/null 2>&1; then
  QEMU=/usr/libexec/qemu-kvm
else
  exit 1
fi
make vm-build-freebsd J=21 QEMU=$QEMU
exit 0
=== TEST SCRIPT END ===




The full log is available at
http://patchew.org/logs/20200911125301.413081-1-thuth@redhat.com/testing.FreeBSD/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

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

* Re: [PATCH] target/i386/kvm: Add missing fallthrough comment
  2020-09-11 12:53 [PATCH] target/i386/kvm: Add missing fallthrough comment Thomas Huth
  2020-09-11 13:43 ` Paolo Bonzini
  2020-09-11 13:51 ` no-reply
@ 2020-09-11 19:23 ` Laurent Vivier
  2 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2020-09-11 19:23 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, Paolo Bonzini
  Cc: qemu-trivial, Marcelo Tosatti, Eduardo Habkost, Richard Henderson

Le 11/09/2020 à 14:53, Thomas Huth a écrit :
> Let's make this file compilable with -Werror=implicit-fallthrough :
> Looking at the code, it seems like the fallthrough is intended here,
> so we should add the corresponding "/* fallthrough */" comment here.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  target/i386/kvm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 205b68bc0c..283d3305d5 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -1568,6 +1568,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
>              if (env->nr_dies < 2) {
>                  break;
>              }
> +            /* fallthrough */
>          case 4:
>          case 0xb:
>          case 0xd:
> 


Applied to my trivial-patches branch.

Thanks,
Laurent


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

end of thread, other threads:[~2020-09-11 19:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-11 12:53 [PATCH] target/i386/kvm: Add missing fallthrough comment Thomas Huth
2020-09-11 13:43 ` Paolo Bonzini
2020-09-11 13:51 ` no-reply
2020-09-11 19:23 ` Laurent Vivier

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