Skip to content

Commit af9cc80

Browse files
mikebeatonmergify[bot]
authored andcommitted
ArmPkg: Update type for SkuNumberField in MiscChassisManufacturerFunction
SMBIOS_TABLE_STRING is the correct type for the field, even though that is itself defined as UINT8. There are five strings handled by this function. Their string numbers are stored in the five SMBIOS_TABLE_STRING values in the SMBIOS_TABLE_TYPE3 struct. Four of these are defined, with that type, in the fixed-position portion of the struct, before ContainedElements, and the fifth is the field which this pointer references (as can be discovered from the comments on the SMBIOS_TABLE_TYPE3, as well as the usage of this value). This is clearer when reading the code when the correct type is used. Signed-off-by: Mike Beaton <[email protected]>
1 parent 68d8f3a commit af9cc80

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFunction.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,26 @@
3636
3737
**/
3838
SMBIOS_MISC_TABLE_FUNCTION (MiscChassisManufacturer) {
39-
CHAR8 *StrStart;
40-
UINT8 *SkuNumberField;
41-
UINTN RecordLength;
42-
UINTN ManuStrLen;
43-
UINTN VerStrLen;
44-
UINTN AssertTagStrLen;
45-
UINTN SerialNumStrLen;
46-
UINTN ChaNumStrLen;
47-
UINTN BaseSize;
48-
UINTN ExtendLength;
49-
UINTN HdrLength;
50-
EFI_STRING Manufacturer;
51-
EFI_STRING Version;
52-
EFI_STRING SerialNumber;
53-
EFI_STRING AssertTag;
54-
EFI_STRING ChassisSkuNumber;
55-
EFI_STRING_ID TokenToGet;
56-
SMBIOS_TABLE_TYPE3 *SmbiosRecord;
57-
SMBIOS_TABLE_TYPE3 *InputData;
58-
EFI_STATUS Status;
39+
CHAR8 *StrStart;
40+
SMBIOS_TABLE_STRING *SkuNumberField;
41+
UINTN RecordLength;
42+
UINTN ManuStrLen;
43+
UINTN VerStrLen;
44+
UINTN AssertTagStrLen;
45+
UINTN SerialNumStrLen;
46+
UINTN ChaNumStrLen;
47+
UINTN BaseSize;
48+
UINTN ExtendLength;
49+
UINTN HdrLength;
50+
EFI_STRING Manufacturer;
51+
EFI_STRING Version;
52+
EFI_STRING SerialNumber;
53+
EFI_STRING AssertTag;
54+
EFI_STRING ChassisSkuNumber;
55+
EFI_STRING_ID TokenToGet;
56+
SMBIOS_TABLE_TYPE3 *SmbiosRecord;
57+
SMBIOS_TABLE_TYPE3 *InputData;
58+
EFI_STATUS Status;
5959

6060
//
6161
// First check for invalid parameters.
@@ -150,7 +150,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscChassisManufacturer) {
150150
SmbiosRecord->Type = OemGetChassisType ();
151151

152152
// ChassisSkuNumber
153-
SkuNumberField = (UINT8 *)SmbiosRecord + BaseSize + ExtendLength;
153+
SkuNumberField = (SMBIOS_TABLE_STRING *)((UINT8 *)SmbiosRecord + BaseSize + ExtendLength);
154154

155155
// The string numbers in the fixed position portion of the record are populated in the input data.
156156
*SkuNumberField = 5;

0 commit comments

Comments
 (0)