diff options
author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-12-08 01:00:43 +1100 |
---|---|---|
committer | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-12-07 22:36:39 +0100 |
commit | 8ff0ead0816dfc2683ee93e2f5eef79e007a5cd6 (patch) | |
tree | 432e64748d96185d5468612e512d3e4f86150b06 /src/vendorcode | |
parent | d189085b3fb98b35f52213c5546ec55722eefc01 (diff) |
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 <eocallaghan@alterapraxis.com>
Found-by: Clang
Reviewed-on: http://review.coreboot.org/7688
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/vendorcode')
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. |