qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] i386: Fix coding style in kvm_hyperv_expand_features()


From: Paolo Bonzini
Subject: Re: [PATCH 2/2] i386: Fix coding style in kvm_hyperv_expand_features()
Date: Thu, 29 Jul 2021 09:50:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 16/07/21 13:58, Vitaly Kuznetsov wrote:
QEMU coding style requires braces around bodies of ifs.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
  target/i386/kvm/kvm.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index e69abe48e3f8..28ca682b1089 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -1219,8 +1219,9 @@ bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp)
      Error *local_err = NULL;
      int feat;
- if (!hyperv_enabled(cpu))
+    if (!hyperv_enabled(cpu)) {
          return true;
+    }
/*
       * When kvm_hyperv_expand_features is called at CPU feature expansion
@@ -1228,8 +1229,9 @@ bool kvm_hyperv_expand_features(X86CPU *cpu, Error **errp)
       * when KVM_CAP_SYS_HYPERV_CPUID is supported.
       */
      if (!cs->kvm_state &&
-        !kvm_check_extension(kvm_state, KVM_CAP_SYS_HYPERV_CPUID))
+        !kvm_check_extension(kvm_state, KVM_CAP_SYS_HYPERV_CPUID)) {
          return true;
+    }
if (cpu->hyperv_passthrough) {
          cpu->hyperv_vendor_id[0] =


Queued both, thanks.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]