public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg: Fix code style issue
@ 2018-07-30 10:01 Star Zeng
  2018-07-31  2:28 ` Kinney, Michael D
  0 siblings, 1 reply; 2+ messages in thread
From: Star Zeng @ 2018-07-30 10:01 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Michael D Kinney

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 FmpDevicePkg/FmpDevicePkg.uni                      | 22 ++++++------
 FmpDevicePkg/FmpDxe/DetectTestKey.c                |  2 +-
 FmpDevicePkg/FmpDxe/FmpDxe.c                       | 42 +++++++++++-----------
 FmpDevicePkg/FmpDxe/VariableSupport.c              |  6 ++--
 FmpDevicePkg/FmpDxe/VariableSupport.h              |  6 ++--
 .../Include/Library/CapsuleUpdatePolicyLib.h       |  6 ++--
 FmpDevicePkg/Include/Library/FmpDeviceLib.h        | 20 +++++------
 FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h |  8 ++---
 .../CapsuleUpdatePolicyLibNull.c                   |  6 ++--
 .../Library/FmpDeviceLibNull/FmpDeviceLib.c        | 22 ++++++------
 .../FmpPayloadHeaderLibV1/FmpPayloadHeaderLib.c    |  8 ++---
 11 files changed, 75 insertions(+), 73 deletions(-)

diff --git a/FmpDevicePkg/FmpDevicePkg.uni b/FmpDevicePkg/FmpDevicePkg.uni
index fed1da48026e..a922ff44e4db 100644
--- a/FmpDevicePkg/FmpDevicePkg.uni
+++ b/FmpDevicePkg/FmpDevicePkg.uni
@@ -59,17 +59,17 @@
                                                                                                           "value of 0 disables the watchdog timer.  The default value is 0 (watchdog"
                                                                                                           "disabled)."
 
-#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdFmpDevicePkcs7CertBufferXdr_PROMPT  #language en-US "One or more XDR encoded PKCS7 certificates used to verify firmware device capsule update images"
-#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdFmpDevicePkcs7CertBufferXdr_HELP    #language en-US "Provides one or more PKCS7 certificates used to verify a firmware device"
-                                                                                                 "capsule update image.  This PCD is encoded using the Variable-Length Opaque"
-                                                                                                 "Data format of RFC 4506 External Data Representation Standard (XDR)."
-                                                                                                 "The default value is empty with 0 certificates."
+#string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDevicePkcs7CertBufferXdr_PROMPT  #language en-US "One or more XDR encoded PKCS7 certificates used to verify firmware device capsule update images"
+#string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDevicePkcs7CertBufferXdr_HELP    #language en-US "Provides one or more PKCS7 certificates used to verify a firmware device"
+                                                                                               "capsule update image.  This PCD is encoded using the Variable-Length Opaque"
+                                                                                               "Data format of RFC 4506 External Data Representation Standard (XDR)."
+                                                                                               "The default value is empty with 0 certificates."
 
-#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdFmpDeviceLockEventGuid_PROMPT  #language en-US "Firmware Device Lock Event GUID."
-#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdFmpDeviceLockEventGuid_HELP    #language en-US "An event GUID that locks the firmware device when the event is signaled."
-                                                                                            "If this PCD is not a valid GUID value, then the firmware device is locked"
-                                                                                            "when gEfiEndOfDxeEventGroupGuid (End of DXE Phase) is signaled.  The"
-                                                                                            "default value is empty, so by default the firmware device is locked at the"
-                                                                                            "end of the DXE phase."
+#string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceLockEventGuid_PROMPT  #language en-US "Firmware Device Lock Event GUID."
+#string STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceLockEventGuid_HELP    #language en-US "An event GUID that locks the firmware device when the event is signaled."
+                                                                                          "If this PCD is not a valid GUID value, then the firmware device is locked"
+                                                                                          "when gEfiEndOfDxeEventGroupGuid (End of DXE Phase) is signaled.  The"
+                                                                                          "default value is empty, so by default the firmware device is locked at the"
+                                                                                          "end of the DXE phase."
 
 
diff --git a/FmpDevicePkg/FmpDxe/DetectTestKey.c b/FmpDevicePkg/FmpDxe/DetectTestKey.c
index 05ed00732abe..d1ac5a680134 100644
--- a/FmpDevicePkg/FmpDxe/DetectTestKey.c
+++ b/FmpDevicePkg/FmpDxe/DetectTestKey.c
@@ -1,4 +1,4 @@
-/**  @file
+/** @file
   Detects if PcdFmpDevicePkcs7CertBufferXdr contains a test key.
 
   Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c
index 095cebaa7507..0f3396c2ef83 100644
--- a/FmpDevicePkg/FmpDxe/FmpDxe.c
+++ b/FmpDevicePkg/FmpDxe/FmpDxe.c
@@ -1,4 +1,4 @@
-/**  @file
+/** @file
   Produces a Firmware Management Protocol that supports updates to a firmware
   image stored in a firmware device with platform and firmware device specific
   information provided through PCDs and libraries.
@@ -90,7 +90,7 @@ CHAR16  *mVersionName = NULL;
 
 EFI_EVENT  mFmpDeviceLockEvent;
 //
-// Indicates if an attempt has been made to lock a 
+// Indicates if an attempt has been made to lock a
 // FLASH storage device by calling FmpDeviceLock().
 // A FLASH storage device may not support being locked,
 // so this variable is set to TRUE even if FmpDeviceLock()
@@ -474,11 +474,11 @@ cleanup:
   This function allows a copy of the current firmware image to be created and saved.
   The saved copy could later been used, for example, in firmware image recovery or rollback.
 
-  @param[in]  This               A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
-  @param[in]  ImageIndex         A unique number identifying the firmware image(s) within the device.
+  @param[in]      This           A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
+  @param[in]      ImageIndex     A unique number identifying the firmware image(s) within the device.
                                  The number is between 1 and DescriptorCount.
-  @param[out] Image              Points to the buffer where the current image is copied to.
-  @param[out] ImageSize          On entry, points to the size of the buffer pointed to by Image, in bytes.
+  @param[in, out] Image          Points to the buffer where the current image is copied to.
+  @param[in, out] ImageSize      On entry, points to the size of the buffer pointed to by Image, in bytes.
                                  On return, points to the length of the image, in bytes.
 
   @retval EFI_SUCCESS            The device was successfully updated with the new image.
@@ -646,7 +646,7 @@ CheckTheImage (
   IN  UINT8                             ImageIndex,
   IN  CONST VOID                        *Image,
   IN  UINTN                             ImageSize,
-  OUT UINT32                            *ImageUpdateable
+  OUT UINT32                            *ImageUpdatable
   )
 {
   EFI_STATUS  Status;
@@ -677,8 +677,8 @@ CheckTheImage (
     PopulateDescriptor();
   }
 
-  if (ImageUpdateable == NULL) {
-    DEBUG ((DEBUG_ERROR, "FmpDxe: CheckImage() - ImageUpdateable Pointer Parameter is NULL.\n"));
+  if (ImageUpdatable == NULL) {
+    DEBUG ((DEBUG_ERROR, "FmpDxe: CheckImage() - ImageUpdatable Pointer Parameter is NULL.\n"));
     Status = EFI_INVALID_PARAMETER;
     goto cleanup;
   }
@@ -686,14 +686,14 @@ CheckTheImage (
   //
   //Set to valid and then if any tests fail it will update this flag.
   //
-  *ImageUpdateable = IMAGE_UPDATABLE_VALID;
+  *ImageUpdatable = IMAGE_UPDATABLE_VALID;
 
   if (Image == NULL) {
     DEBUG ((DEBUG_ERROR, "FmpDxe: CheckImage() - Image Pointer Parameter is NULL.\n"));
     //
     // not sure if this is needed
     //
-    *ImageUpdateable = IMAGE_UPDATABLE_INVALID;
+    *ImageUpdatable = IMAGE_UPDATABLE_INVALID;
     return EFI_INVALID_PARAMETER;
   }
 
@@ -767,7 +767,7 @@ CheckTheImage (
   //
   if (ImageIndex != 1) {
     DEBUG ((DEBUG_ERROR, "FmpDxe: CheckImage() - Image Index Invalid.\n"));
-    *ImageUpdateable = IMAGE_UPDATABLE_INVALID_TYPE;
+    *ImageUpdatable = IMAGE_UPDATABLE_INVALID_TYPE;
     Status = EFI_SUCCESS;
     goto cleanup;
   }
@@ -785,7 +785,7 @@ CheckTheImage (
   Status = GetFmpPayloadHeaderVersion (FmpPayloadHeader, FmpPayloadSize, &Version);
   if (EFI_ERROR (Status)) {
     DEBUG ((DEBUG_ERROR, "FmpDxe: CheckTheImage() - GetFmpPayloadHeaderVersion failed %r.\n", Status));
-    *ImageUpdateable = IMAGE_UPDATABLE_INVALID;
+    *ImageUpdatable = IMAGE_UPDATABLE_INVALID;
     Status = EFI_SUCCESS;
     goto cleanup;
   }
@@ -799,7 +799,7 @@ CheckTheImage (
       "FmpDxe: CheckTheImage() - Version Lower than lowest supported version. 0x%08X < 0x%08X\n",
       Version, mDesc.LowestSupportedImageVersion)
       );
-    *ImageUpdateable = IMAGE_UPDATABLE_INVALID_OLD;
+    *ImageUpdatable = IMAGE_UPDATABLE_INVALID_OLD;
     Status = EFI_SUCCESS;
     goto cleanup;
   }
@@ -810,7 +810,7 @@ CheckTheImage (
   Status = GetFmpPayloadHeaderSize (FmpPayloadHeader, FmpPayloadSize, &FmpHeaderSize);
   if (EFI_ERROR (Status)) {
     DEBUG ((DEBUG_ERROR, "FmpDxe: CheckTheImage() - GetFmpPayloadHeaderSize failed %r.\n", Status));
-    *ImageUpdateable = IMAGE_UPDATABLE_INVALID;
+    *ImageUpdatable = IMAGE_UPDATABLE_INVALID;
     Status = EFI_SUCCESS;
     goto cleanup;
   }
@@ -830,7 +830,7 @@ CheckTheImage (
   //
   // FmpDeviceLib CheckImage function to do any specific checks
   //
-  Status = FmpDeviceCheckImage ((((UINT8 *)Image) + AllHeaderSize), RawSize, ImageUpdateable);
+  Status = FmpDeviceCheckImage ((((UINT8 *)Image) + AllHeaderSize), RawSize, ImageUpdatable);
   if (EFI_ERROR (Status)) {
     DEBUG ((DEBUG_ERROR, "FmpDxe: CheckTheImage() - FmpDeviceLib CheckImage failed. Status = %r\n", Status));
   }
@@ -909,6 +909,8 @@ SetTheImage (
   EFI_STATUS  GetAttributesStatus;
   UINT64      AttributesSupported;
   UINT64      AttributesSetting;
+  UINT32      Version;
+  UINT32      LowestSupportedVersion;
 
   Status             = EFI_SUCCESS;
   Updateable         = 0;
@@ -1103,7 +1105,7 @@ SetTheImage (
   // Update the version stored in variable
   //
   if (!mRuntimeVersionSupported) {
-    UINT32 Version = DEFAULT_VERSION;
+    Version = DEFAULT_VERSION;
     GetFmpPayloadHeaderVersion (FmpHeader, FmpPayloadSize, &Version);
     SetVersionInVariable (Version);
   }
@@ -1112,9 +1114,9 @@ SetTheImage (
   // Update lowest supported variable
   //
   {
-    UINT32 Version = DEFAULT_LOWESTSUPPORTEDVERSION;
-    GetFmpPayloadHeaderLowestSupportedVersion (FmpHeader, FmpPayloadSize, &Version);
-    SetLowestSupportedVersionInVariable (Version);
+    LowestSupportedVersion = DEFAULT_LOWESTSUPPORTEDVERSION;
+    GetFmpPayloadHeaderLowestSupportedVersion (FmpHeader, FmpPayloadSize, &LowestSupportedVersion);
+    SetLowestSupportedVersionInVariable (LowestSupportedVersion);
   }
 
   LastAttemptStatus = LAST_ATTEMPT_STATUS_SUCCESS;
diff --git a/FmpDevicePkg/FmpDxe/VariableSupport.c b/FmpDevicePkg/FmpDxe/VariableSupport.c
index 6a4330ad6a83..b7e4cb989628 100644
--- a/FmpDevicePkg/FmpDxe/VariableSupport.c
+++ b/FmpDevicePkg/FmpDxe/VariableSupport.c
@@ -1,4 +1,4 @@
-/**  @file
+/** @file
   UEFI variable support functions for Firmware Management Protocol based
   firmware updates.
 
@@ -305,8 +305,8 @@ SetVersionInVariable (
 
   UEFI Variable accessed: GUID = gEfiCallerIdGuid, Name = L"FmpLsv"
 
-  @param[in] LowestSupported  The lowest supported version of the firmware image
-                              in the firmware device.
+  @param[in] LowestSupportedVersion The lowest supported version of the firmware image
+                                    in the firmware device.
 
 **/
 VOID
diff --git a/FmpDevicePkg/FmpDxe/VariableSupport.h b/FmpDevicePkg/FmpDxe/VariableSupport.h
index e7e34f5d8f79..62c213ee1ac8 100644
--- a/FmpDevicePkg/FmpDxe/VariableSupport.h
+++ b/FmpDevicePkg/FmpDxe/VariableSupport.h
@@ -1,4 +1,4 @@
-/**  @file
+/** @file
   UEFI variable support functions for Firmware Management Protocol based
   firmware updates.
 
@@ -128,8 +128,8 @@ SetVersionInVariable (
 
   UEFI Variable accessed: GUID = gEfiCallerIdGuid, Name = L"FmpLsv"
 
-  @param[in] LowestSupported  The lowest supported version of the firmware image
-                              in the firmware device.
+  @param[in] LowestSupportedVersion The lowest supported version of the firmware image
+                                    in the firmware device.
 
 **/
 VOID
diff --git a/FmpDevicePkg/Include/Library/CapsuleUpdatePolicyLib.h b/FmpDevicePkg/Include/Library/CapsuleUpdatePolicyLib.h
index acd3ce5bf545..b5fffc9acb94 100644
--- a/FmpDevicePkg/Include/Library/CapsuleUpdatePolicyLib.h
+++ b/FmpDevicePkg/Include/Library/CapsuleUpdatePolicyLib.h
@@ -1,4 +1,4 @@
-/**  @file
+/** @file
   Provides platform policy services used during a capsule update.
 
   Copyright (c) 2016, Microsoft Corporation. All rights reserved.<BR>
@@ -63,7 +63,7 @@ CheckSystemPower (
 EFI_STATUS
 EFIAPI
 CheckSystemThermal (
-  IN OUT BOOLEAN  *Good
+  OUT BOOLEAN   *Good
   );
 
 /**
@@ -82,7 +82,7 @@ CheckSystemThermal (
 EFI_STATUS
 EFIAPI
 CheckSystemEnvironment (
-  IN OUT BOOLEAN  *Good
+  OUT BOOLEAN   *Good
   );
 
 /**
diff --git a/FmpDevicePkg/Include/Library/FmpDeviceLib.h b/FmpDevicePkg/Include/Library/FmpDeviceLib.h
index 08125f00962c..e882b145cbb9 100644
--- a/FmpDevicePkg/Include/Library/FmpDeviceLib.h
+++ b/FmpDevicePkg/Include/Library/FmpDeviceLib.h
@@ -1,4 +1,4 @@
-/**  @file
+/** @file
   Provides firmware device specific services to support updates of a firmware
   image stored in a firmware device.
 
@@ -147,8 +147,8 @@ FmpDeviceGetImageTypeIdGuidPtr (
 EFI_STATUS
 EFIAPI
 FmpDeviceGetAttributes (
-  IN OUT UINT64  *Supported,
-  IN OUT UINT64  *Setting
+  OUT UINT64    *Supported,
+  OUT UINT64    *Setting
   );
 
 /**
@@ -256,9 +256,9 @@ FmpDeviceGetVersion (
         a copy currently stored firmware image.  This can be used to support
         features such as recovery and rollback.
 
-  @param[out]    Image      Pointer to a caller allocated buffer where the
+  @param[out]     Image     Pointer to a caller allocated buffer where the
                             currently stored firmware image is copied to.
-  @param[in out] ImageSize  Pointer the size, in bytes, of the Image buffer.
+  @param[in, out] ImageSize Pointer the size, in bytes, of the Image buffer.
                             On return, points to the size, in bytes, of firmware
                             image currently stored in the firmware device.
 
@@ -282,8 +282,8 @@ FmpDeviceGetVersion (
 EFI_STATUS
 EFIAPI
 FmpDeviceGetImage (
-  IN OUT    VOID   *Image,
-  IN IN OUT UINTN  *ImageSize
+  OUT    VOID   *Image,
+  IN OUT UINTN  *ImageSize
   );
 
 /**
@@ -305,9 +305,9 @@ FmpDeviceGetImage (
 
   @retval EFI_SUCCESS            The image was successfully checked.  Additional
                                  status information is returned in
-                                 ImageUpdateable.
+                                 ImageUpdatable.
   @retval EFI_INVALID_PARAMETER  Image is NULL.
-  @retval EFI_INVALID_PARAMETER  ImageUpdateable is NULL.
+  @retval EFI_INVALID_PARAMETER  ImageUpdatable is NULL.
 
 **/
 EFI_STATUS
@@ -315,7 +315,7 @@ EFIAPI
 FmpDeviceCheckImage (
   IN  CONST VOID  *Image,
   IN  UINTN       ImageSize,
-  OUT UINT32      *ImageUpdateable
+  OUT UINT32      *ImageUpdatable
   );
 
 /**
diff --git a/FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h b/FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h
index cb5622e9ce1f..f959cbbc94d1 100644
--- a/FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h
+++ b/FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h
@@ -1,4 +1,4 @@
-/**  @file
+/** @file
   Provides services to retrieve values from a capsule's FMP Payload Header.
   The structure is not included in the library class.  Instead, services are
   provided to retrieve information from the FMP Payload Header.  If information
@@ -92,9 +92,9 @@ GetFmpPayloadHeaderVersion (
 EFI_STATUS
 EFIAPI
 GetFmpPayloadHeaderLowestSupportedVersion (
-  IN     CONST VOID   *Header,
-  IN     CONST UINTN  FmpPayloadSize,
-  IN OUT UINT32       *LowestSupportedVersion
+  IN  CONST VOID    *Header,
+  IN  CONST UINTN   FmpPayloadSize,
+  OUT UINT32        *LowestSupportedVersion
   );
 
 #endif
diff --git a/FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.c b/FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.c
index d86d6ba61234..3f49b69e9045 100644
--- a/FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.c
+++ b/FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.c
@@ -1,4 +1,4 @@
-/**  @file
+/** @file
   Provides platform policy services used during a capsule update.
 
   Copyright (c) 2016, Microsoft Corporation. All rights reserved.<BR>
@@ -67,7 +67,7 @@ CheckSystemPower (
 EFI_STATUS
 EFIAPI
 CheckSystemThermal (
-  IN OUT BOOLEAN  *Good
+  OUT BOOLEAN   *Good
   )
 {
   *Good = TRUE;
@@ -90,7 +90,7 @@ CheckSystemThermal (
 EFI_STATUS
 EFIAPI
 CheckSystemEnvironment (
-  IN OUT BOOLEAN  *Good
+  OUT BOOLEAN   *Good
   )
 {
   *Good = TRUE;
diff --git a/FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLib.c b/FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLib.c
index 03e8750661c2..c918c5b2e8d9 100644
--- a/FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLib.c
+++ b/FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLib.c
@@ -1,4 +1,4 @@
-/**  @file
+/** @file
   Provides firmware device specific services to support updates of a firmware
   image stored in a firmware device.
 
@@ -79,7 +79,7 @@ RegisterFmpInstaller (
 EFI_STATUS
 EFIAPI
 FmpDeviceGetSize (
-  IN UINTN  *Size
+  OUT UINTN  *Size
   )
 {
   if (Size == NULL) {
@@ -138,8 +138,8 @@ FmpDeviceGetImageTypeIdGuidPtr (
 EFI_STATUS
 EFIAPI
 FmpDeviceGetAttributes (
-  IN OUT UINT64  *Supported,
-  IN OUT UINT64  *Setting
+  OUT UINT64    *Supported,
+  OUT UINT64    *Setting
   )
 {
   if (Supported == NULL || Setting == NULL) {
@@ -268,9 +268,9 @@ FmpDeviceGetVersion (
         a copy currently stored firmware image.  This can be used to support
         features such as recovery and rollback.
 
-  @param[out]    Image      Pointer to a caller allocated buffer where the
+  @param[out]     Image     Pointer to a caller allocated buffer where the
                             currently stored firmware image is copied to.
-  @param[in out] ImageSize  Pointer the size, in bytes, of the Image buffer.
+  @param[in, out] ImageSize Pointer the size, in bytes, of the Image buffer.
                             On return, points to the size, in bytes, of firmware
                             image currently stored in the firmware device.
 
@@ -294,8 +294,8 @@ FmpDeviceGetVersion (
 EFI_STATUS
 EFIAPI
 FmpDeviceGetImage (
-  IN OUT    VOID   *Image,
-  IN IN OUT UINTN  *ImageSize
+  OUT    VOID   *Image,
+  IN OUT UINTN  *ImageSize
   )
 {
   return EFI_UNSUPPORTED;
@@ -320,9 +320,9 @@ FmpDeviceGetImage (
 
   @retval EFI_SUCCESS            The image was successfully checked.  Additional
                                  status information is returned in
-                                 ImageUpdateable.
+                                 ImageUpdatable.
   @retval EFI_INVALID_PARAMETER  Image is NULL.
-  @retval EFI_INVALID_PARAMETER  ImageUpdateable is NULL.
+  @retval EFI_INVALID_PARAMETER  ImageUpdatable is NULL.
 
 **/
 EFI_STATUS
@@ -330,7 +330,7 @@ EFIAPI
 FmpDeviceCheckImage (
   IN  CONST VOID  *Image,
   IN  UINTN       ImageSize,
-  OUT UINT32      *ImageUpdateable
+  OUT UINT32      *ImageUpdatable
   )
 {
   return EFI_SUCCESS;
diff --git a/FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLib.c b/FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLib.c
index 5f08e8b0fd15..b7cf044aa98d 100644
--- a/FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLib.c
+++ b/FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLib.c
@@ -1,4 +1,4 @@
-/**  @file
+/** @file
   Provides services to retrieve values from Version 1 of a capsule's FMP Payload
   Header. The FMP Payload Header structure is not defined in the library class.
   Instead, services are provided to retrieve information from the FMP Payload
@@ -159,9 +159,9 @@ GetFmpPayloadHeaderVersion (
 EFI_STATUS
 EFIAPI
 GetFmpPayloadHeaderLowestSupportedVersion (
-  IN     CONST VOID   *Header,
-  IN     CONST UINTN  FmpPayloadSize,
-  IN OUT UINT32       *LowestSupportedVersion
+  IN  CONST VOID    *Header,
+  IN  CONST UINTN   FmpPayloadSize,
+  OUT UINT32        *LowestSupportedVersion
   )
 {
   FMP_PAYLOAD_HEADER  *FmpPayloadHeader;
-- 
2.7.0.windows.1



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

* Re: [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg: Fix code style issue
  2018-07-30 10:01 [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg: Fix code style issue Star Zeng
@ 2018-07-31  2:28 ` Kinney, Michael D
  0 siblings, 0 replies; 2+ messages in thread
From: Kinney, Michael D @ 2018-07-31  2:28 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org, Kinney, Michael D

Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

Mike

> -----Original Message-----
> From: Zeng, Star
> Sent: Monday, July 30, 2018 3:02 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Subject: [staging/FmpDevicePkg-master][PATCH]
> FmpDevicePkg: Fix code style issue
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
>  FmpDevicePkg/FmpDevicePkg.uni                      |
> 22 ++++++------
>  FmpDevicePkg/FmpDxe/DetectTestKey.c                |
> 2 +-
>  FmpDevicePkg/FmpDxe/FmpDxe.c                       |
> 42 +++++++++++-----------
>  FmpDevicePkg/FmpDxe/VariableSupport.c              |
> 6 ++--
>  FmpDevicePkg/FmpDxe/VariableSupport.h              |
> 6 ++--
>  .../Include/Library/CapsuleUpdatePolicyLib.h       |
> 6 ++--
>  FmpDevicePkg/Include/Library/FmpDeviceLib.h        |
> 20 +++++------
>  FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h |
> 8 ++---
>  .../CapsuleUpdatePolicyLibNull.c                   |
> 6 ++--
>  .../Library/FmpDeviceLibNull/FmpDeviceLib.c        |
> 22 ++++++------
>  .../FmpPayloadHeaderLibV1/FmpPayloadHeaderLib.c    |
> 8 ++---
>  11 files changed, 75 insertions(+), 73 deletions(-)
> 
> diff --git a/FmpDevicePkg/FmpDevicePkg.uni
> b/FmpDevicePkg/FmpDevicePkg.uni
> index fed1da48026e..a922ff44e4db 100644
> --- a/FmpDevicePkg/FmpDevicePkg.uni
> +++ b/FmpDevicePkg/FmpDevicePkg.uni
> @@ -59,17 +59,17 @@
> 
> "value of 0 disables the watchdog timer.  The default
> value is 0 (watchdog"
> 
> "disabled)."
> 
> -#string
> STR_gEfiSecurityPkgTokenSpaceGuid_PcdFmpDevicePkcs7Cert
> BufferXdr_PROMPT  #language en-US "One or more XDR
> encoded PKCS7 certificates used to verify firmware
> device capsule update images"
> -#string
> STR_gEfiSecurityPkgTokenSpaceGuid_PcdFmpDevicePkcs7Cert
> BufferXdr_HELP    #language en-US "Provides one or more
> PKCS7 certificates used to verify a firmware device"
> -
> "capsule update image.  This PCD is encoded using the
> Variable-Length Opaque"
> -
> "Data format of RFC 4506 External Data Representation
> Standard (XDR)."
> -
> "The default value is empty with 0 certificates."
> +#string
> STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDevicePkcs7CertBu
> fferXdr_PROMPT  #language en-US "One or more XDR
> encoded PKCS7 certificates used to verify firmware
> device capsule update images"
> +#string
> STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDevicePkcs7CertBu
> fferXdr_HELP    #language en-US "Provides one or more
> PKCS7 certificates used to verify a firmware device"
> +
> "capsule update image.  This PCD is encoded using the
> Variable-Length Opaque"
> +
> "Data format of RFC 4506 External Data Representation
> Standard (XDR)."
> +
> "The default value is empty with 0 certificates."
> 
> -#string
> STR_gEfiSecurityPkgTokenSpaceGuid_PcdFmpDeviceLockEvent
> Guid_PROMPT  #language en-US "Firmware Device Lock
> Event GUID."
> -#string
> STR_gEfiSecurityPkgTokenSpaceGuid_PcdFmpDeviceLockEvent
> Guid_HELP    #language en-US "An event GUID that locks
> the firmware device when the event is signaled."
> -
> "If this PCD is not a valid GUID value, then the
> firmware device is locked"
> -
> "when gEfiEndOfDxeEventGroupGuid (End of DXE Phase) is
> signaled.  The"
> -
> "default value is empty, so by default the firmware
> device is locked at the"
> -
> "end of the DXE phase."
> +#string
> STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceLockEventGu
> id_PROMPT  #language en-US "Firmware Device Lock Event
> GUID."
> +#string
> STR_gFmpDevicePkgTokenSpaceGuid_PcdFmpDeviceLockEventGu
> id_HELP    #language en-US "An event GUID that locks
> the firmware device when the event is signaled."
> +
> "If this PCD is not a valid GUID value, then the
> firmware device is locked"
> +
> "when gEfiEndOfDxeEventGroupGuid (End of DXE Phase) is
> signaled.  The"
> +
> "default value is empty, so by default the firmware
> device is locked at the"
> +
> "end of the DXE phase."
> 
> 
> diff --git a/FmpDevicePkg/FmpDxe/DetectTestKey.c
> b/FmpDevicePkg/FmpDxe/DetectTestKey.c
> index 05ed00732abe..d1ac5a680134 100644
> --- a/FmpDevicePkg/FmpDxe/DetectTestKey.c
> +++ b/FmpDevicePkg/FmpDxe/DetectTestKey.c
> @@ -1,4 +1,4 @@
> -/**  @file
> +/** @file
>    Detects if PcdFmpDevicePkcs7CertBufferXdr contains a
> test key.
> 
>    Copyright (c) 2018, Intel Corporation. All rights
> reserved.<BR>
> diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c
> b/FmpDevicePkg/FmpDxe/FmpDxe.c
> index 095cebaa7507..0f3396c2ef83 100644
> --- a/FmpDevicePkg/FmpDxe/FmpDxe.c
> +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c
> @@ -1,4 +1,4 @@
> -/**  @file
> +/** @file
>    Produces a Firmware Management Protocol that
> supports updates to a firmware
>    image stored in a firmware device with platform and
> firmware device specific
>    information provided through PCDs and libraries.
> @@ -90,7 +90,7 @@ CHAR16  *mVersionName = NULL;
> 
>  EFI_EVENT  mFmpDeviceLockEvent;
>  //
> -// Indicates if an attempt has been made to lock a
> +// Indicates if an attempt has been made to lock a
>  // FLASH storage device by calling FmpDeviceLock().
>  // A FLASH storage device may not support being
> locked,
>  // so this variable is set to TRUE even if
> FmpDeviceLock()
> @@ -474,11 +474,11 @@ cleanup:
>    This function allows a copy of the current firmware
> image to be created and saved.
>    The saved copy could later been used, for example,
> in firmware image recovery or rollback.
> 
> -  @param[in]  This               A pointer to the
> EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
> -  @param[in]  ImageIndex         A unique number
> identifying the firmware image(s) within the device.
> +  @param[in]      This           A pointer to the
> EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance.
> +  @param[in]      ImageIndex     A unique number
> identifying the firmware image(s) within the device.
>                                   The number is between
> 1 and DescriptorCount.
> -  @param[out] Image              Points to the buffer
> where the current image is copied to.
> -  @param[out] ImageSize          On entry, points to
> the size of the buffer pointed to by Image, in bytes.
> +  @param[in, out] Image          Points to the buffer
> where the current image is copied to.
> +  @param[in, out] ImageSize      On entry, points to
> the size of the buffer pointed to by Image, in bytes.
>                                   On return, points to
> the length of the image, in bytes.
> 
>    @retval EFI_SUCCESS            The device was
> successfully updated with the new image.
> @@ -646,7 +646,7 @@ CheckTheImage (
>    IN  UINT8                             ImageIndex,
>    IN  CONST VOID                        *Image,
>    IN  UINTN                             ImageSize,
> -  OUT UINT32
> *ImageUpdateable
> +  OUT UINT32
> *ImageUpdatable
>    )
>  {
>    EFI_STATUS  Status;
> @@ -677,8 +677,8 @@ CheckTheImage (
>      PopulateDescriptor();
>    }
> 
> -  if (ImageUpdateable == NULL) {
> -    DEBUG ((DEBUG_ERROR, "FmpDxe: CheckImage() -
> ImageUpdateable Pointer Parameter is NULL.\n"));
> +  if (ImageUpdatable == NULL) {
> +    DEBUG ((DEBUG_ERROR, "FmpDxe: CheckImage() -
> ImageUpdatable Pointer Parameter is NULL.\n"));
>      Status = EFI_INVALID_PARAMETER;
>      goto cleanup;
>    }
> @@ -686,14 +686,14 @@ CheckTheImage (
>    //
>    //Set to valid and then if any tests fail it will
> update this flag.
>    //
> -  *ImageUpdateable = IMAGE_UPDATABLE_VALID;
> +  *ImageUpdatable = IMAGE_UPDATABLE_VALID;
> 
>    if (Image == NULL) {
>      DEBUG ((DEBUG_ERROR, "FmpDxe: CheckImage() - Image
> Pointer Parameter is NULL.\n"));
>      //
>      // not sure if this is needed
>      //
> -    *ImageUpdateable = IMAGE_UPDATABLE_INVALID;
> +    *ImageUpdatable = IMAGE_UPDATABLE_INVALID;
>      return EFI_INVALID_PARAMETER;
>    }
> 
> @@ -767,7 +767,7 @@ CheckTheImage (
>    //
>    if (ImageIndex != 1) {
>      DEBUG ((DEBUG_ERROR, "FmpDxe: CheckImage() - Image
> Index Invalid.\n"));
> -    *ImageUpdateable = IMAGE_UPDATABLE_INVALID_TYPE;
> +    *ImageUpdatable = IMAGE_UPDATABLE_INVALID_TYPE;
>      Status = EFI_SUCCESS;
>      goto cleanup;
>    }
> @@ -785,7 +785,7 @@ CheckTheImage (
>    Status = GetFmpPayloadHeaderVersion
> (FmpPayloadHeader, FmpPayloadSize, &Version);
>    if (EFI_ERROR (Status)) {
>      DEBUG ((DEBUG_ERROR, "FmpDxe: CheckTheImage() -
> GetFmpPayloadHeaderVersion failed %r.\n", Status));
> -    *ImageUpdateable = IMAGE_UPDATABLE_INVALID;
> +    *ImageUpdatable = IMAGE_UPDATABLE_INVALID;
>      Status = EFI_SUCCESS;
>      goto cleanup;
>    }
> @@ -799,7 +799,7 @@ CheckTheImage (
>        "FmpDxe: CheckTheImage() - Version Lower than
> lowest supported version. 0x%08X < 0x%08X\n",
>        Version, mDesc.LowestSupportedImageVersion)
>        );
> -    *ImageUpdateable = IMAGE_UPDATABLE_INVALID_OLD;
> +    *ImageUpdatable = IMAGE_UPDATABLE_INVALID_OLD;
>      Status = EFI_SUCCESS;
>      goto cleanup;
>    }
> @@ -810,7 +810,7 @@ CheckTheImage (
>    Status = GetFmpPayloadHeaderSize (FmpPayloadHeader,
> FmpPayloadSize, &FmpHeaderSize);
>    if (EFI_ERROR (Status)) {
>      DEBUG ((DEBUG_ERROR, "FmpDxe: CheckTheImage() -
> GetFmpPayloadHeaderSize failed %r.\n", Status));
> -    *ImageUpdateable = IMAGE_UPDATABLE_INVALID;
> +    *ImageUpdatable = IMAGE_UPDATABLE_INVALID;
>      Status = EFI_SUCCESS;
>      goto cleanup;
>    }
> @@ -830,7 +830,7 @@ CheckTheImage (
>    //
>    // FmpDeviceLib CheckImage function to do any
> specific checks
>    //
> -  Status = FmpDeviceCheckImage ((((UINT8 *)Image) +
> AllHeaderSize), RawSize, ImageUpdateable);
> +  Status = FmpDeviceCheckImage ((((UINT8 *)Image) +
> AllHeaderSize), RawSize, ImageUpdatable);
>    if (EFI_ERROR (Status)) {
>      DEBUG ((DEBUG_ERROR, "FmpDxe: CheckTheImage() -
> FmpDeviceLib CheckImage failed. Status = %r\n",
> Status));
>    }
> @@ -909,6 +909,8 @@ SetTheImage (
>    EFI_STATUS  GetAttributesStatus;
>    UINT64      AttributesSupported;
>    UINT64      AttributesSetting;
> +  UINT32      Version;
> +  UINT32      LowestSupportedVersion;
> 
>    Status             = EFI_SUCCESS;
>    Updateable         = 0;
> @@ -1103,7 +1105,7 @@ SetTheImage (
>    // Update the version stored in variable
>    //
>    if (!mRuntimeVersionSupported) {
> -    UINT32 Version = DEFAULT_VERSION;
> +    Version = DEFAULT_VERSION;
>      GetFmpPayloadHeaderVersion (FmpHeader,
> FmpPayloadSize, &Version);
>      SetVersionInVariable (Version);
>    }
> @@ -1112,9 +1114,9 @@ SetTheImage (
>    // Update lowest supported variable
>    //
>    {
> -    UINT32 Version = DEFAULT_LOWESTSUPPORTEDVERSION;
> -    GetFmpPayloadHeaderLowestSupportedVersion
> (FmpHeader, FmpPayloadSize, &Version);
> -    SetLowestSupportedVersionInVariable (Version);
> +    LowestSupportedVersion =
> DEFAULT_LOWESTSUPPORTEDVERSION;
> +    GetFmpPayloadHeaderLowestSupportedVersion
> (FmpHeader, FmpPayloadSize, &LowestSupportedVersion);
> +    SetLowestSupportedVersionInVariable
> (LowestSupportedVersion);
>    }
> 
>    LastAttemptStatus = LAST_ATTEMPT_STATUS_SUCCESS;
> diff --git a/FmpDevicePkg/FmpDxe/VariableSupport.c
> b/FmpDevicePkg/FmpDxe/VariableSupport.c
> index 6a4330ad6a83..b7e4cb989628 100644
> --- a/FmpDevicePkg/FmpDxe/VariableSupport.c
> +++ b/FmpDevicePkg/FmpDxe/VariableSupport.c
> @@ -1,4 +1,4 @@
> -/**  @file
> +/** @file
>    UEFI variable support functions for Firmware
> Management Protocol based
>    firmware updates.
> 
> @@ -305,8 +305,8 @@ SetVersionInVariable (
> 
>    UEFI Variable accessed: GUID = gEfiCallerIdGuid,
> Name = L"FmpLsv"
> 
> -  @param[in] LowestSupported  The lowest supported
> version of the firmware image
> -                              in the firmware device.
> +  @param[in] LowestSupportedVersion The lowest
> supported version of the firmware image
> +                                    in the firmware
> device.
> 
>  **/
>  VOID
> diff --git a/FmpDevicePkg/FmpDxe/VariableSupport.h
> b/FmpDevicePkg/FmpDxe/VariableSupport.h
> index e7e34f5d8f79..62c213ee1ac8 100644
> --- a/FmpDevicePkg/FmpDxe/VariableSupport.h
> +++ b/FmpDevicePkg/FmpDxe/VariableSupport.h
> @@ -1,4 +1,4 @@
> -/**  @file
> +/** @file
>    UEFI variable support functions for Firmware
> Management Protocol based
>    firmware updates.
> 
> @@ -128,8 +128,8 @@ SetVersionInVariable (
> 
>    UEFI Variable accessed: GUID = gEfiCallerIdGuid,
> Name = L"FmpLsv"
> 
> -  @param[in] LowestSupported  The lowest supported
> version of the firmware image
> -                              in the firmware device.
> +  @param[in] LowestSupportedVersion The lowest
> supported version of the firmware image
> +                                    in the firmware
> device.
> 
>  **/
>  VOID
> diff --git
> a/FmpDevicePkg/Include/Library/CapsuleUpdatePolicyLib.h
> b/FmpDevicePkg/Include/Library/CapsuleUpdatePolicyLib.h
> index acd3ce5bf545..b5fffc9acb94 100644
> ---
> a/FmpDevicePkg/Include/Library/CapsuleUpdatePolicyLib.h
> +++
> b/FmpDevicePkg/Include/Library/CapsuleUpdatePolicyLib.h
> @@ -1,4 +1,4 @@
> -/**  @file
> +/** @file
>    Provides platform policy services used during a
> capsule update.
> 
>    Copyright (c) 2016, Microsoft Corporation. All
> rights reserved.<BR>
> @@ -63,7 +63,7 @@ CheckSystemPower (
>  EFI_STATUS
>  EFIAPI
>  CheckSystemThermal (
> -  IN OUT BOOLEAN  *Good
> +  OUT BOOLEAN   *Good
>    );
> 
>  /**
> @@ -82,7 +82,7 @@ CheckSystemThermal (
>  EFI_STATUS
>  EFIAPI
>  CheckSystemEnvironment (
> -  IN OUT BOOLEAN  *Good
> +  OUT BOOLEAN   *Good
>    );
> 
>  /**
> diff --git
> a/FmpDevicePkg/Include/Library/FmpDeviceLib.h
> b/FmpDevicePkg/Include/Library/FmpDeviceLib.h
> index 08125f00962c..e882b145cbb9 100644
> --- a/FmpDevicePkg/Include/Library/FmpDeviceLib.h
> +++ b/FmpDevicePkg/Include/Library/FmpDeviceLib.h
> @@ -1,4 +1,4 @@
> -/**  @file
> +/** @file
>    Provides firmware device specific services to
> support updates of a firmware
>    image stored in a firmware device.
> 
> @@ -147,8 +147,8 @@ FmpDeviceGetImageTypeIdGuidPtr (
>  EFI_STATUS
>  EFIAPI
>  FmpDeviceGetAttributes (
> -  IN OUT UINT64  *Supported,
> -  IN OUT UINT64  *Setting
> +  OUT UINT64    *Supported,
> +  OUT UINT64    *Setting
>    );
> 
>  /**
> @@ -256,9 +256,9 @@ FmpDeviceGetVersion (
>          a copy currently stored firmware image.  This
> can be used to support
>          features such as recovery and rollback.
> 
> -  @param[out]    Image      Pointer to a caller
> allocated buffer where the
> +  @param[out]     Image     Pointer to a caller
> allocated buffer where the
>                              currently stored firmware
> image is copied to.
> -  @param[in out] ImageSize  Pointer the size, in
> bytes, of the Image buffer.
> +  @param[in, out] ImageSize Pointer the size, in
> bytes, of the Image buffer.
>                              On return, points to the
> size, in bytes, of firmware
>                              image currently stored in
> the firmware device.
> 
> @@ -282,8 +282,8 @@ FmpDeviceGetVersion (
>  EFI_STATUS
>  EFIAPI
>  FmpDeviceGetImage (
> -  IN OUT    VOID   *Image,
> -  IN IN OUT UINTN  *ImageSize
> +  OUT    VOID   *Image,
> +  IN OUT UINTN  *ImageSize
>    );
> 
>  /**
> @@ -305,9 +305,9 @@ FmpDeviceGetImage (
> 
>    @retval EFI_SUCCESS            The image was
> successfully checked.  Additional
>                                   status information is
> returned in
> -                                 ImageUpdateable.
> +                                 ImageUpdatable.
>    @retval EFI_INVALID_PARAMETER  Image is NULL.
> -  @retval EFI_INVALID_PARAMETER  ImageUpdateable is
> NULL.
> +  @retval EFI_INVALID_PARAMETER  ImageUpdatable is
> NULL.
> 
>  **/
>  EFI_STATUS
> @@ -315,7 +315,7 @@ EFIAPI
>  FmpDeviceCheckImage (
>    IN  CONST VOID  *Image,
>    IN  UINTN       ImageSize,
> -  OUT UINT32      *ImageUpdateable
> +  OUT UINT32      *ImageUpdatable
>    );
> 
>  /**
> diff --git
> a/FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h
> b/FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h
> index cb5622e9ce1f..f959cbbc94d1 100644
> ---
> a/FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h
> +++
> b/FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h
> @@ -1,4 +1,4 @@
> -/**  @file
> +/** @file
>    Provides services to retrieve values from a
> capsule's FMP Payload Header.
>    The structure is not included in the library class.
> Instead, services are
>    provided to retrieve information from the FMP
> Payload Header.  If information
> @@ -92,9 +92,9 @@ GetFmpPayloadHeaderVersion (
>  EFI_STATUS
>  EFIAPI
>  GetFmpPayloadHeaderLowestSupportedVersion (
> -  IN     CONST VOID   *Header,
> -  IN     CONST UINTN  FmpPayloadSize,
> -  IN OUT UINT32       *LowestSupportedVersion
> +  IN  CONST VOID    *Header,
> +  IN  CONST UINTN   FmpPayloadSize,
> +  OUT UINT32        *LowestSupportedVersion
>    );
> 
>  #endif
> diff --git
> a/FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/Capsu
> leUpdatePolicyLibNull.c
> b/FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/Capsu
> leUpdatePolicyLibNull.c
> index d86d6ba61234..3f49b69e9045 100644
> ---
> a/FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/Capsu
> leUpdatePolicyLibNull.c
> +++
> b/FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/Capsu
> leUpdatePolicyLibNull.c
> @@ -1,4 +1,4 @@
> -/**  @file
> +/** @file
>    Provides platform policy services used during a
> capsule update.
> 
>    Copyright (c) 2016, Microsoft Corporation. All
> rights reserved.<BR>
> @@ -67,7 +67,7 @@ CheckSystemPower (
>  EFI_STATUS
>  EFIAPI
>  CheckSystemThermal (
> -  IN OUT BOOLEAN  *Good
> +  OUT BOOLEAN   *Good
>    )
>  {
>    *Good = TRUE;
> @@ -90,7 +90,7 @@ CheckSystemThermal (
>  EFI_STATUS
>  EFIAPI
>  CheckSystemEnvironment (
> -  IN OUT BOOLEAN  *Good
> +  OUT BOOLEAN   *Good
>    )
>  {
>    *Good = TRUE;
> diff --git
> a/FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLib.c
> b/FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLib.c
> index 03e8750661c2..c918c5b2e8d9 100644
> ---
> a/FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLib.c
> +++
> b/FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLib.c
> @@ -1,4 +1,4 @@
> -/**  @file
> +/** @file
>    Provides firmware device specific services to
> support updates of a firmware
>    image stored in a firmware device.
> 
> @@ -79,7 +79,7 @@ RegisterFmpInstaller (
>  EFI_STATUS
>  EFIAPI
>  FmpDeviceGetSize (
> -  IN UINTN  *Size
> +  OUT UINTN  *Size
>    )
>  {
>    if (Size == NULL) {
> @@ -138,8 +138,8 @@ FmpDeviceGetImageTypeIdGuidPtr (
>  EFI_STATUS
>  EFIAPI
>  FmpDeviceGetAttributes (
> -  IN OUT UINT64  *Supported,
> -  IN OUT UINT64  *Setting
> +  OUT UINT64    *Supported,
> +  OUT UINT64    *Setting
>    )
>  {
>    if (Supported == NULL || Setting == NULL) {
> @@ -268,9 +268,9 @@ FmpDeviceGetVersion (
>          a copy currently stored firmware image.  This
> can be used to support
>          features such as recovery and rollback.
> 
> -  @param[out]    Image      Pointer to a caller
> allocated buffer where the
> +  @param[out]     Image     Pointer to a caller
> allocated buffer where the
>                              currently stored firmware
> image is copied to.
> -  @param[in out] ImageSize  Pointer the size, in
> bytes, of the Image buffer.
> +  @param[in, out] ImageSize Pointer the size, in
> bytes, of the Image buffer.
>                              On return, points to the
> size, in bytes, of firmware
>                              image currently stored in
> the firmware device.
> 
> @@ -294,8 +294,8 @@ FmpDeviceGetVersion (
>  EFI_STATUS
>  EFIAPI
>  FmpDeviceGetImage (
> -  IN OUT    VOID   *Image,
> -  IN IN OUT UINTN  *ImageSize
> +  OUT    VOID   *Image,
> +  IN OUT UINTN  *ImageSize
>    )
>  {
>    return EFI_UNSUPPORTED;
> @@ -320,9 +320,9 @@ FmpDeviceGetImage (
> 
>    @retval EFI_SUCCESS            The image was
> successfully checked.  Additional
>                                   status information is
> returned in
> -                                 ImageUpdateable.
> +                                 ImageUpdatable.
>    @retval EFI_INVALID_PARAMETER  Image is NULL.
> -  @retval EFI_INVALID_PARAMETER  ImageUpdateable is
> NULL.
> +  @retval EFI_INVALID_PARAMETER  ImageUpdatable is
> NULL.
> 
>  **/
>  EFI_STATUS
> @@ -330,7 +330,7 @@ EFIAPI
>  FmpDeviceCheckImage (
>    IN  CONST VOID  *Image,
>    IN  UINTN       ImageSize,
> -  OUT UINT32      *ImageUpdateable
> +  OUT UINT32      *ImageUpdatable
>    )
>  {
>    return EFI_SUCCESS;
> diff --git
> a/FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayload
> HeaderLib.c
> b/FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayload
> HeaderLib.c
> index 5f08e8b0fd15..b7cf044aa98d 100644
> ---
> a/FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayload
> HeaderLib.c
> +++
> b/FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayload
> HeaderLib.c
> @@ -1,4 +1,4 @@
> -/**  @file
> +/** @file
>    Provides services to retrieve values from Version 1
> of a capsule's FMP Payload
>    Header. The FMP Payload Header structure is not
> defined in the library class.
>    Instead, services are provided to retrieve
> information from the FMP Payload
> @@ -159,9 +159,9 @@ GetFmpPayloadHeaderVersion (
>  EFI_STATUS
>  EFIAPI
>  GetFmpPayloadHeaderLowestSupportedVersion (
> -  IN     CONST VOID   *Header,
> -  IN     CONST UINTN  FmpPayloadSize,
> -  IN OUT UINT32       *LowestSupportedVersion
> +  IN  CONST VOID    *Header,
> +  IN  CONST UINTN   FmpPayloadSize,
> +  OUT UINT32        *LowestSupportedVersion
>    )
>  {
>    FMP_PAYLOAD_HEADER  *FmpPayloadHeader;
> --
> 2.7.0.windows.1



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

end of thread, other threads:[~2018-07-31  2:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-30 10:01 [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg: Fix code style issue Star Zeng
2018-07-31  2:28 ` Kinney, Michael D

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