vendorcode/agesa: Fix check for valid PhyLane
Found using GCC with flag -Wlogical-op Change-Id: Ia04ac5b1d0a4434c0ab2ca583b9b03dbfd0ffd41 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33362 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
e94335e9fd
commit
d844431af0
|
@ -202,7 +202,7 @@ PcieConfigGetNumberOfPhyLane (
|
|||
IN PCIe_ENGINE_CONFIG *Engine
|
||||
)
|
||||
{
|
||||
if (Engine->EngineData.StartLane >= UNUSED_LANE_ID || Engine->EngineData.StartLane >= UNUSED_LANE_ID) {
|
||||
if (Engine->EngineData.StartLane >= UNUSED_LANE_ID || Engine->EngineData.EndLane >= UNUSED_LANE_ID) {
|
||||
return 0;
|
||||
}
|
||||
if (Engine->EngineData.StartLane > Engine->EngineData.EndLane) {
|
||||
|
|
|
@ -178,7 +178,7 @@ PcieConfigGetNumberOfPhyLane (
|
|||
IN PCIe_ENGINE_CONFIG *Engine
|
||||
)
|
||||
{
|
||||
if (Engine->EngineData.StartLane >= UNUSED_LANE_ID || Engine->EngineData.StartLane >= UNUSED_LANE_ID) {
|
||||
if (Engine->EngineData.StartLane >= UNUSED_LANE_ID || Engine->EngineData.EndLane >= UNUSED_LANE_ID) {
|
||||
return 0;
|
||||
}
|
||||
if (Engine->EngineData.StartLane > Engine->EngineData.EndLane) {
|
||||
|
|
|
@ -205,7 +205,7 @@ PcieConfigGetNumberOfPhyLane (
|
|||
IN PCIe_ENGINE_CONFIG *Engine
|
||||
)
|
||||
{
|
||||
if (Engine->EngineData.StartLane >= UNUSED_LANE_ID || Engine->EngineData.StartLane >= UNUSED_LANE_ID) {
|
||||
if (Engine->EngineData.StartLane >= UNUSED_LANE_ID || Engine->EngineData.EndLane >= UNUSED_LANE_ID) {
|
||||
return 0;
|
||||
}
|
||||
if (Engine->EngineData.StartLane > Engine->EngineData.EndLane) {
|
||||
|
|
|
@ -205,7 +205,7 @@ PcieConfigGetNumberOfPhyLane (
|
|||
IN PCIe_ENGINE_CONFIG *Engine
|
||||
)
|
||||
{
|
||||
if (Engine->EngineData.StartLane >= UNUSED_LANE_ID || Engine->EngineData.StartLane >= UNUSED_LANE_ID) {
|
||||
if (Engine->EngineData.StartLane >= UNUSED_LANE_ID || Engine->EngineData.EndLane >= UNUSED_LANE_ID) {
|
||||
return 0;
|
||||
}
|
||||
if (Engine->EngineData.StartLane > Engine->EngineData.EndLane) {
|
||||
|
|
Loading…
Reference in New Issue