nb/amd/amdmct/mct: Simplify conditional
These if statements can be combined to merge the two branches of the conditional and remove the duplicate pDCTstat->Speed == 3 check. Change-Id: I41aa19b4b7ed7b1a0e4f83f72e66869760e677dd Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Found-by: Coverity CID 1229583 Reviewed-on: https://review.coreboot.org/c/coreboot/+/33211 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
74d22d4030
commit
e94335e9fd
|
@ -90,21 +90,13 @@ void mctGet_PS_Cfg_D(struct MCTStatStruc *pMCTstat,
|
||||||
valx &= 0xAA;
|
valx &= 0xAA;
|
||||||
valx >>= 1;
|
valx >>= 1;
|
||||||
}
|
}
|
||||||
if (mctGet_NVbits(NV_MAX_DIMMS) == 8) {
|
val &= valx;
|
||||||
val &= valx;
|
if (val != 0) {
|
||||||
if (val != 0) {
|
if (mctGet_NVbits(NV_MAX_DIMMS) == 8 ||
|
||||||
|
pDCTstat->Speed == 3) {
|
||||||
pDCTstat->CH_ADDR_TMG[dct] &= 0xFFFF00FF;
|
pDCTstat->CH_ADDR_TMG[dct] &= 0xFFFF00FF;
|
||||||
pDCTstat->CH_ADDR_TMG[dct] |= 0x00002F00;
|
pDCTstat->CH_ADDR_TMG[dct] |= 0x00002F00;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
val &= valx;
|
|
||||||
if (val != 0) {
|
|
||||||
if (pDCTstat->Speed == 3 || pDCTstat->Speed == 3) {
|
|
||||||
pDCTstat->CH_ADDR_TMG[dct] &= 0xFFFF00FF;
|
|
||||||
pDCTstat->CH_ADDR_TMG[dct] |= 0x00002F00;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue