Vlv2TbltDevicePkg/PlatformSetupDxe: Remove the unused variables
Fix the following errors from gcc: Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c: In function ?PrepareSetupInformation?: Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:540:31: error: variable ?EeState? set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:532:31: error: variable ?SrcDataSize? set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c: In function ?UpdateAdditionalInformation?: Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:818:35: error: variable ?Size? set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:817:36: error: variable ?SystemManufacturer? set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c: In function ?JudgeHandleIsPCIDevice?: Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:1094:22: error: variable ?DevicePath? set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c: In function ?GetChipsetSataPortSpeed?: Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:1470:31: error: variable ?DwordReg? set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c:1469:31: error: variable ?Status? set but not used [-Werror=unused-but-set-variable] Cc: David Wei <david.wei@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com>
This commit is contained in:
@@ -520,7 +520,6 @@ PrepareSetupInformation (
|
|||||||
@retval EFI_STATUS
|
@retval EFI_STATUS
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
|
||||||
VOID
|
VOID
|
||||||
PrepareSetupInformation (
|
PrepareSetupInformation (
|
||||||
)
|
)
|
||||||
@@ -528,7 +527,6 @@ PrepareSetupInformation (
|
|||||||
|
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DATA_HUB_PROTOCOL *DataHub;
|
EFI_DATA_HUB_PROTOCOL *DataHub;
|
||||||
UINT8 *SrcData;
|
|
||||||
EFI_DATA_RECORD_HEADER *Record;
|
EFI_DATA_RECORD_HEADER *Record;
|
||||||
UINT8 *SrcData;
|
UINT8 *SrcData;
|
||||||
EFI_SUBCLASS_TYPE1_HEADER *DataHeader;
|
EFI_SUBCLASS_TYPE1_HEADER *DataHeader;
|
||||||
@@ -546,11 +544,6 @@ PrepareSetupInformation (
|
|||||||
UINT64 MonotonicCount;
|
UINT64 MonotonicCount;
|
||||||
|
|
||||||
CHAR16 Version[100]; //Assuming that strings are < 100 UCHAR
|
CHAR16 Version[100]; //Assuming that strings are < 100 UCHAR
|
||||||
CHAR16 ReleaseDate[100]; //Assuming that strings are < 100 UCHAR
|
|
||||||
CHAR16 ReleaseTime[100]; //Assuming that strings are < 100 UCHAR
|
|
||||||
|
|
||||||
NewString = AllocateZeroPool (0x100);
|
|
||||||
NewString2 = AllocateZeroPool (0x100);
|
|
||||||
CHAR16 ReleaseDate[100]; //Assuming that strings are < 100 UCHAR
|
CHAR16 ReleaseDate[100]; //Assuming that strings are < 100 UCHAR
|
||||||
CHAR16 ReleaseTime[100]; //Assuming that strings are < 100 UCHAR
|
CHAR16 ReleaseTime[100]; //Assuming that strings are < 100 UCHAR
|
||||||
|
|
||||||
@@ -569,7 +562,6 @@ PrepareSetupInformation (
|
|||||||
//
|
//
|
||||||
// Get all available data records from data hub
|
// Get all available data records from data hub
|
||||||
//
|
//
|
||||||
MonotonicCount = 0;
|
|
||||||
MonotonicCount = 0;
|
MonotonicCount = 0;
|
||||||
Record = NULL;
|
Record = NULL;
|
||||||
|
|
||||||
@@ -805,8 +797,6 @@ UpdateAdditionalInformation (
|
|||||||
@retval EFI_STATUS
|
@retval EFI_STATUS
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
|
||||||
UpdateAdditionalInformation (
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
UpdateAdditionalInformation (
|
UpdateAdditionalInformation (
|
||||||
)
|
)
|
||||||
@@ -816,6 +806,9 @@ UpdateAdditionalInformation (
|
|||||||
EFI_DATA_HUB_PROTOCOL *DataHub;
|
EFI_DATA_HUB_PROTOCOL *DataHub;
|
||||||
EFI_DATA_RECORD_HEADER *Record;
|
EFI_DATA_RECORD_HEADER *Record;
|
||||||
EFI_SUBCLASS_TYPE1_HEADER *DataHeader;
|
EFI_SUBCLASS_TYPE1_HEADER *DataHeader;
|
||||||
|
EFI_SMBIOS_PROTOCOL *Smbios;
|
||||||
|
EFI_SMBIOS_HANDLE SmbiosHandle;
|
||||||
|
EFI_SMBIOS_TABLE_HEADER *SmbiosRecord;
|
||||||
SMBIOS_TABLE_TYPE0 *Type0Record;
|
SMBIOS_TABLE_TYPE0 *Type0Record;
|
||||||
UINT8 StrIndex;
|
UINT8 StrIndex;
|
||||||
CHAR16 *BiosVersion = NULL;
|
CHAR16 *BiosVersion = NULL;
|
||||||
@@ -825,8 +818,6 @@ UpdateAdditionalInformation (
|
|||||||
#if defined( RVP_SUPPORT ) && RVP_SUPPORT
|
#if defined( RVP_SUPPORT ) && RVP_SUPPORT
|
||||||
EFI_MISC_SYSTEM_MANUFACTURER *SystemManufacturer;
|
EFI_MISC_SYSTEM_MANUFACTURER *SystemManufacturer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Status = gBS->LocateProtocol (
|
|
||||||
|
|
||||||
Status = gBS->LocateProtocol (
|
Status = gBS->LocateProtocol (
|
||||||
&gEfiDataHubProtocolGuid,
|
&gEfiDataHubProtocolGuid,
|
||||||
@@ -841,12 +832,12 @@ UpdateAdditionalInformation (
|
|||||||
do {
|
do {
|
||||||
Status = DataHub->GetNextRecord (
|
Status = DataHub->GetNextRecord (
|
||||||
DataHub,
|
DataHub,
|
||||||
|
&MonotonicCount,
|
||||||
NULL,
|
NULL,
|
||||||
&Record
|
&Record
|
||||||
);
|
);
|
||||||
if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) {
|
if (Record->DataRecordClass == EFI_DATA_RECORD_CLASS_DATA) {
|
||||||
DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1);
|
DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1);
|
||||||
DataHeader = (EFI_SUBCLASS_TYPE1_HEADER *)(Record + 1);
|
|
||||||
|
|
||||||
if (CompareGuid(&Record->DataRecordGuid, &gEfiMiscSubClassGuid) &&
|
if (CompareGuid(&Record->DataRecordGuid, &gEfiMiscSubClassGuid) &&
|
||||||
(DataHeader->RecordType == EFI_MISC_SYSTEM_MANUFACTURER_RECORD_NUMBER)) {
|
(DataHeader->RecordType == EFI_MISC_SYSTEM_MANUFACTURER_RECORD_NUMBER)) {
|
||||||
@@ -1082,7 +1073,6 @@ JudgeHandleIsPCIDevice(
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
JudgeHandleIsPCIDevice(
|
JudgeHandleIsPCIDevice(
|
||||||
EFI_HANDLE Handle,
|
EFI_HANDLE Handle,
|
||||||
@@ -1091,7 +1081,6 @@ JudgeHandleIsPCIDevice(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DEVICE_PATH *DevicePath;
|
|
||||||
EFI_DEVICE_PATH *DPath;
|
EFI_DEVICE_PATH *DPath;
|
||||||
|
|
||||||
Status = gBS->HandleProtocol (
|
Status = gBS->HandleProtocol (
|
||||||
@@ -1457,9 +1446,6 @@ GetChipsetSataPortSpeed (
|
|||||||
}
|
}
|
||||||
|
|
||||||
UINT8
|
UINT8
|
||||||
GetChipsetSataPortSpeed (
|
|
||||||
UINTN PortNum
|
|
||||||
)
|
|
||||||
GetChipsetSataPortSpeed (
|
GetChipsetSataPortSpeed (
|
||||||
UINTN PortNum
|
UINTN PortNum
|
||||||
)
|
)
|
||||||
@@ -1469,15 +1455,15 @@ GetChipsetSataPortSpeed (
|
|||||||
UINT32 IdeAhciBar;
|
UINT32 IdeAhciBar;
|
||||||
EFI_PHYSICAL_ADDRESS MemBaseAddress = 0;
|
EFI_PHYSICAL_ADDRESS MemBaseAddress = 0;
|
||||||
UINT8 FunNum;
|
UINT8 FunNum;
|
||||||
|
|
||||||
DeviceSpeed = 0x01; // generation 1
|
DeviceSpeed = 0x01; // generation 1
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate the AHCI BAR
|
// Allocate the AHCI BAR
|
||||||
//
|
//
|
||||||
FunNum = PCI_FUNCTION_NUMBER_PCH_SATA;
|
FunNum = PCI_FUNCTION_NUMBER_PCH_SATA;
|
||||||
MemBaseAddress = 0x0ffffffff;
|
MemBaseAddress = 0x0ffffffff;
|
||||||
gDS->AllocateMemorySpace (
|
gDS->AllocateMemorySpace (
|
||||||
EfiGcdAllocateMaxAddressSearchBottomUp,
|
EfiGcdAllocateMaxAddressSearchBottomUp,
|
||||||
EfiGcdMemoryTypeMemoryMappedIo,
|
EfiGcdMemoryTypeMemoryMappedIo,
|
||||||
@@ -1507,7 +1493,6 @@ GetChipsetSataPortSpeed (
|
|||||||
);
|
);
|
||||||
MmioOr16 (
|
MmioOr16 (
|
||||||
MmPciAddress (0, 0, PCI_DEVICE_NUMBER_PCH_SATA, FunNum, R_PCH_SATA_COMMAND),
|
MmPciAddress (0, 0, PCI_DEVICE_NUMBER_PCH_SATA, FunNum, R_PCH_SATA_COMMAND),
|
||||||
B_PCH_SATA_COMMAND_MSE
|
|
||||||
B_PCH_SATA_COMMAND_MSE
|
B_PCH_SATA_COMMAND_MSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user