public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch 0/4] Fix coding style issue
@ 2017-10-20  0:59 Dandan Bi
  2017-10-20  0:59 ` [patch 1/4] IntelFrameworkModulePkg/Csm: Refine coding style in comments Dandan Bi
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Dandan Bi @ 2017-10-20  0:59 UTC (permalink / raw)
  To: edk2-devel

This pacth series maily refine the coding style,
such as adding some missing comments, making comments
alin with function...

Dandan Bi (4):
  IntelFrameworkModulePkg/Csm: Refine coding style in comments
  IntelFrameworkModule/LegacyBios: not use explicit comparisons for
    BOOLEAN type
  MdeModulePkg/DxeIplPeim: Refine coding style in function comments
  UefiCpuPkg/MtrrLib: Make comments align with function

 .../Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c              |  8 ++++----
 IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c    | 12 ++++++------
 .../Csm/LegacyBiosDxe/LegacyBiosInterface.h               |  8 ++++----
 MdeModulePkg/Core/DxeIplPeim/DxeIpl.h                     | 14 +++++++-------
 MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c          | 15 +++++++++++----
 UefiCpuPkg/Include/Library/MtrrLib.h                      |  2 +-
 UefiCpuPkg/Library/MtrrLib/MtrrLib.c                      |  2 +-
 7 files changed, 34 insertions(+), 27 deletions(-)

-- 
1.9.5.msysgit.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [patch 1/4] IntelFrameworkModulePkg/Csm: Refine coding style in comments
  2017-10-20  0:59 [patch 0/4] Fix coding style issue Dandan Bi
@ 2017-10-20  0:59 ` Dandan Bi
  2017-10-23  1:19   ` Wang, Jian J
  2017-10-20  0:59 ` [patch 2/4] IntelFrameworkModule/LegacyBios: Avoid explicit comparison for BOOLEAN Dandan Bi
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Dandan Bi @ 2017-10-20  0:59 UTC (permalink / raw)
  To: edk2-devel; +Cc: Jian J Wang, Liming Gao

Make the comments follow Edk2 coding style:
1. Make the comments starts with /** and end with **/.
2. Make the comments descrition end with '.'

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c | 8 ++++----
 IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c           | 8 ++++----
 IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h  | 8 ++++----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
