public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Gleb Natapov <gleb@redhat.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, 08 Apr 2013 12:28:28 +0200	[thread overview]
Message-ID: <51629BCC.2090803@siemens.com> (raw)
In-Reply-To: <20130408094721.GA6159@redhat.com>

On 2013-04-08 11:47, Gleb Natapov wrote:
> 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?

# python arch/x86/kvm/vmx.c
  File "arch/x86/kvm/vmx.c", line 1
    /*
    ^
SyntaxError: invalid syntax


Hmm, indeed. That explains our problems...

Jan

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

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

      reply	other threads:[~2013-04-08 10:28 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
2013-04-08 10:28   ` Jan Kiszka [this message]

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=51629BCC.2090803@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=fengguang.wu@intel.com \
    --cc=gleb@redhat.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