[coreboot-gerrit] New patch to review for coreboot: amd/mct/ddr3: Fix unintended sign extension warning
Timothy Pearson (tpearson@raptorengineering.com)
gerrit at coreboot.org
Tue Jan 10 00:44:04 CET 2017
Timothy Pearson (tpearson at raptorengineering.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18077
-gerrit
commit 9b15fc380fa66eb3db3ac967bcae8901c00fb345
Author: Timothy Pearson <tpearson at raptorengineering.com>
Date: Mon Jan 9 17:40:21 2017 -0600
amd/mct/ddr3: Fix unintended sign extension warning
An unintended sign extension warning was thrown by Coverity.
Explicitly state the unsigned nature of num_nodes.
Found-by: Coverity Scan #1347342
Change-Id: Icd42eec13be04fc5fd2ffc85320cbadafc852148
Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
---
src/northbridge/amd/amdmct/mct_ddr3/mct_d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
index e93a7bd..6487b2c 100644
--- a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
+++ b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
@@ -2474,7 +2474,7 @@ static void set_up_cc6_storage_fam15(struct MCTStatStruc *pMCTstat,
if (interleaved)
/* Move upper limit down by 16M * the number of nodes */
- max_range_limit -= (0x1000000 * num_nodes);
+ max_range_limit -= (0x1000000 * (uint8_t)num_nodes);
else
/* Move upper limit down by 16M */
max_range_limit -= 0x1000000;
More information about the coreboot-gerrit
mailing list