From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web12.107.1615998666717012799 for ; Wed, 17 Mar 2021 09:31:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gj10OaOC; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615998665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SvjEKXw/Sd5ec1aR0zzUHRqrR4Y5OXY0tkWIsfCVqb4=; b=gj10OaOC5LXLMQQd4M+V3hDBHyghyVENzrTP+9uNS8SvTsrkzEKOY7B2BEF8WfVsOPvP52 0l+ycdGWyLWJcuyzyyS8FSmwpBHt8LyyCLouFnKmsP2V9UbZesZWjB4qWUQmtQnTjQ08Xg 87hPf17cx49/pm/DuP8+BB/OwceFXAs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-534-PhOEAZ1XOlCbrpXyxhyBmw-1; Wed, 17 Mar 2021 12:31:04 -0400 X-MC-Unique: PhOEAZ1XOlCbrpXyxhyBmw-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id E806087A831; Wed, 17 Mar 2021 16:31:02 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-112.ams2.redhat.com [10.36.113.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id E20A11893C; Wed, 17 Mar 2021 16:31:01 +0000 (UTC) Subject: Re: [PATCH v2 1/2] UefiCpuPkg/CpuDxe: Rename variables to follow EDKII coding standard To: Ray Ni , devel@edk2.groups.io Cc: Eric Dong , Rahul Kumar References: <20210317110640.489-1-ray.ni@intel.com> <20210317110640.489-2-ray.ni@intel.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 17 Mar 2021 17:31:00 +0100 MIME-Version: 1.0 In-Reply-To: <20210317110640.489-2-ray.ni@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 03/17/21 12:06, Ray Ni wrote: > The change doesn't impact any functionality. > > Signed-off-by: Ray Ni > Cc: Eric Dong > Cc: Laszlo Ersek > Cc: Rahul Kumar > --- > UefiCpuPkg/CpuDxe/CpuGdt.c | 23 +++++++++++------------ > 1 file changed, 11 insertions(+), 12 deletions(-) > > diff --git a/UefiCpuPkg/CpuDxe/CpuGdt.c b/UefiCpuPkg/CpuDxe/CpuGdt.c > index a1ab543f2d..8847bc4819 100644 > --- a/UefiCpuPkg/CpuDxe/CpuGdt.c > +++ b/UefiCpuPkg/CpuDxe/CpuGdt.c > @@ -2,7 +2,7 @@ > C based implementation of IA32 interrupt handling only > requiring a minimal assembly interrupt entry point. > > - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
> + Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent > > **/ > @@ -13,7 +13,7 @@ > // > // Global descriptor table (GDT) Template > // > -STATIC GDT_ENTRIES GdtTemplate = { > +STATIC GDT_ENTRIES mGdtTemplate = { > // > // NULL_SEL > // > @@ -124,27 +124,27 @@ InitGlobalDescriptorTable ( > VOID > ) > { > - GDT_ENTRIES *gdt; > - IA32_DESCRIPTOR gdtPtr; > + GDT_ENTRIES *Gdt; > + IA32_DESCRIPTOR Gdtr; > > // > // Allocate Runtime Data for the GDT > // > - gdt = AllocateRuntimePool (sizeof (GdtTemplate) + 8); > - ASSERT (gdt != NULL); > - gdt = ALIGN_POINTER (gdt, 8); > + Gdt = AllocateRuntimePool (sizeof (mGdtTemplate) + 8); > + ASSERT (Gdt != NULL); > + Gdt = ALIGN_POINTER (Gdt, 8); > > // > // Initialize all GDT entries > // > - CopyMem (gdt, &GdtTemplate, sizeof (GdtTemplate)); > + CopyMem (Gdt, &mGdtTemplate, sizeof (mGdtTemplate)); > > // > // Write GDT register > // > - gdtPtr.Base = (UINT32)(UINTN)(VOID*) gdt; > - gdtPtr.Limit = (UINT16) (sizeof (GdtTemplate) - 1); > - AsmWriteGdtr (&gdtPtr); > + Gdtr.Base = (UINT32) (UINTN) Gdt; > + Gdtr.Limit = (UINT16) (sizeof (mGdtTemplate) - 1); > + AsmWriteGdtr (&Gdtr); > > // > // Update selector (segment) registers base on new GDT > @@ -152,4 +152,3 @@ InitGlobalDescriptorTable ( > SetCodeSelector ((UINT16)CPU_CODE_SEL); > SetDataSelectors ((UINT16)CPU_DATA_SEL); > } > - > This patch does *slightly* more than what it says on the tin (empty line removed from the end, also a useless (VOID*) cast is dropped), but I'm fine with those. Reviewed-by: Laszlo Ersek Thanks! Laszlo