[edk2-devel] [PATCH v2 3/3] ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPE

Rebecca Cran posted 3 patches 4 years, 11 months ago
There is a newer version of this series
[edk2-devel] [PATCH v2 3/3] ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPE
Posted by Rebecca Cran 4 years, 11 months ago
Update OemGetChassisType in OemMiscLib to return MISC_CHASSIS_TYPE
instead of EFI_STATUS, which matches other OemMiscLib functions.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
---
 ArmPkg/Include/Library/OemMiscLib.h                 |  8 +++-----
 ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c | 11 ++++-------
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/OemMiscLib.h
index 31dfe7dac2a6..5f71b2ad48c7 100644
--- a/ArmPkg/Include/Library/OemMiscLib.h
+++ b/ArmPkg/Include/Library/OemMiscLib.h
@@ -128,14 +128,12 @@ OemGetMaxProcessors (
 
 /** Gets the type of chassis for the system.
 
-  @param ChassisType The type of the chassis.
-
-  @retval EFI_SUCCESS The chassis type was fetched successfully.
+  @retval The type of the chassis.
 **/
-EFI_STATUS
+MISC_CHASSIS_TYPE
 EFIAPI
 OemGetChassisType (
-  OUT UINT8 *ChassisType
+  VOID
   );
 
 /** Returns whether the specified processor is present or not.
diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
index b02a568426dd..6b233742feb0 100644
--- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
+++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
@@ -95,19 +95,16 @@ OemGetMaxProcessors (
 
 /** Gets the type of chassis for the system.
 
-  @param ChassisType The type of the chassis.
-
-  @retval EFI_SUCCESS The chassis type was fetched successfully.
+  @retval The type of the chassis.
 **/
-EFI_STATUS
+MISC_CHASSIS_TYPE
 EFIAPI
 OemGetChassisType (
-  UINT8 *ChassisType
+  VOID
   )
 {
   ASSERT (FALSE);
-  *ChassisType = MiscChassisTypeUnknown;
-  return EFI_SUCCESS;
+  return MiscChassisTypeUnknown;
 }
 
 /** Returns whether the specified processor is present or not.
-- 
2.26.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#71890): https://edk2.groups.io/g/devel/message/71890
Mute This Topic: https://groups.io/mt/80794230/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH v2 3/3] ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPE
Posted by Leif Lindholm 4 years, 11 months ago
On Sat, Feb 20, 2021 at 20:29:00 -0700, Rebecca Cran wrote:
> Update OemGetChassisType in OemMiscLib to return MISC_CHASSIS_TYPE
> instead of EFI_STATUS, which matches other OemMiscLib functions.
> 
> Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>

Reviewed-by: Leif Lindholm <leif@nuviainc.com>

> ---
>  ArmPkg/Include/Library/OemMiscLib.h                 |  8 +++-----
>  ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c | 11 ++++-------
>  2 files changed, 7 insertions(+), 12 deletions(-)
> 
> diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/OemMiscLib.h
> index 31dfe7dac2a6..5f71b2ad48c7 100644
> --- a/ArmPkg/Include/Library/OemMiscLib.h
> +++ b/ArmPkg/Include/Library/OemMiscLib.h
> @@ -128,14 +128,12 @@ OemGetMaxProcessors (
>  
>  /** Gets the type of chassis for the system.
>  
> -  @param ChassisType The type of the chassis.
> -
> -  @retval EFI_SUCCESS The chassis type was fetched successfully.
> +  @retval The type of the chassis.
>  **/
> -EFI_STATUS
> +MISC_CHASSIS_TYPE
>  EFIAPI
>  OemGetChassisType (
> -  OUT UINT8 *ChassisType
> +  VOID
>    );
>  
>  /** Returns whether the specified processor is present or not.
> diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
> index b02a568426dd..6b233742feb0 100644
> --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
> +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
> @@ -95,19 +95,16 @@ OemGetMaxProcessors (
>  
>  /** Gets the type of chassis for the system.
>  
> -  @param ChassisType The type of the chassis.
> -
> -  @retval EFI_SUCCESS The chassis type was fetched successfully.
> +  @retval The type of the chassis.
>  **/
> -EFI_STATUS
> +MISC_CHASSIS_TYPE
>  EFIAPI
>  OemGetChassisType (
> -  UINT8 *ChassisType
> +  VOID
>    )
>  {
>    ASSERT (FALSE);
> -  *ChassisType = MiscChassisTypeUnknown;
> -  return EFI_SUCCESS;
> +  return MiscChassisTypeUnknown;
>  }
>  
>  /** Returns whether the specified processor is present or not.
> -- 
> 2.26.2
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#71901): https://edk2.groups.io/g/devel/message/71901
Mute This Topic: https://groups.io/mt/80794230/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-