From 8ff0ead0816dfc2683ee93e2f5eef79e007a5cd6 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 8 Dec 2014 01:00:43 +1100 Subject: [PATCH] vendorcode/amd/agesa/f1{5,5tn,6kb}: Silence empty loop warn Add decorations to specify that empty loop is intended so. Change-Id: Ia3e40d341eca5e26da3832edc733cf1ccc96c136 Signed-off-by: Edward O'Callaghan Found-by: Clang Reviewed-on: http://review.coreboot.org/7688 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc --- .../amd/agesa/f15/Proc/Mem/Feat/IDENDIMM/mfidendimm.c | 5 ++++- .../amd/agesa/f15tn/Proc/Mem/Feat/IDENDIMM/mfidendimm.c | 5 ++++- .../amd/agesa/f16kb/Proc/Mem/Feat/IDENDIMM/mfidendimm.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/vendorcode/amd/agesa/f15/Proc/Mem/Feat/IDENDIMM/mfidendimm.c b/src/vendorcode/amd/agesa/f15/Proc/Mem/Feat/IDENDIMM/mfidendimm.c index 20ba2a553b..84f69ff94b 100644 --- a/src/vendorcode/amd/agesa/f15/Proc/Mem/Feat/IDENDIMM/mfidendimm.c +++ b/src/vendorcode/amd/agesa/f15/Proc/Mem/Feat/IDENDIMM/mfidendimm.c @@ -507,7 +507,10 @@ MemFGetPCI ( UINT8 Die; // Find NBBlock that associates with node NodeID - for (Die = 0; (Die < MAX_NODES_SUPPORTED) && (NBPtr[Die].Node != NodeID); Die ++); + for (Die = 0; Die < MAX_NODES_SUPPORTED; Die ++) + if (NBPtr[Die].Node == NodeID) + break; + ASSERT (Die < MAX_NODES_SUPPORTED); // Get the northbridge pointer for the targeted node. diff --git a/src/vendorcode/amd/agesa/f15tn/Proc/Mem/Feat/IDENDIMM/mfidendimm.c b/src/vendorcode/amd/agesa/f15tn/Proc/Mem/Feat/IDENDIMM/mfidendimm.c index 20ba2a553b..84f69ff94b 100644 --- a/src/vendorcode/amd/agesa/f15tn/Proc/Mem/Feat/IDENDIMM/mfidendimm.c +++ b/src/vendorcode/amd/agesa/f15tn/Proc/Mem/Feat/IDENDIMM/mfidendimm.c @@ -507,7 +507,10 @@ MemFGetPCI ( UINT8 Die; // Find NBBlock that associates with node NodeID - for (Die = 0; (Die < MAX_NODES_SUPPORTED) && (NBPtr[Die].Node != NodeID); Die ++); + for (Die = 0; Die < MAX_NODES_SUPPORTED; Die ++) + if (NBPtr[Die].Node == NodeID) + break; + ASSERT (Die < MAX_NODES_SUPPORTED); // Get the northbridge pointer for the targeted node. diff --git a/src/vendorcode/amd/agesa/f16kb/Proc/Mem/Feat/IDENDIMM/mfidendimm.c b/src/vendorcode/amd/agesa/f16kb/Proc/Mem/Feat/IDENDIMM/mfidendimm.c index 6bd85214af..5d984944ba 100644 --- a/src/vendorcode/amd/agesa/f16kb/Proc/Mem/Feat/IDENDIMM/mfidendimm.c +++ b/src/vendorcode/amd/agesa/f16kb/Proc/Mem/Feat/IDENDIMM/mfidendimm.c @@ -507,7 +507,10 @@ MemFGetPCI ( UINT8 Die; // Find NBBlock that associates with node NodeID - for (Die = 0; (Die < MAX_NODES_SUPPORTED) && (NBPtr[Die].Node != NodeID); Die ++); + for (Die = 0; Die < MAX_NODES_SUPPORTED; Die ++) + if (NBPtr[Die].Node == NodeID) + break; + ASSERT (Die < MAX_NODES_SUPPORTED); // Get the northbridge pointer for the targeted node.