From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Subject: Re: [PATCH v4 12/12] ARM: KVM: fix warning in mmu.c Date: Tue, 18 Feb 2014 11:30:56 -0800 Message-ID: <20140218193056.GB2084@cbox> References: <1392737253-10480-1-git-send-email-marc.zyngier@arm.com> <1392737253-10480-13-git-send-email-marc.zyngier@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Catalin Marinas To: Marc Zyngier Return-path: Received: from mail-pd0-f172.google.com ([209.85.192.172]:46972 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752472AbaBRTax (ORCPT ); Tue, 18 Feb 2014 14:30:53 -0500 Received: by mail-pd0-f172.google.com with SMTP id p10so16711164pdj.3 for ; Tue, 18 Feb 2014 11:30:53 -0800 (PST) Content-Disposition: inline In-Reply-To: <1392737253-10480-13-git-send-email-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Feb 18, 2014 at 03:27:33PM +0000, Marc Zyngier wrote: > Compiling with THP enabled leads to the following warning: >=20 > arch/arm/kvm/mmu.c: In function =E2=80=98unmap_range=E2=80=99: > arch/arm/kvm/mmu.c:177:39: warning: =E2=80=98pte=E2=80=99 may be used= uninitialized in this function [-Wmaybe-uninitialized] > if (kvm_pmd_huge(*pmd) || page_empty(pte)) { > ^ > Code inspection reveals that these two cases are mutually exclusive, > so GCC is a bit overzealous here. Silence it anyway by initializing > pte to NULL and testing it later on. >=20 > Signed-off-by: Marc Zyngier Acked-by: Christoffer Dall