]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPE
authorRebecca Cran <rebecca@nuviainc.com>
Tue, 23 Feb 2021 04:53:53 +0000 (21:53 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 23 Feb 2021 12:37:51 +0000 (12:37 +0000)
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
ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c

index d1ac81f73d9f75260c6d333a0ceab96804aacd67..6dcc76a214df71aa08059da1ed4cc924b37e2bf3 100644 (file)
@@ -128,14 +128,12 @@ OemGetMaxProcessors (
 \r
 /** Gets the type of chassis for the system.\r
 \r
-  @param ChassisType The type of the chassis.\r
-\r
-  @retval EFI_SUCCESS The chassis type was fetched successfully.\r
+  @retval The type of the chassis.\r
 **/\r
-EFI_STATUS\r
+MISC_CHASSIS_TYPE\r
 EFIAPI\r
 OemGetChassisType (\r
-  OUT UINT8 *ChassisType\r
+  VOID\r
   );\r
 \r
 /** Returns whether the specified processor is present or not.\r
index 5153c9d7809c7019b27925ce824360e14155bf75..21f106f1e0607d23d40dd1d3aaf1e252ca8ccae6 100644 (file)
@@ -95,19 +95,16 @@ OemGetMaxProcessors (
 \r
 /** Gets the type of chassis for the system.\r
 \r
-  @param ChassisType The type of the chassis.\r
-\r
-  @retval EFI_SUCCESS The chassis type was fetched successfully.\r
+  @retval The type of the chassis.\r
 **/\r
-EFI_STATUS\r
+MISC_CHASSIS_TYPE\r
 EFIAPI\r
 OemGetChassisType (\r
-  UINT8 *ChassisType\r
+  VOID\r
   )\r
 {\r
   ASSERT (FALSE);\r
-  *ChassisType = MiscChassisTypeUnknown;\r
-  return EFI_SUCCESS;\r
+  return MiscChassisTypeUnknown;\r
 }\r
 \r
 /** Returns whether the specified processor is present or not.\r
index e6adbceba2d5c6b1bd773d75d9a87c8d02604f41..fc4dba319aad4071aa8cde3e552e11210d2a2bb7 100644 (file)
 \r
 #include "SmbiosMisc.h"\r
 \r
-/**\r
- * Returns the chassis type in SMBIOS format.\r
- *\r
- * @return Chassis type\r
-**/\r
-UINT8\r
-GetChassisType (\r
-  VOID\r
-  )\r
-{\r
-  EFI_STATUS                      Status;\r
-  UINT8                           ChassisType;\r
-\r
-  Status = OemGetChassisType (&ChassisType);\r
-  if (EFI_ERROR (Status)) {\r
-    return 0;\r
-  }\r
-\r
-  return ChassisType;\r
-}\r
-\r
 /**\r
   This function makes boot time changes to the contents of the\r
   MiscChassisManufacturer (Type 3) record.\r
@@ -80,8 +59,6 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer)
   CONTAINED_ELEMENT               ContainedElements;\r
   UINT8                           ExtendLength;\r
 \r
-  UINT8                           ChassisType;\r
-\r
   ExtendLength = 0;\r
 \r
   //\r
@@ -165,10 +142,7 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer)
 \r
   SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE3) + ExtendLength + 1;\r
 \r
-  ChassisType = GetChassisType ();\r
-  if (ChassisType != 0) {\r
-    SmbiosRecord->Type  = ChassisType;\r
-  }\r
+  SmbiosRecord->Type = OemGetChassisType ();\r
 \r
   //ContainedElements\r
   ASSERT (ContainedElementCount < 2);\r