index d2224a2..ebf03d3 100644
--- a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
+++ b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
@@ -1731,12 +1731,12 @@ CheckKeyboardConnect (
     return TRUE;
   }
 }
 
 /**
-   Disable NULL pointer detection
-*/
+  Disable NULL pointer detection.
+**/
 VOID
 DisableNullDetection (
   VOID
   )
 {
@@ -1778,12 +1778,12 @@ DisableNullDetection (
     DEBUG ((DEBUG_WARN, "!!! Page 0 is supposed to be disabled !!!\r\n"));
   }
 }
 
 /**
-   Enable NULL pointer detection
-*/
+   Enable NULL pointer detection.
+**/
 VOID
 EnableNullDetection (
   VOID
   )
 {
diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
index 3176a98..e009999 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
@@ -792,12 +792,12 @@ ToggleEndOfDxeStatus (
 // functions can be used to disable/enable NULL pointer detection before/after
 // accessing those memory.
 //
 
 /**
-   Enable NULL pointer detection
-*/
+   Enable NULL pointer detection.
+**/
 VOID
 EnableNullDetection (
   VOID
   )
 {
@@ -842,12 +842,12 @@ EnableNullDetection (
     ASSERT_EFI_ERROR (Status);
   }
 }
 
 /**
-   Disable NULL pointer detection
-*/
+   Disable NULL pointer detection.
+**/
 VOID
 DisableNullDetection (
   VOID
   )
 {
diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
index 20dfef3..86a3b09 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
@@ -1543,20 +1543,20 @@ EFI_STATUS
 LegacyBiosInstallVgaRom (
   IN  LEGACY_BIOS_INSTANCE            *Private
   );
 
 /**
-   Enable NULL pointer detection
-*/
+   Enable NULL pointer detection.
+**/
 VOID
 EnableNullDetection (
   VOID
   );
 
 /**
-   Disable NULL pointer detection
-*/
+   Disable NULL pointer detection.
+**/
 VOID
 DisableNullDetection (
   VOID
   );
 
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [patch 2/4] IntelFrameworkModule/LegacyBios: Avoid explicit comparison for BOOLEAN
  2017-10-20  0:59 [patch 0/4] Fix coding style issue Dandan Bi
  2017-10-20  0:59 ` [patch 1/4] IntelFrameworkModulePkg/Csm: Refine coding style in comments Dandan Bi
@ 2017-10-20  0:59 ` Dandan Bi
  2017-10-23  1:19   ` Wang, Jian J
  2017-10-20  0:59 ` [patch 3/4] MdeModulePkg/DxeIplPeim: Refine coding style in function comments Dandan Bi
  2017-10-20  0:59 ` [patch 4/4] UefiCpuPkg/MtrrLib: Make comments align with function Dandan Bi
  3 siblings, 1 reply; 9+ messages in thread
From: Dandan Bi @ 2017-10-20  0:59 UTC (permalink / raw)
  To: edk2-devel; +Cc: Jian J Wang, Liming Gao

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
index e009999..c6461f5 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
@@ -804,11 +804,11 @@ EnableNullDetection (
   EFI_STATUS                            Status;
   EFI_GCD_MEMORY_SPACE_DESCRIPTOR       Desc;
 
   if (((PcdGet8 (PcdNullPointerDetectionPropertyMask) & BIT0) == 0)
       ||
-      ((mEndOfDxe == TRUE)  &&
+      ((mEndOfDxe)  &&
        ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & (BIT7|BIT0))
         == (BIT7|BIT0)))
      ) {
     return;
   }
@@ -854,11 +854,11 @@ DisableNullDetection (
   EFI_STATUS                            Status;
   EFI_GCD_MEMORY_SPACE_DESCRIPTOR       Desc;
 
   if (((PcdGet8 (PcdNullPointerDetectionPropertyMask) & BIT0) == 0)
       ||
-      ((mEndOfDxe == TRUE)  &&
+      ((mEndOfDxe)  &&
        ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & (BIT7|BIT0))
         == (BIT7|BIT0)))
      ) {
     return;
   }
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [patch 3/4] MdeModulePkg/DxeIplPeim: Refine coding style in function comments
  2017-10-20  0:59 [patch 0/4] Fix coding style issue Dandan Bi
  2017-10-20  0:59 ` [patch 1/4] IntelFrameworkModulePkg/Csm: Refine coding style in comments Dandan Bi
  2017-10-20  0:59 ` [patch 2/4] IntelFrameworkModule/LegacyBios: Avoid explicit comparison for BOOLEAN Dandan Bi
@ 2017-10-20  0:59 ` Dandan Bi
  2017-10-23  1:20   ` Wang, Jian J
  2017-10-20  0:59 ` [patch 4/4] UefiCpuPkg/MtrrLib: Make comments align with function Dandan Bi
  3 siblings, 1 reply; 9+ messages in thread
From: Dandan Bi @ 2017-10-20  0:59 UTC (permalink / raw)
  To: edk2-devel; +Cc: Jian J Wang, Eric Dong

Make the comments align with the function.
And add some missing function comments.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Core/DxeIplPeim/DxeIpl.h            | 14 +++++++-------
 MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 15 +++++++++++----
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
index ecf1866..f3aabdb 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
@@ -239,28 +239,28 @@ Decompress (
   OUT       VOID                    **OutputBuffer,
   OUT       UINTN                   *OutputSize
   );
 
 /**
-   Clear legacy memory located at the first 4K-page.
+  Clear legacy memory located at the first 4K-page.
 
-   This function traverses the whole HOB list to check if memory from 0 to 4095
-   exists and has not been allocated, and then clear it if so.
+  This function traverses the whole HOB list to check if memory from 0 to 4095
+  exists and has not been allocated, and then clear it if so.
 
-   @param HoStart         The start of HobList passed to DxeCore.
+  @param HobStart         The start of HobList passed to DxeCore.
 
 **/
 VOID
 ClearFirst4KPage (
   IN  VOID *HobStart
   );
 
 /**
-   Return configure status of NULL pointer detection feature
+  Return configure status of NULL pointer detection feature.
 
-   @return TRUE   NULL pointer detection feature is enabled
-   @return FALSE  NULL pointer detection feature is disabled
+  @return TRUE   NULL pointer detection feature is enabled
+  @return FALSE  NULL pointer detection feature is disabled
 **/
 BOOLEAN
 IsNullDetectionEnabled (
   VOID
   );
diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
index a10dea2..29b6205 100644
--- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
+++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
@@ -30,16 +30,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 #include "DxeIpl.h"
 #include "VirtualMemory.h"
 
 /**
-   Clear legacy memory located at the first 4K-page, if available.
+  Clear legacy memory located at the first 4K-page, if available.
 
-   This function traverses the whole HOB list to check if memory from 0 to 4095
-   exists and has not been allocated, and then clear it if so.
+  This function traverses the whole HOB list to check if memory from 0 to 4095
+  exists and has not been allocated, and then clear it if so.
 
-   @param HoStart                   The start of HobList passed to DxeCore.
+  @param HobStart                  The start of HobList passed to DxeCore.
 
 **/
 VOID
 ClearFirst4KPage (
   IN  VOID *HobStart
@@ -84,10 +84,17 @@ ClearFirst4KPage (
   }
 
   return;
 }
 
+/**
+  Return configure status of NULL pointer detection feature.
+
+  @return TRUE   NULL pointer detection feature is enabled
+  @return FALSE  NULL pointer detection feature is disabled
+
+**/
 BOOLEAN
 IsNullDetectionEnabled (
   VOID
   )
 {
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [patch 4/4] UefiCpuPkg/MtrrLib: Make comments align with function
  2017-10-20  0:59 [patch 0/4] Fix coding style issue Dandan Bi
                   ` (2 preceding siblings ...)
  2017-10-20  0:59 ` [patch 3/4] MdeModulePkg/DxeIplPeim: Refine coding style in function comments Dandan Bi
@ 2017-10-20  0:59 ` Dandan Bi
  2017-10-20  2:08   ` Ni, Ruiyu
  3 siblings, 1 reply; 9+ messages in thread
From: Dandan Bi @ 2017-10-20  0:59 UTC (permalink / raw)
  To: edk2-devel; +Cc: Eric Dong, Ruiyu Ni

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 UefiCpuPkg/Include/Library/MtrrLib.h | 2 +-
 UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/UefiCpuPkg/Include/Library/MtrrLib.h b/UefiCpuPkg/Include/Library/MtrrLib.h
index d05d839..0bf7d8e 100644
--- a/UefiCpuPkg/Include/Library/MtrrLib.h
+++ b/UefiCpuPkg/Include/Library/MtrrLib.h
@@ -373,11 +373,11 @@ MtrrSetMemoryAttributeInMtrrSettings (
                                 needs more scratch buffer.
   @param[in]       Ranges       Pointer to an array of MTRR_MEMORY_RANGE.
                                 When range overlap happens, the last one takes higher priority.
                                 When the function returns, either all the attributes are set successfully,
                                 or none of them is set.
-  @param[in]                    Count of MTRR_MEMORY_RANGE.
+  @param[in]      RangeCount    Count of MTRR_MEMORY_RANGE.
 
   @retval RETURN_SUCCESS            The attributes were set for all the memory ranges.
   @retval RETURN_INVALID_PARAMETER  Length in any range is zero.
   @retval RETURN_UNSUPPORTED        The processor does not support one or more bytes of the
                                     memory resource range specified by BaseAddress and Length in any range.
diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
index cb22558..579af27 100644
--- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
+++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
@@ -2146,11 +2146,11 @@ MtrrLibSetBelow1MBMemoryAttribute (
                                 needs more scratch buffer.
   @param[in]       Ranges       Pointer to an array of MTRR_MEMORY_RANGE.
                                 When range overlap happens, the last one takes higher priority.
                                 When the function returns, either all the attributes are set successfully,
                                 or none of them is set.
-  @param[in]                    Count of MTRR_MEMORY_RANGE.
+  @param[in]       RangeCount   Count of MTRR_MEMORY_RANGE.
 
   @retval RETURN_SUCCESS            The attributes were set for all the memory ranges.
   @retval RETURN_INVALID_PARAMETER  Length in any range is zero.
   @retval RETURN_UNSUPPORTED        The processor does not support one or more bytes of the
                                     memory resource range specified by BaseAddress and Length in any range.
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [patch 4/4] UefiCpuPkg/MtrrLib: Make comments align with function
  2017-10-20  0:59 ` [patch 4/4] UefiCpuPkg/MtrrLib: Make comments align with function Dandan Bi
@ 2017-10-20  2:08   ` Ni, Ruiyu
  0 siblings, 0 replies; 9+ messages in thread
From: Ni, Ruiyu @ 2017-10-20  2:08 UTC (permalink / raw)
  To: Bi, Dandan, edk2-devel@lists.01.org; +Cc: Dong, Eric

Dandan,
Thanks for fixing that.

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

-----Original Message-----
From: Bi, Dandan 
Sent: Friday, October 20, 2017 9:00 AM
To: edk2-devel@lists.01.org
Cc: Dong, Eric <eric.dong@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
Subject: [patch 4/4] UefiCpuPkg/MtrrLib: Make comments align with function

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 UefiCpuPkg/Include/Library/MtrrLib.h | 2 +-  UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/UefiCpuPkg/Include/Library/MtrrLib.h b/UefiCpuPkg/Include/Library/MtrrLib.h
index d05d839..0bf7d8e 100644
--- a/UefiCpuPkg/Include/Library/MtrrLib.h
+++ b/UefiCpuPkg/Include/Library/MtrrLib.h
@@ -373,11 +373,11 @@ MtrrSetMemoryAttributeInMtrrSettings (
                                 needs more scratch buffer.
   @param[in]       Ranges       Pointer to an array of MTRR_MEMORY_RANGE.
                                 When range overlap happens, the last one takes higher priority.
                                 When the function returns, either all the attributes are set successfully,
                                 or none of them is set.
-  @param[in]                    Count of MTRR_MEMORY_RANGE.
+  @param[in]      RangeCount    Count of MTRR_MEMORY_RANGE.
 
   @retval RETURN_SUCCESS            The attributes were set for all the memory ranges.
   @retval RETURN_INVALID_PARAMETER  Length in any range is zero.
   @retval RETURN_UNSUPPORTED        The processor does not support one or more bytes of the
                                     memory resource range specified by BaseAddress and Length in any range.
diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
index cb22558..579af27 100644
--- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
+++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
@@ -2146,11 +2146,11 @@ MtrrLibSetBelow1MBMemoryAttribute (
                                 needs more scratch buffer.
   @param[in]       Ranges       Pointer to an array of MTRR_MEMORY_RANGE.
                                 When range overlap happens, the last one takes higher priority.
                                 When the function returns, either all the attributes are set successfully,
                                 or none of them is set.
-  @param[in]                    Count of MTRR_MEMORY_RANGE.
+  @param[in]       RangeCount   Count of MTRR_MEMORY_RANGE.
 
   @retval RETURN_SUCCESS            The attributes were set for all the memory ranges.
   @retval RETURN_INVALID_PARAMETER  Length in any range is zero.
   @retval RETURN_UNSUPPORTED        The processor does not support one or more bytes of the
                                     memory resource range specified by BaseAddress and Length in any range.
--
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [patch 1/4] IntelFrameworkModulePkg/Csm: Refine coding style in comments
  2017-10-20  0:59 ` [patch 1/4] IntelFrameworkModulePkg/Csm: Refine coding style in comments Dandan Bi
@ 2017-10-23  1:19   ` Wang, Jian J
  0 siblings, 0 replies; 9+ messages in thread
From: Wang, Jian J @ 2017-10-23  1:19 UTC (permalink / raw)
  To: Bi, Dandan, edk2-devel@lists.01.org; +Cc: Gao, Liming



Reviewed-by: Jian J Wang <jian.j.wang@intel.com>


> -----Original Message-----
> From: Bi, Dandan
> Sent: Friday, October 20, 2017 9:00 AM
> To: edk2-devel@lists.01.org
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [patch 1/4] IntelFrameworkModulePkg/Csm: Refine coding style in
> comments
> 
> Make the comments follow Edk2 coding style:
> 1. Make the comments starts with /** and end with **/.
> 2. Make the comments descrition end with '.'
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c | 8
> ++++----
>  IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c           | 8 ++++----
>  IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h  | 8
> ++++----
>  3 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git
> a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
> b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
> index d2224a2..ebf03d3 100644
> --- a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
> +++
> b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
> @@ -1731,12 +1731,12 @@ CheckKeyboardConnect (
>      return TRUE;
>    }
>  }
> 
>  /**
> -   Disable NULL pointer detection
> -*/
> +  Disable NULL pointer detection.
> +**/
>  VOID
>  DisableNullDetection (
>    VOID
>    )
>  {
> @@ -1778,12 +1778,12 @@ DisableNullDetection (
>      DEBUG ((DEBUG_WARN, "!!! Page 0 is supposed to be disabled !!!\r\n"));
>    }
>  }
> 
>  /**
> -   Enable NULL pointer detection
> -*/
> +   Enable NULL pointer detection.
> +**/
>  VOID
>  EnableNullDetection (
>    VOID
>    )
>  {
> diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
> b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
> index 3176a98..e009999 100644
> --- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
> +++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
> @@ -792,12 +792,12 @@ ToggleEndOfDxeStatus (
>  // functions can be used to disable/enable NULL pointer detection before/after
>  // accessing those memory.
>  //
> 
>  /**
> -   Enable NULL pointer detection
> -*/
> +   Enable NULL pointer detection.
> +**/
>  VOID
>  EnableNullDetection (
>    VOID
>    )
>  {
> @@ -842,12 +842,12 @@ EnableNullDetection (
>      ASSERT_EFI_ERROR (Status);
>    }
>  }
> 
>  /**
> -   Disable NULL pointer detection
> -*/
> +   Disable NULL pointer detection.
> +**/
>  VOID
>  DisableNullDetection (
>    VOID
>    )
>  {
> diff --git
> a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
> b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
> index 20dfef3..86a3b09 100644
> --- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
> +++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
> @@ -1543,20 +1543,20 @@ EFI_STATUS
>  LegacyBiosInstallVgaRom (
>    IN  LEGACY_BIOS_INSTANCE            *Private
>    );
> 
>  /**
> -   Enable NULL pointer detection
> -*/
> +   Enable NULL pointer detection.
> +**/
>  VOID
>  EnableNullDetection (
>    VOID
>    );
> 
>  /**
> -   Disable NULL pointer detection
> -*/
> +   Disable NULL pointer detection.
> +**/
>  VOID
>  DisableNullDetection (
>    VOID
>    );
> 
> --
> 1.9.5.msysgit.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch 2/4] IntelFrameworkModule/LegacyBios: Avoid explicit comparison for BOOLEAN
  2017-10-20  0:59 ` [patch 2/4] IntelFrameworkModule/LegacyBios: Avoid explicit comparison for BOOLEAN Dandan Bi
@ 2017-10-23  1:19   ` Wang, Jian J
  0 siblings, 0 replies; 9+ messages in thread
From: Wang, Jian J @ 2017-10-23  1:19 UTC (permalink / raw)
  To: Bi, Dandan, edk2-devel@lists.01.org; +Cc: Gao, Liming



Reviewed-by: Jian J Wang <jian.j.wang@intel.com>




> -----Original Message-----
> From: Bi, Dandan
> Sent: Friday, October 20, 2017 9:00 AM
> To: edk2-devel@lists.01.org
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [patch 2/4] IntelFrameworkModule/LegacyBios: Avoid explicit
> comparison for BOOLEAN
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
> b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
> index e009999..c6461f5 100644
> --- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
> +++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
> @@ -804,11 +804,11 @@ EnableNullDetection (
>    EFI_STATUS                            Status;
>    EFI_GCD_MEMORY_SPACE_DESCRIPTOR       Desc;
> 
>    if (((PcdGet8 (PcdNullPointerDetectionPropertyMask) & BIT0) == 0)
>        ||
> -      ((mEndOfDxe == TRUE)  &&
> +      ((mEndOfDxe)  &&
>         ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & (BIT7|BIT0))
>          == (BIT7|BIT0)))
>       ) {
>      return;
>    }
> @@ -854,11 +854,11 @@ DisableNullDetection (
>    EFI_STATUS                            Status;
>    EFI_GCD_MEMORY_SPACE_DESCRIPTOR       Desc;
> 
>    if (((PcdGet8 (PcdNullPointerDetectionPropertyMask) & BIT0) == 0)
>        ||
> -      ((mEndOfDxe == TRUE)  &&
> +      ((mEndOfDxe)  &&
>         ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & (BIT7|BIT0))
>          == (BIT7|BIT0)))
>       ) {
>      return;
>    }
> --
> 1.9.5.msysgit.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch 3/4] MdeModulePkg/DxeIplPeim: Refine coding style in function comments
  2017-10-20  0:59 ` [patch 3/4] MdeModulePkg/DxeIplPeim: Refine coding style in function comments Dandan Bi
@ 2017-10-23  1:20   ` Wang, Jian J
  0 siblings, 0 replies; 9+ messages in thread
From: Wang, Jian J @ 2017-10-23  1:20 UTC (permalink / raw)
  To: Bi, Dandan, edk2-devel@lists.01.org; +Cc: Dong, Eric



Reviewed-by: Jian J Wang <jian.j.wang@intel.com>




> -----Original Message-----
> From: Bi, Dandan
> Sent: Friday, October 20, 2017 9:00 AM
> To: edk2-devel@lists.01.org
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: [patch 3/4] MdeModulePkg/DxeIplPeim: Refine coding style in function
> comments
> 
> Make the comments align with the function.
> And add some missing function comments.
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdeModulePkg/Core/DxeIplPeim/DxeIpl.h            | 14 +++++++-------
>  MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 15 +++++++++++----
>  2 files changed, 18 insertions(+), 11 deletions(-)
> 
> diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
> b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
> index ecf1866..f3aabdb 100644
> --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
> +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
> @@ -239,28 +239,28 @@ Decompress (
>    OUT       VOID                    **OutputBuffer,
>    OUT       UINTN                   *OutputSize
>    );
> 
>  /**
> -   Clear legacy memory located at the first 4K-page.
> +  Clear legacy memory located at the first 4K-page.
> 
> -   This function traverses the whole HOB list to check if memory from 0 to 4095
> -   exists and has not been allocated, and then clear it if so.
> +  This function traverses the whole HOB list to check if memory from 0 to 4095
> +  exists and has not been allocated, and then clear it if so.
> 
> -   @param HoStart         The start of HobList passed to DxeCore.
> +  @param HobStart         The start of HobList passed to DxeCore.
> 
>  **/
>  VOID
>  ClearFirst4KPage (
>    IN  VOID *HobStart
>    );
> 
>  /**
> -   Return configure status of NULL pointer detection feature
> +  Return configure status of NULL pointer detection feature.
> 
> -   @return TRUE   NULL pointer detection feature is enabled
> -   @return FALSE  NULL pointer detection feature is disabled
> +  @return TRUE   NULL pointer detection feature is enabled
> +  @return FALSE  NULL pointer detection feature is disabled
>  **/
>  BOOLEAN
>  IsNullDetectionEnabled (
>    VOID
>    );
> diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> index a10dea2..29b6205 100644
> --- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> +++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c
> @@ -30,16 +30,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
> KIND, EITHER EXPRESS OR IMPLIED.
> 
>  #include "DxeIpl.h"
>  #include "VirtualMemory.h"
> 
>  /**
> -   Clear legacy memory located at the first 4K-page, if available.
> +  Clear legacy memory located at the first 4K-page, if available.
> 
> -   This function traverses the whole HOB list to check if memory from 0 to 4095
> -   exists and has not been allocated, and then clear it if so.
> +  This function traverses the whole HOB list to check if memory from 0 to 4095
> +  exists and has not been allocated, and then clear it if so.
> 
> -   @param HoStart                   The start of HobList passed to DxeCore.
> +  @param HobStart                  The start of HobList passed to DxeCore.
> 
>  **/
>  VOID
>  ClearFirst4KPage (
>    IN  VOID *HobStart
> @@ -84,10 +84,17 @@ ClearFirst4KPage (
>    }
> 
>    return;
>  }
> 
> +/**
> +  Return configure status of NULL pointer detection feature.
> +
> +  @return TRUE   NULL pointer detection feature is enabled
> +  @return FALSE  NULL pointer detection feature is disabled
> +
> +**/
>  BOOLEAN
>  IsNullDetectionEnabled (
>    VOID
>    )
>  {
> --
> 1.9.5.msysgit.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-10-23  1:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-20  0:59 [patch 0/4] Fix coding style issue Dandan Bi
2017-10-20  0:59 ` [patch 1/4] IntelFrameworkModulePkg/Csm: Refine coding style in comments Dandan Bi
2017-10-23  1:19   ` Wang, Jian J
2017-10-20  0:59 ` [patch 2/4] IntelFrameworkModule/LegacyBios: Avoid explicit comparison for BOOLEAN Dandan Bi
2017-10-23  1:19   ` Wang, Jian J
2017-10-20  0:59 ` [patch 3/4] MdeModulePkg/DxeIplPeim: Refine coding style in function comments Dandan Bi
2017-10-23  1:20   ` Wang, Jian J
2017-10-20  0:59 ` [patch 4/4] UefiCpuPkg/MtrrLib: Make comments align with function Dandan Bi
2017-10-20  2:08   ` Ni, Ruiyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox