public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bandan Das <bsd@redhat.com>
To: Rajat Jain <rajatja@google.com>
Cc: Gleb Natapov <gleb@kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, rajatxjain@gmail.com
Subject: Re: [PATCH v2] [x86/kvm] emulate.c: Fix comppilation warning
Date: Tue, 09 Jun 2015 21:17:42 -0400	[thread overview]
Message-ID: <jpgr3pk5pl5.fsf@redhat.com> (raw)
In-Reply-To: <1433896397-16748-1-git-send-email-rajatja@google.com> (Rajat Jain's message of "Tue, 9 Jun 2015 17:33:17 -0700")

Rajat Jain <rajatja@google.com> writes:

> Fix the following warning:
>
> arch/x86/kvm/emulate.c: In function '__do_insn_fetch_bytes':
> arch/x86/kvm/emulate.c:814:47: warning: 'linear' may be used uninitialized in this function [-Wmaybe-uninitialized]
> arch/x86/kvm/emulate.c:793:16: note: 'linear' was declared here

Is this recent gcc behavior ? If yes, please mention that in the commit
message.

Please follow convention for the subject line and fix the typo -
"KVM: emulate: Fix compilation warning"

Thanks,
Bandan


> Signed-off-by: Rajat Jain <rajatja@google.com>
> Signed-off-by: Rajat Jain <rajatxjain@gmail.com>
> ---
> v2: Fix the wrong email address.
>
>  arch/x86/kvm/emulate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index 630bcb0..f06e0ca 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -790,7 +790,7 @@ static int __do_insn_fetch_bytes(struct x86_emulate_ctxt *ctxt, int op_size)
>  {
>  	int rc;
>  	unsigned size, max_size;
> -	unsigned long linear;
> +	unsigned long linear = 0;
>  	int cur_size = ctxt->fetch.end - ctxt->fetch.data;
>  	struct segmented_address addr = { .seg = VCPU_SREG_CS,
>  					   .ea = ctxt->eip + cur_size };

  reply	other threads:[~2015-06-10  1:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10  0:33 [PATCH v2] [x86/kvm] emulate.c: Fix comppilation warning Rajat Jain
2015-06-10  1:17 ` Bandan Das [this message]
2015-06-10 17:04   ` Rajat Jain

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=jpgr3pk5pl5.fsf@redhat.com \
    --to=bsd@redhat.com \
    --cc=gleb@kernel.org \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rajatja@google.com \
    --cc=rajatxjain@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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