From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D212321A1099A for ; Tue, 12 Dec 2017 01:22:31 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 83032C0050CD; Tue, 12 Dec 2017 09:27:08 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-105.rdu2.redhat.com [10.10.120.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id 647F16134A; Tue, 12 Dec 2017 09:27:07 +0000 (UTC) To: Jian J Wang , edk2-devel@lists.01.org Cc: Wu Hao , Eric Dong References: <20171212032828.14000-1-jian.j.wang@intel.com> From: Laszlo Ersek Message-ID: <5fea413e-b367-1258-835c-03c147965075@redhat.com> Date: Tue, 12 Dec 2017 10:27:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171212032828.14000-1-jian.j.wang@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 12 Dec 2017 09:27:10 +0000 (UTC) Subject: Re: [PATCH] UefiCpuPkg/CpuDxe: Add initialization to local variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 09:22:32 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hello Jian, On 12/12/17 04:28, Jian J Wang wrote: > The purpose of the patch is just to avoid complaining from compiler and > static check tool. > > Cc: Eric Dong > Cc: Wu Hao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Jian J Wang > --- > UefiCpuPkg/CpuDxe/CpuMp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c > index 56ba026152..61018c9950 100644 > --- a/UefiCpuPkg/CpuDxe/CpuMp.c > +++ b/UefiCpuPkg/CpuDxe/CpuMp.c > @@ -695,6 +695,8 @@ InitializeMpExceptionStackSwitchHandlers ( > EssData.Ia32.StackSwitchExceptionNumber = ExceptionNumber; > EssData.Ia32.KnownGoodStackSize = FixedPcdGet32(PcdCpuKnownGoodStackSize); > > + Gdtr.Base = 0; > + Gdtr.Limit = 0; > MpInitLibWhoAmI (&Bsp); > for (Index = 0; Index < mNumberOfProcessors; ++Index) { > // > (1) Please add a separate comment, in the style that is described in : // // set Gdtr to suppress incorrect compiler/analyzer warnings // Gdtr.Base = 0; Gdtr.Limit = 0; (2) I suggest updating the subject line like this: UefiCpuPkg/CpuDxe: suppress invalid warning about uninitialized variable (72 characters) With those changes: Reviewed-by: Laszlo Ersek Thanks! Laszlo