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 <mjsbeaton@gmail.com>
This commit is contained in:
Mike Beaton 2025-11-25 20:57:32 +00:00 committed by mergify[bot]
parent 68d8f3a3d2
commit af9cc80359

View file

@ -36,26 +36,26 @@
**/
SMBIOS_MISC_TABLE_FUNCTION (MiscChassisManufacturer) {
CHAR8 *StrStart;
UINT8 *SkuNumberField;
UINTN RecordLength;
UINTN ManuStrLen;
UINTN VerStrLen;
UINTN AssertTagStrLen;
UINTN SerialNumStrLen;
UINTN ChaNumStrLen;
UINTN BaseSize;
UINTN ExtendLength;
UINTN HdrLength;
EFI_STRING Manufacturer;
EFI_STRING Version;
EFI_STRING SerialNumber;
EFI_STRING AssertTag;
EFI_STRING ChassisSkuNumber;
EFI_STRING_ID TokenToGet;
SMBIOS_TABLE_TYPE3 *SmbiosRecord;
SMBIOS_TABLE_TYPE3 *InputData;
EFI_STATUS Status;
CHAR8 *StrStart;
SMBIOS_TABLE_STRING *SkuNumberField;
UINTN RecordLength;
UINTN ManuStrLen;
UINTN VerStrLen;
UINTN AssertTagStrLen;
UINTN SerialNumStrLen;
UINTN ChaNumStrLen;
UINTN BaseSize;
UINTN ExtendLength;
UINTN HdrLength;
EFI_STRING Manufacturer;
EFI_STRING Version;
EFI_STRING SerialNumber;
EFI_STRING AssertTag;
EFI_STRING ChassisSkuNumber;
EFI_STRING_ID TokenToGet;
SMBIOS_TABLE_TYPE3 *SmbiosRecord;
SMBIOS_TABLE_TYPE3 *InputData;
EFI_STATUS Status;
//
// First check for invalid parameters.
@ -150,7 +150,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscChassisManufacturer) {
SmbiosRecord->Type = OemGetChassisType ();
// ChassisSkuNumber
SkuNumberField = (UINT8 *)SmbiosRecord + BaseSize + ExtendLength;
SkuNumberField = (SMBIOS_TABLE_STRING *)((UINT8 *)SmbiosRecord + BaseSize + ExtendLength);
// The string numbers in the fixed position portion of the record are populated in the input data.
*SkuNumberField = 5;