summaryrefslogtreecommitdiff
path: root/src/device/dram/ddr3.c
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-06-24 13:02:27 -0600
committerMartin Roth <martinroth@google.com>2019-06-28 19:24:55 +0000
commit93064ff7cd348f143b9c890a15b65680d3265525 (patch)
tree9304b42ffb494c36e272df8791e1ed25bb4eaa1b /src/device/dram/ddr3.c
parent70f6d8261427104d246847e4289d6bae07db851e (diff)
device/dram: Inline value into print statement
By default printram() expands to nothing in normal builds, and so scan-build thinks that the assignment to reg8 is unused. Inline the value of reg8 into the print statement to silence the warning. Change-Id: I921fe08949c4135367bee9646b3b365097fab19e Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Found-by: scan-build 8.0.0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/33744 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/device/dram/ddr3.c')
-rw-r--r--src/device/dram/ddr3.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c
index 3272dac6d7..834dc83db6 100644
--- a/src/device/dram/ddr3.c
+++ b/src/device/dram/ddr3.c
@@ -382,8 +382,7 @@ int spd_decode_ddr3(dimm_attr * dimm, spd_raw_data spd)
dimm->flags.therm_sensor ? "yes" : "no");
/* SDRAM Device Type */
- reg8 = spd[33];
- printram(" Standard SDRAM : %s\n", (reg8 & 0x80) ? "no" : "yes");
+ printram(" Standard SDRAM : %s\n", (spd[33] & 0x80) ? "no" : "yes");
if (spd[63] & 0x01) {
dimm->flags.pins_mirrored = 1;