vendorcode/amd/agesa: Fix tautological compare
An unsigned enum expression is always strictly positive; Comparison with '>= 0' is a tautology, hence remove it. Change-Id: I910d672f8a27d278c2a2fe1e4f39fc61f2c5dbc5 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: https://review.coreboot.org/8207 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
91d94b0907
commit
5de5522685
|
@ -169,7 +169,7 @@ MemNCmnGetSetFieldC32 (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -153,7 +153,7 @@ MemNCmnGetSetFieldDA (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -156,7 +156,7 @@ MemNCmnGetSetFieldDr (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -169,7 +169,7 @@ MemNCmnGetSetFieldHy (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -172,7 +172,7 @@ MemNCmnGetSetFieldC32 (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -157,7 +157,7 @@ MemNCmnGetSetFieldDA (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -158,7 +158,7 @@ MemNCmnGetSetFieldDr (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -173,7 +173,7 @@ MemNCmnGetSetFieldHy (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -159,7 +159,7 @@ MemNCmnGetSetFieldLN (
|
|||
if (FieldName == BFDctAccessDone) {
|
||||
// Llano does not support DctAccessDone. Assume DctAccessDone=1 always.
|
||||
Value = 1;
|
||||
} else if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
} else if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -174,7 +174,7 @@ MemNCmnGetSetFieldC32 (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -159,7 +159,7 @@ MemNCmnGetSetFieldDA (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -160,7 +160,7 @@ MemNCmnGetSetFieldDr (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -175,7 +175,7 @@ MemNCmnGetSetFieldHy (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -293,7 +293,7 @@ MemRecNCmnGetSetFieldON (
|
|||
UINT8 Instance;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -173,7 +173,7 @@ MemNCmnGetSetFieldC32 (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -158,7 +158,7 @@ MemNCmnGetSetFieldDA (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -159,7 +159,7 @@ MemNCmnGetSetFieldDr (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -174,7 +174,7 @@ MemNCmnGetSetFieldHy (
|
|||
UINT32 Mask;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -182,7 +182,7 @@ MemNCmnGetSetFieldOr (
|
|||
UINT8 Instance;
|
||||
|
||||
Value = 0;
|
||||
if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -170,7 +170,7 @@ MemNCmnGetSetFieldTN (
|
|||
if (FieldName == BFDctAccessDone) {
|
||||
// No need to poll DctAccessDone for TN due to enhancement in phy
|
||||
Value = 1;
|
||||
} else if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
} else if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
|
@ -169,7 +169,7 @@ MemNCmnGetSetFieldKB (
|
|||
if (FieldName == BFDctAccessDone) {
|
||||
// No need to poll DctAccessDone for KB due to enhancement in phy
|
||||
Value = 1;
|
||||
} else if ((FieldName < BFEndOfList) && (FieldName >= 0)) {
|
||||
} else if (FieldName < BFEndOfList) {
|
||||
Address = NBPtr->NBRegTable[FieldName];
|
||||
if (Address) {
|
||||
Lowbit = TSEFO_END (Address);
|
||||
|
|
Loading…
Reference in New Issue