Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754071AbbFJBRx (ORCPT ); Tue, 9 Jun 2015 21:17:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56223 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753280AbbFJBRp (ORCPT ); Tue, 9 Jun 2015 21:17:45 -0400 From: Bandan Das To: Rajat Jain Cc: Gleb Natapov , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , 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 References: <1433896397-16748-1-git-send-email-rajatja@google.com> Date: Tue, 09 Jun 2015 21:17:42 -0400 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") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1510 Lines: 44 Rajat Jain 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 > Signed-off-by: Rajat Jain > --- > 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 }; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/