public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
	"Wu, Fengguang" <fengguang.wu@intel.com>
Subject: Re: [PATCH] KVM: VMX: Add missing braces to avoid redundant error check
Date: Mon, 8 Apr 2013 12:47:21 +0300	[thread overview]
Message-ID: <20130408094721.GA6159@redhat.com> (raw)
In-Reply-To: <516288E2.5080501@siemens.com>

On Mon, Apr 08, 2013 at 11:07:46AM +0200, Jan Kiszka wrote:
> The code was already properly aligned, now also add the braces to avoid
Are you saying kvm is not written in Python?

> that err is checked even if alloc_apic_access_page didn't run and change
> it. Found via Coccinelle by Fengguang Wu.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Applied, thanks.

> ---
>  arch/x86/kvm/vmx.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index cf1aa8f..656b0fa 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -6797,10 +6797,11 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
>  	put_cpu();
>  	if (err)
>  		goto free_vmcs;
> -	if (vm_need_virtualize_apic_accesses(kvm))
> +	if (vm_need_virtualize_apic_accesses(kvm)) {
>  		err = alloc_apic_access_page(kvm);
>  		if (err)
>  			goto free_vmcs;
> +	}
>  
>  	if (enable_ept) {
>  		if (!kvm->arch.ept_identity_map_addr)
> -- 
> 1.7.3.4

--
			Gleb.

  reply	other threads:[~2013-04-08  9:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08  9:07 [PATCH] KVM: VMX: Add missing braces to avoid redundant error check Jan Kiszka
2013-04-08  9:47 ` Gleb Natapov [this message]
2013-04-08 10:28   ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130408094721.GA6159@redhat.com \
    --to=gleb@redhat.com \
    --cc=fengguang.wu@intel.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox