amd/cimx/sb800: Fix building with clang

These are all set but unused variable problems.

Change-Id: I40aaa1d1cdd90731a23142f1f7a0f67a45915f25
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63046
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Arthur Heymans
2022-03-23 21:46:17 +01:00
committed by Felix Held
parent 3ba6f8cdf8
commit 2fe012633a
9 changed files with 7 additions and 39 deletions

View File

@@ -101,8 +101,6 @@ SbReset (
IN UINT8 OpFlag IN UINT8 OpFlag
) )
{ {
UINT8 Temp;
Temp = OpFlag;
RWIO (0xcf9, AccWidthUint8, 0x0, 0x06); RWIO (0xcf9, AccWidthUint8, 0x0, 0x06);
} }

View File

@@ -270,13 +270,11 @@ azaliaInitAfterPciEnum (
UINT8 dbTempVariable; UINT8 dbTempVariable;
UINT16 dwTempVariable; UINT16 dwTempVariable;
UINT32 ddBAR0; UINT32 ddBAR0;
UINT32 ddTempVariable;
dbEnableAzalia = 0; dbEnableAzalia = 0;
dbChannelNum = 0; dbChannelNum = 0;
dbTempVariable = 0; dbTempVariable = 0;
dwTempVariable = 0; dwTempVariable = 0;
ddBAR0 = 0; ddBAR0 = 0;
ddTempVariable = 0;
if ( pConfig->AzaliaController == 1 ) { if ( pConfig->AzaliaController == 1 ) {
return; return;
@@ -509,4 +507,3 @@ configureAzaliaSetConfigD4Dword (
++tempAzaliaCodecEntryPtr; ++tempAzaliaCodecEntryPtr;
} }
} }

View File

@@ -88,9 +88,6 @@ AmdSbDispatcher (
{ {
AGESA_STATUS Status; AGESA_STATUS Status;
UINT64 tdValue;
tdValue = 0x32314130384253ULL;
Status = AGESA_UNSUPPORTED; Status = AGESA_UNSUPPORTED;
saveConfigPointer (pConfig); saveConfigPointer (pConfig);

View File

@@ -109,8 +109,8 @@ ecInitBeforePciEnum (
IN AMDSBCFG* pConfig IN AMDSBCFG* pConfig
) )
{ {
AMDSBCFG* pTmp; // dummy code /* AMDSBCFG* pTmp; // dummy code */
pTmp = pConfig; /* pTmp = pConfig; */
} }
/** /**
@@ -125,7 +125,7 @@ ecInitLatePost (
IN AMDSBCFG* pConfig IN AMDSBCFG* pConfig
) )
{ {
AMDSBCFG* pTmp; // dummy code /* AMDSBCFG* pTmp; // dummy code */
pTmp = pConfig; /* pTmp = pConfig; */
} }
#endif #endif

View File

@@ -137,9 +137,7 @@ gecInitLatePost (
IN AMDSBCFG* pConfig IN AMDSBCFG* pConfig
) )
{ {
if ( !pConfig->GecConfig == 0) { /* if ( !pConfig->GecConfig == 0) { */
return; //return if GEC controller is disabled. /* return; //return if GEC controller is disabled. */
/* } */
} }
}

View File

@@ -330,14 +330,11 @@ commonInitEarlyBoot (
UINT32 abValue; UINT32 abValue;
UINT16 dwTempVar; UINT16 dwTempVar;
CPUID_DATA CpuId; CPUID_DATA CpuId;
UINT8 cimNativepciesupport;
UINT8 cimIrConfig; UINT8 cimIrConfig;
UINT8 Data; UINT8 Data;
cimNativepciesupport = (UINT8) pConfig->NativePcieSupport;
cimIrConfig = (UINT8) pConfig->IrConfig; cimIrConfig = (UINT8) pConfig->IrConfig;
#if SB_CIMx_PARAMETER == 0 #if SB_CIMx_PARAMETER == 0
cimNativepciesupport = cimNativepciesupportDefault;
cimIrConfig = cimIrConfigDefault; cimIrConfig = cimIrConfigDefault;
#endif #endif
@@ -518,8 +515,6 @@ commonInitEarlyPost (
UINT8 dbPortStatus; UINT8 dbPortStatus;
UINT8 cimSpreadSpectrum; UINT8 cimSpreadSpectrum;
UINT32 cimSpreadSpectrumType; UINT32 cimSpreadSpectrumType;
AMDSBCFG* pTmp;
pTmp = pConfig;
cimSpreadSpectrum = pConfig->SpreadSpectrum; cimSpreadSpectrum = pConfig->SpreadSpectrum;
cimSpreadSpectrumType = pConfig->BuildParameters.SpreadSpectrumType; cimSpreadSpectrumType = pConfig->BuildParameters.SpreadSpectrumType;
@@ -606,13 +601,11 @@ abLinkInitBeforePciEnum (
{ {
UINT32 cimResetCpuOnSyncFlood; UINT32 cimResetCpuOnSyncFlood;
ABTBLENTRY *pAbTblPtr; ABTBLENTRY *pAbTblPtr;
AMDSBCFG* Temp;
cimResetCpuOnSyncFlood = pConfig->ResetCpuOnSyncFlood; cimResetCpuOnSyncFlood = pConfig->ResetCpuOnSyncFlood;
#if SB_CIMx_PARAMETER == 0 #if SB_CIMx_PARAMETER == 0
cimResetCpuOnSyncFlood = cimResetCpuOnSyncFloodDefault; cimResetCpuOnSyncFlood = cimResetCpuOnSyncFloodDefault;
#endif #endif
Temp = pConfig;
if ( pConfig->SbPcieOrderRule ) { if ( pConfig->SbPcieOrderRule ) {
pAbTblPtr = (ABTBLENTRY *) FIXUP_PTR (&SbPcieOrderRule[0]); pAbTblPtr = (ABTBLENTRY *) FIXUP_PTR (&SbPcieOrderRule[0]);
abcfgTbl (pAbTblPtr); abcfgTbl (pAbTblPtr);
@@ -800,9 +793,7 @@ c3PopupSetting (
IN AMDSBCFG* pConfig IN AMDSBCFG* pConfig
) )
{ {
AMDSBCFG* Temp;
UINT8 dbValue; UINT8 dbValue;
Temp = pConfig;
//RPR C-State and VID/FID Change //RPR C-State and VID/FID Change
dbValue = getNumberOfCpuCores (); dbValue = getNumberOfCpuCores ();
if (dbValue > 1) { if (dbValue > 1) {

View File

@@ -218,8 +218,6 @@ sbSmmAcpiOn (
{ {
// Commented the following code since we need to leave the IRQ1/12 filtering enabled always as per latest // Commented the following code since we need to leave the IRQ1/12 filtering enabled always as per latest
// recommendation in RPR. This is required to fix the keyboard stuck issue when playing games under Windows // recommendation in RPR. This is required to fix the keyboard stuck issue when playing games under Windows
AMDSBCFG* pTmp; //lx-dummy for /W4 build
pTmp = pConfig;
// Disable Power Button SMI // Disable Power Button SMI
RWMEM (ACPI_MMIO_BASE + SMI_BASE + SB_SMI_REGB2, AccWidthUint8, ~(BIT4 + BIT5), 0); RWMEM (ACPI_MMIO_BASE + SMI_BASE + SB_SMI_REGB2, AccWidthUint8, ~(BIT4 + BIT5), 0);
@@ -250,5 +248,3 @@ CallBackToOEM (
return Result; return Result;
} }

View File

@@ -141,14 +141,12 @@ sbPowerOnInit (
UINT8 dbCg2WR; UINT8 dbCg2WR;
UINT8 dbCg1Pll; UINT8 dbCg1Pll;
UINT8 cimNbSbGen2; UINT8 cimNbSbGen2;
UINT8 cimSataMode;
UINT8 cimSpiFastReadEnable; UINT8 cimSpiFastReadEnable;
UINT8 cimSpiFastReadSpeed; UINT8 cimSpiFastReadSpeed;
UINT8 cimSioHwmPortEnable; UINT8 cimSioHwmPortEnable;
UINT8 SataPortNum; UINT8 SataPortNum;
cimNbSbGen2 = pConfig->NbSbGen2; cimNbSbGen2 = pConfig->NbSbGen2;
cimSataMode = pConfig->SATAMODE.SataModeReg;
// Adding Fast Read Function support // Adding Fast Read Function support
if (pConfig->BuildParameters.SpiFastReadEnable != 0 ) { if (pConfig->BuildParameters.SpiFastReadEnable != 0 ) {
cimSpiFastReadEnable = (UINT8) pConfig->BuildParameters.SpiFastReadEnable; cimSpiFastReadEnable = (UINT8) pConfig->BuildParameters.SpiFastReadEnable;

View File

@@ -63,8 +63,6 @@ sbSmmService (
IN AMDSBCFG* pConfig IN AMDSBCFG* pConfig
) )
{ {
AMDSBCFG* pTmp; //lx-dummy for /W4 build
pTmp = pConfig;
} }
/** /**
@@ -79,8 +77,3 @@ softwareSMIservice (
) )
{ {
} }