From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.nue.novell.com (smtp.nue.novell.com [195.135.221.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E717D1A1E2C for ; Thu, 28 Jul 2016 20:26:01 -0700 (PDT) Received: from GaryWorkstation.apac.novell.com (ip-203-192-156-9.asianetcom.net [203.192.156.9]) by smtp.nue.novell.com with ESMTP (NOT encrypted); Fri, 29 Jul 2016 05:25:57 +0200 From: Gary Lin To: edk2-devel@lists.01.org Cc: David Wei , "Wu, Hao A" , "Lu, ShifeiX A" Date: Fri, 29 Jul 2016 11:25:22 +0800 Message-Id: <20160729032538.17730-4-glin@suse.com> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160729032538.17730-1-glin@suse.com> References: <20160729032538.17730-1-glin@suse.com> MIME-Version: 1.0 Subject: [PATCH v2 03/19] Vlv2TbltDevicePkg/MultiPlatformLib: Remove the unused variables X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 03:26:02 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: "Wu, Hao A" Cc: "Lu, ShifeiX A" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin Reviewed-by: David Wei --- .../MultiPlatformLib/BoardClkGens/BoardClkGens.c | 5 +- .../Library/MultiPlatformLib/MultiPlatformLib.c | 53 ++++++++++++---------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c index 6d3bd77..000c864 100644 --- a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c +++ b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c @@ -210,7 +210,6 @@ ReadClockGeneratorID ( IN UINT8 ClockAddress ) { - EFI_STATUS Status; EFI_SMBUS_DEVICE_ADDRESS SlaveAddress; UINT8 Buffer[MAX_CLOCK_GENERATOR_BUFFER_LENGTH]; UINTN Length; @@ -222,7 +221,7 @@ ReadClockGeneratorID ( SlaveAddress.SmbusDeviceAddress = ClockAddress >> 1; Length = sizeof (Buffer); Command = 0; - Status = SmbusPpi->Execute ( + SmbusPpi->Execute ( PeiServices, SmbusPpi, SlaveAddress, @@ -271,7 +270,6 @@ ConfigurePlatformClocks ( EFI_PLATFORM_INFO_HOB *PlatformInfoHob; BOOLEAN EnableSpreadSpectrum; - UINT8 ClockGenID=0; SYSTEM_CONFIGURATION SystemConfiguration; UINTN Length; @@ -324,7 +322,6 @@ ConfigurePlatformClocks ( DEBUG((EFI_D_ERROR, "Clock Generator CK505 Not Present, vendor ID on board is %x\n",(Data & 0x0F))); return EFI_SUCCESS; } - ClockGenID = Data & 0x0F; EnableSpreadSpectrum = FALSE; VariableSize = sizeof (SYSTEM_CONFIGURATION); diff --git a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatformLib.c b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatformLib.c index d32deb5..dedcbe4 100644 --- a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatformLib.c +++ b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/MultiPlatformLib.c @@ -34,8 +34,7 @@ MultiPlatformInfoInit ( IN OUT EFI_PLATFORM_INFO_HOB *PlatformInfoHob ) { - UINT32 PcieLength; - EFI_STATUS Status; + UINT32 PcieLength; 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); - // - //64MB - // - PcieLength = 0x04000000; + // + //64MB + // + PcieLength = 0x04000000; // // Don't support BASE above 4GB currently. @@ -95,28 +94,32 @@ MultiPlatformInfoInit ( // 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. - // - PlatformInfoHob->RevisonId = PLATFORM_INFO_HOB_REVISION; + // + // Get Platform Info and fill the Hob. + // + PlatformInfoHob->RevisonId = PLATFORM_INFO_HOB_REVISION; - // - // Get GPIO table - // - Status = MultiPlatformGpioTableInit (PeiServices, PlatformInfoHob); + // + // Get GPIO table + // + MultiPlatformGpioTableInit (PeiServices, PlatformInfoHob); - // - // Program GPIO - // - Status = MultiPlatformGpioProgram (PeiServices, PlatformInfoHob); + // + // Program GPIO + // + MultiPlatformGpioProgram (PeiServices, PlatformInfoHob); - // - // Update OemId - // - Status = InitializeBoardOemId (PeiServices, PlatformInfoHob); - Status = InitializeBoardSsidSvid (PeiServices, PlatformInfoHob); + // + // Update OemId + // + InitializeBoardOemId (PeiServices, PlatformInfoHob); + InitializeBoardSsidSvid (PeiServices, PlatformInfoHob); - return EFI_SUCCESS; + return EFI_SUCCESS; } -- 2.9.2