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:
@@ -210,7 +210,6 @@ ReadClockGeneratorID (
|
|||||||
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS Operation success.
|
@retval EFI_SUCCESS Operation success.
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
UINT8
|
UINT8
|
||||||
@@ -222,7 +221,7 @@ ReadClockGeneratorID (
|
|||||||
{
|
{
|
||||||
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;
|
||||||
EFI_SMBUS_DEVICE_COMMAND Command;
|
EFI_SMBUS_DEVICE_COMMAND Command;
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -271,7 +270,6 @@ ConfigurePlatformClocks (
|
|||||||
// Not supported by Hybrid model.
|
// Not supported by Hybrid model.
|
||||||
//
|
//
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINT8 *ConfigurationTable;
|
|
||||||
UINT8 *ConfigurationTable;
|
UINT8 *ConfigurationTable;
|
||||||
|
|
||||||
CLOCK_GENERATOR_TYPE ClockType = ClockGeneratorCk505;
|
CLOCK_GENERATOR_TYPE ClockType = ClockGeneratorCk505;
|
||||||
@@ -322,7 +320,6 @@ ConfigurePlatformClocks (
|
|||||||
SlaveAddress,
|
SlaveAddress,
|
||||||
Command,
|
Command,
|
||||||
EfiSmbusReadByte,
|
EfiSmbusReadByte,
|
||||||
FALSE,
|
|
||||||
FALSE,
|
FALSE,
|
||||||
&Length,
|
&Length,
|
||||||
&Data
|
&Data
|
||||||
|
@@ -34,8 +34,7 @@ MultiPlatformInfoInit (
|
|||||||
@param PeiServices General purpose services available to every PEIM.
|
@param PeiServices General purpose services available to every PEIM.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Memory initialization completed successfully.
|
@retval EFI_SUCCESS Memory initialization completed successfully.
|
||||||
@retval Others All other error conditions encountered result in an ASSERT.
|
@retval Others All other error conditions encountered result in an ASSERT.
|
||||||
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -52,10 +51,10 @@ MultiPlatformInfoInit (
|
|||||||
PlatformInfoHob->IohRevision = MmPci8(0, MC_BUS, MC_DEV, MC_FUN, PCI_REVISION_ID_OFFSET);
|
PlatformInfoHob->IohRevision = MmPci8(0, MC_BUS, MC_DEV, MC_FUN, PCI_REVISION_ID_OFFSET);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update ICH Type
|
// Update ICH Type
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Device ID
|
// Device ID
|
||||||
//
|
//
|
||||||
PlatformInfoHob->IchSku = PchLpcPciCfg16(PCI_DEVICE_ID_OFFSET);
|
PlatformInfoHob->IchSku = PchLpcPciCfg16(PCI_DEVICE_ID_OFFSET);
|
||||||
|
|
||||||
@@ -95,28 +94,32 @@ MultiPlatformInfoInit (
|
|||||||
PlatformInfoHob->MemData.MemTolm = PlatformInfoHob->MemData.MemMaxTolm;
|
PlatformInfoHob->MemData.MemTolm = PlatformInfoHob->MemData.MemMaxTolm;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Platform PCI MMIO Size in unit of 1MB.
|
// Platform PCI MMIO Size in unit of 1MB.
|
||||||
|
//
|
||||||
|
PlatformInfoHob->MemData.MmioSize = 0x1000 - (UINT16)(PlatformInfoHob->MemData.MemMaxTolm >> 20);
|
||||||
|
|
||||||
|
//
|
||||||
// Enable ICH IOAPIC
|
// Enable ICH IOAPIC
|
||||||
PlatformInfoHob->MemData.MmioSize = 0x1000 - (UINT16)(PlatformInfoHob->MemData.MemMaxTolm >> 20);
|
//
|
||||||
|
PlatformInfoHob->SysData.SysIoApicEnable = ICH_IOAPIC;
|
||||||
//
|
|
||||||
// Enable ICH IOAPIC
|
DEBUG ((EFI_D_ERROR, "PlatformFlavor is %x (%x=tablet,%x=mobile,%x=desktop)\n",
|
||||||
PlatformInfoHob->PlatformFlavor,
|
PlatformInfoHob->PlatformFlavor,
|
||||||
PlatformInfoHob->SysData.SysIoApicEnable = ICH_IOAPIC;
|
FlavorTablet,
|
||||||
|
FlavorMobile,
|
||||||
DEBUG ((EFI_D_ERROR, "PlatformFlavor is %x (%x=tablet,%x=mobile,%x=desktop)\n", PlatformInfoHob->PlatformFlavor,FlavorTablet,FlavorMobile,FlavorDesktop));
|
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
|
||||||
//
|
//
|
||||||
MultiPlatformGpioProgram (PeiServices, PlatformInfoHob);
|
MultiPlatformGpioProgram (PeiServices, PlatformInfoHob);
|
||||||
|
Reference in New Issue
Block a user