fix: [Common] Operands don't affect result for PlatformId (#1940)
Define of platformId is : [UINT8 : 5;] Operands don't affect result (CONSTANT_EXPRESSION_RESULT) result_independent_of_operands: StitchData->PlatformId < 32 is always true regardless of the values of its operands. This occurs as the logical second operand of "&&". Signed-off-by: Randy <randy.lin@intel.com>
This commit is contained in:
parent
475ff9daca
commit
9dc4a2f7ad
|
@ -115,10 +115,8 @@ EarlyPlatformDataCheck (
|
|||
SetDebugPort (PcdGet8 (PcdDebugPortNumber));
|
||||
} else {
|
||||
SetDebugPort (StitchData->DebugUart);
|
||||
if ((StitchData->PlatformId > 0) && (StitchData->PlatformId < 32)) {
|
||||
SetPlatformId (StitchData->PlatformId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,10 +55,8 @@ EarlyPlatformDataCheck (
|
|||
SetDebugPort ( PcdGet8 (PcdDebugPortNumber));
|
||||
} else {
|
||||
SetDebugPort (StitchData->DebugUart);
|
||||
if ((StitchData->PlatformId > 0) && (StitchData->PlatformId < 32)) {
|
||||
SetPlatformId (StitchData->PlatformId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -163,10 +163,8 @@ EarlyPlatformDataCheck (
|
|||
SetDebugPort ( PcdGet8 (PcdDebugPortNumber));
|
||||
} else {
|
||||
SetDebugPort (StitchData->DebugUart);
|
||||
if ((StitchData->PlatformId > 0) && (StitchData->PlatformId < 32)) {
|
||||
SetPlatformId (StitchData->PlatformId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -87,10 +87,8 @@ EarlyPlatformDataCheck (
|
|||
SetDebugPort (0xFF);
|
||||
} else {
|
||||
SetDebugPort (StitchData->DebugUart);
|
||||
if ((StitchData->PlatformId > 0) && (StitchData->PlatformId < 32)) {
|
||||
SetPlatformId (StitchData->PlatformId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -83,10 +83,8 @@ EarlyPlatformDataCheck (
|
|||
SetDebugPort (0xFF);
|
||||
} else {
|
||||
SetDebugPort (StitchData->DebugUart);
|
||||
if ((StitchData->PlatformId > 0) && (StitchData->PlatformId < 32)) {
|
||||
SetPlatformId (StitchData->PlatformId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -94,10 +94,8 @@ EarlyPlatformDataCheck (
|
|||
SetDebugPort (PcdGet8 (PcdDebugPortNumber));
|
||||
} else {
|
||||
SetDebugPort (StitchData->DebugUart);
|
||||
if ((StitchData->PlatformId > 0) && (StitchData->PlatformId < 32)) {
|
||||
SetPlatformId (StitchData->PlatformId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -59,9 +59,7 @@ EarlyPlatformDataCheck (
|
|||
StitchData = (STITCH_DATA *)(UINTN)0xFFFFFFF4;
|
||||
if (StitchData->Marker == 0xAA) {
|
||||
SetDebugPort (StitchData->DebugUart);
|
||||
if ((StitchData->PlatformId > 0) && (StitchData->PlatformId < 32)) {
|
||||
SetPlatformId (StitchData->PlatformId);
|
||||
}
|
||||
} else {
|
||||
// Use the default port defined in BoardConfig.py
|
||||
SetDebugPort ( PcdGet8 (PcdDebugPortNumber));
|
||||
|
|
|
@ -89,10 +89,8 @@ EarlyPlatformDataCheck (
|
|||
SetDebugPort ( PcdGet8 (PcdDebugPortNumber));
|
||||
} else {
|
||||
SetDebugPort (StitchData->DebugUart);
|
||||
if ((StitchData->PlatformId > 0) && (StitchData->PlatformId < 32)) {
|
||||
SetPlatformId (StitchData->PlatformId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue