mirror of https://github.com/acidanthera/audk.git
Vlv2TbltDevicePkg/MultiPlatformLib: Remove the unused variables
Fix the following errors from gcc: Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatformLib.c: In function ?MultiPlatformInfoInit?: Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatformLib.c:47:14: error: variable ?Status? set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c: In function ?ReadClockGeneratorID?: Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c:222:33: error: variable ?Status? set but not used [-Werror=unused-but-set-variable] Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c: In function ?ConfigurePlatformClocks?: Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c:283:33: error: variable ?ClockGenID? set but not used [-Werror=unused-but-set-variable] Also fix the coding style of MultiPlatformInfoInit() Cc: David Wei <david.wei@intel.com> Cc: "Wu, Hao A" <hao.a.wu@intel.com> Cc: "Lu, ShifeiX A" <shifeix.a.lu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: David Wei <david.wei@intel.com>
This commit is contained in:
parent
9e9d992310
commit
b3a4a852ed
|
@ -210,7 +210,6 @@ ReadClockGeneratorID (
|
||||||
IN UINT8 ClockAddress
|
IN UINT8 ClockAddress
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
|
||||||
EFI_SMBUS_DEVICE_ADDRESS SlaveAddress;
|
EFI_SMBUS_DEVICE_ADDRESS SlaveAddress;
|
||||||
UINT8 Buffer[MAX_CLOCK_GENERATOR_BUFFER_LENGTH];
|
UINT8 Buffer[MAX_CLOCK_GENERATOR_BUFFER_LENGTH];
|
||||||
UINTN Length;
|
UINTN Length;
|
||||||
|
@ -222,7 +221,7 @@ ReadClockGeneratorID (
|
||||||
SlaveAddress.SmbusDeviceAddress = ClockAddress >> 1;
|
SlaveAddress.SmbusDeviceAddress = ClockAddress >> 1;
|
||||||
Length = sizeof (Buffer);
|
Length = sizeof (Buffer);
|
||||||
Command = 0;
|
Command = 0;
|
||||||
Status = SmbusPpi->Execute (
|
SmbusPpi->Execute (
|
||||||
PeiServices,
|
PeiServices,
|
||||||
SmbusPpi,
|
SmbusPpi,
|
||||||
SlaveAddress,
|
SlaveAddress,
|
||||||
|
@ -271,7 +270,6 @@ ConfigurePlatformClocks (
|
||||||
|
|
||||||
EFI_PLATFORM_INFO_HOB *PlatformInfoHob;
|
EFI_PLATFORM_INFO_HOB *PlatformInfoHob;
|
||||||
BOOLEAN EnableSpreadSpectrum;
|
BOOLEAN EnableSpreadSpectrum;
|
||||||
UINT8 ClockGenID=0;
|
|
||||||
SYSTEM_CONFIGURATION SystemConfiguration;
|
SYSTEM_CONFIGURATION SystemConfiguration;
|
||||||
|
|
||||||
UINTN Length;
|
UINTN Length;
|
||||||
|
@ -322,7 +320,6 @@ ConfigurePlatformClocks (
|
||||||
DEBUG((EFI_D_ERROR, "Clock Generator CK505 Not Present, vendor ID on board is %x\n",(Data & 0x0F)));
|
DEBUG((EFI_D_ERROR, "Clock Generator CK505 Not Present, vendor ID on board is %x\n",(Data & 0x0F)));
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
ClockGenID = Data & 0x0F;
|
|
||||||
|
|
||||||
EnableSpreadSpectrum = FALSE;
|
EnableSpreadSpectrum = FALSE;
|
||||||
VariableSize = sizeof (SYSTEM_CONFIGURATION);
|
VariableSize = sizeof (SYSTEM_CONFIGURATION);
|
||||||
|
|
|
@ -34,8 +34,7 @@ MultiPlatformInfoInit (
|
||||||
IN OUT EFI_PLATFORM_INFO_HOB *PlatformInfoHob
|
IN OUT EFI_PLATFORM_INFO_HOB *PlatformInfoHob
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINT32 PcieLength;
|
UINT32 PcieLength;
|
||||||
EFI_STATUS Status;
|
|
||||||
|
|
||||||
|
|
||||||
PlatformInfoHob->IohSku = MmPci16(0, MC_BUS, MC_DEV, MC_FUN, PCI_DEVICE_ID_OFFSET);
|
PlatformInfoHob->IohSku = MmPci16(0, MC_BUS, MC_DEV, MC_FUN, PCI_DEVICE_ID_OFFSET);
|
||||||
|
@ -52,10 +51,10 @@ MultiPlatformInfoInit (
|
||||||
|
|
||||||
PlatformInfoHob->IchRevision = PchLpcPciCfg8(PCI_REVISION_ID_OFFSET);
|
PlatformInfoHob->IchRevision = PchLpcPciCfg8(PCI_REVISION_ID_OFFSET);
|
||||||
|
|
||||||
//
|
//
|
||||||
//64MB
|
//64MB
|
||||||
//
|
//
|
||||||
PcieLength = 0x04000000;
|
PcieLength = 0x04000000;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Don't support BASE above 4GB currently.
|
// Don't support BASE above 4GB currently.
|
||||||
|
@ -95,28 +94,32 @@ MultiPlatformInfoInit (
|
||||||
//
|
//
|
||||||
PlatformInfoHob->SysData.SysIoApicEnable = ICH_IOAPIC;
|
PlatformInfoHob->SysData.SysIoApicEnable = ICH_IOAPIC;
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "PlatformFlavor is %x (%x=tablet,%x=mobile,%x=desktop)\n", PlatformInfoHob->PlatformFlavor,FlavorTablet,FlavorMobile,FlavorDesktop));
|
DEBUG ((EFI_D_ERROR, "PlatformFlavor is %x (%x=tablet,%x=mobile,%x=desktop)\n",
|
||||||
|
PlatformInfoHob->PlatformFlavor,
|
||||||
|
FlavorTablet,
|
||||||
|
FlavorMobile,
|
||||||
|
FlavorDesktop));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get Platform Info and fill the Hob.
|
// Get Platform Info and fill the Hob.
|
||||||
//
|
//
|
||||||
PlatformInfoHob->RevisonId = PLATFORM_INFO_HOB_REVISION;
|
PlatformInfoHob->RevisonId = PLATFORM_INFO_HOB_REVISION;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get GPIO table
|
// Get GPIO table
|
||||||
//
|
//
|
||||||
Status = MultiPlatformGpioTableInit (PeiServices, PlatformInfoHob);
|
MultiPlatformGpioTableInit (PeiServices, PlatformInfoHob);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Program GPIO
|
// Program GPIO
|
||||||
//
|
//
|
||||||
Status = MultiPlatformGpioProgram (PeiServices, PlatformInfoHob);
|
MultiPlatformGpioProgram (PeiServices, PlatformInfoHob);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update OemId
|
// Update OemId
|
||||||
//
|
//
|
||||||
Status = InitializeBoardOemId (PeiServices, PlatformInfoHob);
|
InitializeBoardOemId (PeiServices, PlatformInfoHob);
|
||||||
Status = InitializeBoardSsidSvid (PeiServices, PlatformInfoHob);
|
InitializeBoardSsidSvid (PeiServices, PlatformInfoHob);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue