]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Vlv2TbltDevicePkg/MultiPlatformLib: Remove the unused variables
authorGary Lin <glin@suse.com>
Fri, 29 Jul 2016 03:25:22 +0000 (11:25 +0800)
committerdavid wei <david.wei@intel.com>
Wed, 3 Aug 2016 03:02:12 +0000 (11:02 +0800)
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>
Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c
Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatformLib.c

index 7d740df2fef97d69780fed33c9a767589f51d690..99d750a2a875df07fd2acb6173abecaa6533b5c5 100644 (file)
@@ -210,7 +210,6 @@ ReadClockGeneratorID (
   IN     UINT8                         ClockAddress\r
   )\r
 {\r
-  EFI_STATUS                    Status;\r
   EFI_SMBUS_DEVICE_ADDRESS      SlaveAddress;\r
   UINT8                         Buffer[MAX_CLOCK_GENERATOR_BUFFER_LENGTH];\r
   UINTN                         Length;\r
@@ -222,7 +221,7 @@ ReadClockGeneratorID (
   SlaveAddress.SmbusDeviceAddress = ClockAddress >> 1;\r
   Length = sizeof (Buffer);\r
   Command = 0;\r
-  Status = SmbusPpi->Execute (\r
+  SmbusPpi->Execute (\r
     PeiServices,\r
     SmbusPpi,\r
     SlaveAddress,\r
@@ -271,7 +270,6 @@ ConfigurePlatformClocks (
 \r
   EFI_PLATFORM_INFO_HOB         *PlatformInfoHob;\r
   BOOLEAN                       EnableSpreadSpectrum;\r
-  UINT8                         ClockGenID=0;\r
   SYSTEM_CONFIGURATION          SystemConfiguration;\r
 \r
   UINTN                         Length;\r
@@ -322,7 +320,6 @@ ConfigurePlatformClocks (
       DEBUG((EFI_D_ERROR, "Clock Generator CK505 Not Present, vendor ID on board is %x\n",(Data & 0x0F)));\r
       return EFI_SUCCESS;\r
 }\r
-  ClockGenID = Data & 0x0F;\r
 \r
   EnableSpreadSpectrum = FALSE;\r
   VariableSize = sizeof (SYSTEM_CONFIGURATION);\r
index d32deb5b6c18763d7fe2b3c9784ab45fff742302..dedcbe4d295cd93f4c09d541aae106e684ea2a0a 100644 (file)
@@ -34,8 +34,7 @@ MultiPlatformInfoInit (
   IN OUT EFI_PLATFORM_INFO_HOB          *PlatformInfoHob\r
   )\r
 {\r
-  UINT32                                PcieLength;\r
-  EFI_STATUS      Status;\r
+  UINT32 PcieLength;\r
 \r
 \r
   PlatformInfoHob->IohSku = MmPci16(0, MC_BUS, MC_DEV, MC_FUN, PCI_DEVICE_ID_OFFSET);\r
@@ -52,10 +51,10 @@ MultiPlatformInfoInit (
 \r
   PlatformInfoHob->IchRevision = PchLpcPciCfg8(PCI_REVISION_ID_OFFSET);\r
 \r
-       //\r
-    //64MB\r
-    //\r
-    PcieLength = 0x04000000;\r
+  //\r
+  //64MB\r
+  //\r
+  PcieLength = 0x04000000;\r
 \r
   //\r
   // Don't support BASE above 4GB currently.\r
@@ -95,28 +94,32 @@ MultiPlatformInfoInit (
   //\r
   PlatformInfoHob->SysData.SysIoApicEnable  = ICH_IOAPIC;\r
 \r
-   DEBUG ((EFI_D_ERROR,  "PlatformFlavor is %x (%x=tablet,%x=mobile,%x=desktop)\n", PlatformInfoHob->PlatformFlavor,FlavorTablet,FlavorMobile,FlavorDesktop));\r
+  DEBUG ((EFI_D_ERROR, "PlatformFlavor is %x (%x=tablet,%x=mobile,%x=desktop)\n",\r
+    PlatformInfoHob->PlatformFlavor,\r
+    FlavorTablet,\r
+    FlavorMobile,\r
+    FlavorDesktop));\r
 \r
-    //\r
-    // Get Platform Info and fill the Hob.\r
-    //\r
-    PlatformInfoHob->RevisonId = PLATFORM_INFO_HOB_REVISION;\r
+  //\r
+  // Get Platform Info and fill the Hob.\r
+  //\r
+  PlatformInfoHob->RevisonId = PLATFORM_INFO_HOB_REVISION;\r
 \r
-      //\r
-      // Get GPIO table\r
-      //\r
-      Status = MultiPlatformGpioTableInit (PeiServices, PlatformInfoHob);\r
+  //\r
+  // Get GPIO table\r
+  //\r
+  MultiPlatformGpioTableInit (PeiServices, PlatformInfoHob);\r
 \r
-      //\r
-      // Program GPIO\r
-      //\r
-      Status = MultiPlatformGpioProgram (PeiServices, PlatformInfoHob);\r
+  //\r
+  // Program GPIO\r
+  //\r
+  MultiPlatformGpioProgram (PeiServices, PlatformInfoHob);\r
 \r
-      //\r
-      // Update OemId\r
-      //\r
-      Status = InitializeBoardOemId (PeiServices, PlatformInfoHob);\r
-      Status = InitializeBoardSsidSvid (PeiServices, PlatformInfoHob);\r
+  //\r
+  // Update OemId\r
+  //\r
+  InitializeBoardOemId (PeiServices, PlatformInfoHob);\r
+  InitializeBoardSsidSvid (PeiServices, PlatformInfoHob);\r
 \r
-    return EFI_SUCCESS;\r
+  return EFI_SUCCESS;\r
 }\r