From patchwork Mon May 30 20:11:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 830862 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4UKBjwK022605 for ; Mon, 30 May 2011 20:11:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757717Ab1E3ULY (ORCPT ); Mon, 30 May 2011 16:11:24 -0400 Received: from mail.skyhub.de ([78.46.96.112]:59357 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753064Ab1E3ULX (ORCPT ); Mon, 30 May 2011 16:11:23 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTP id 829411D9B04; Mon, 30 May 2011 22:11:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1306786282; bh=9E3YQf1IxPVHpIMTztCL8jwa4wN/ZusVv1dDFphOUw8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding; b=Kue5pHzbqnf zLcKWTfM5qyy63OI7uTo9TXu+KCojQWq+8GQWoAk1TQj/6ndHnsk75km6grL6GGD+8b hs6Oeo0mhj7BENoAFqcMCr68hJtOpvlkGj/iw1ZFXmM957OMstQpJM1YGrnb84aaj1N uU6RSgJySNZ3YZewrkZa7VyBA0= X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id g+5ARGSTPJei; Mon, 30 May 2011 22:11:22 +0200 (CEST) Received: from liondog.tnic (g231097129.adsl.alicedsl.de [92.231.97.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 02C061D9B02; Mon, 30 May 2011 22:11:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1306786282; bh=9E3YQf1IxPVHpIMTztCL8jwa4wN/ZusVv1dDFphOUw8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding; b=Kue5pHzbqnf zLcKWTfM5qyy63OI7uTo9TXu+KCojQWq+8GQWoAk1TQj/6ndHnsk75km6grL6GGD+8b hs6Oeo0mhj7BENoAFqcMCr68hJtOpvlkGj/iw1ZFXmM957OMstQpJM1YGrnb84aaj1N uU6RSgJySNZ3YZewrkZa7VyBA0= Received: by liondog.tnic (Postfix, from userid 1000) id 19C744B8C90; Mon, 30 May 2011 22:11:19 +0200 (CEST) From: Borislav Petkov To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org, LKML , Borislav Petkov , Takuya Yoshikawa Subject: [PATCH] kvm: Fix build warnings Date: Mon, 30 May 2011 22:11:17 +0200 Message-Id: <1306786278-12219-1-git-send-email-bp@alien8.de> X-Mailer: git-send-email 1.7.5.rc1.16.g9db1 In-Reply-To: <20110530124600.GB494@eferding.osrc.amd.com> References: <20110530124600.GB494@eferding.osrc.amd.com> MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 30 May 2011 20:11:46 +0000 (UTC) On 3.0-rc1 I get In file included from arch/x86/kvm/mmu.c:2856: arch/x86/kvm/paging_tmpl.h: In function ‘paging32_walk_addr_generic’: arch/x86/kvm/paging_tmpl.h:124: warning: ‘ptep_user’ may be used uninitialized in this function In file included from arch/x86/kvm/mmu.c:2852: arch/x86/kvm/paging_tmpl.h: In function ‘paging64_walk_addr_generic’: arch/x86/kvm/paging_tmpl.h:124: warning: ‘ptep_user’ may be used uninitialized in this function caused by 6e2ca7d1802bf8ed9908435e34daa116662e7790. According to Takuya Yoshikawa, ptep_user won't be used uninitialized so shut up gcc. Cc: Takuya Yoshikawa Link: http://lkml.kernel.org/r/20110530094604.GC21833@liondog.tnic Signed-off-by: Borislav Petkov --- arch/x86/kvm/paging_tmpl.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 6c4dc01..9d03ad4 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -121,7 +121,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker, gva_t addr, u32 access) { pt_element_t pte; - pt_element_t __user *ptep_user; + pt_element_t __user *uninitialized_var(ptep_user); gfn_t table_gfn; unsigned index, pt_access, uninitialized_var(pte_access); gpa_t pte_gpa;