public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zeng, Star" <star.zeng@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [patch] MdeModulePkg/DxeCore: Fix coding style issues
Date: Tue, 7 Mar 2017 02:10:23 +0000	[thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B82F51B@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1488516286-44788-2-git-send-email-dandan.bi@intel.com>

Reviewed-by: Star Zeng <star.zeng@intel.com>

-----Original Message-----
From: Bi, Dandan 
Sent: Friday, March 3, 2017 12:45 PM
To: edk2-devel@lists.01.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Zeng, Star <star.zeng@intel.com>
Subject: [patch] MdeModulePkg/DxeCore: Fix coding style issues

Add comments for functions.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Core/Dxe/Mem/Pool.c              | 19 +++++++++++++++++++
 MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c |  6 ++++--
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c b/MdeModulePkg/Core/Dxe/Mem/Pool.c
index ced6444..1e37356 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Pool.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c
@@ -289,10 +289,21 @@ CoreAllocatePool (
     InstallMemoryAttributesTableOnMemoryAllocation (PoolType);
   }
   return Status;
 }
 
+/**
+  Internal function.  Used by the pool functions to allocate pages
+  to back pool allocation requests.
+
+  @param  PoolType               The type of memory for the new pool pages
+  @param  NoPages                No of pages to allocate
+  @param  Granularity            Bits to align.
+
+  @return The allocated memory, or NULL
+
+**/
 STATIC
 VOID *
 CoreAllocatePoolPagesI (
   IN EFI_MEMORY_TYPE    PoolType,
   IN UINTN              NoPages,
@@ -551,10 +562,18 @@ CoreFreePool (
     InstallMemoryAttributesTableOnMemoryAllocation (PoolType);
   }
   return Status;
 }
 
+/**
+  Internal function.  Frees pool pages allocated via CoreAllocatePoolPagesI().
+
+  @param  PoolType               The type of memory for the pool pages
+  @param  Memory                 The base address to free
+  @param  NoPages                The number of pages to free
+
+**/
 STATIC
 VOID
 CoreFreePoolPagesI (
   IN EFI_MEMORY_TYPE        PoolType,
   IN EFI_PHYSICAL_ADDRESS   Memory,
diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
index 45f360c..1c44148 100644
--- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
+++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
@@ -655,10 +655,12 @@ UnprotectUefiImage (  }
 
 /**
   Return the EFI memory permission attribute associated with memory
   type 'MemoryType' under the configured DXE memory protection policy.
+
+  @param MemoryType       Memory type.
 **/
 STATIC
 UINT64
 GetPermissionAttributeForMemoryType (
   IN EFI_MEMORY_TYPE    MemoryType
@@ -786,11 +788,11 @@ MergeMemoryMapForProtectionPolicy (  }
 
 
 /**
   Remove exec permissions from all regions whose type is identified by
-  PcdDxeNxMemoryProtectionPolicy
+  PcdDxeNxMemoryProtectionPolicy.
 **/
 STATIC
 VOID
 InitializeDxeNxMemoryProtectionPolicy (
   VOID
@@ -1051,11 +1053,11 @@ CoreInitializeMemoryProtection (
   }
   return ;
 }
 
 /**
-  Returns whether we are currently executing in SMM mode
+  Returns whether we are currently executing in SMM mode.
 **/
 STATIC
 BOOLEAN
 IsInSmm (
   VOID
--
1.9.5.msysgit.1



  reply	other threads:[~2017-03-07  2:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03  4:44 [patch] MdeModulePkg: Add PROMPT&HELP string of pcd to UNI file Dandan Bi
2017-03-03  4:44 ` [patch] MdeModulePkg/DxeCore: Fix coding style issues Dandan Bi
2017-03-07  2:10   ` Zeng, Star [this message]
2017-03-07 13:49     ` Zeng, Star
2017-03-07  2:09 ` [patch] MdeModulePkg: Add PROMPT&HELP string of pcd to UNI file Zeng, Star
2017-03-07 13:48   ` Zeng, Star

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0C09AFA07DD0434D9E2A0C6AEB0483103B82F51B@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox