Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33744
Change subject: device/dram: Inline value into print statement ......................................................................
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 --- M src/device/dram/ddr3.c 1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/33744/1
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c index 3272dac..834dc83 100644 --- a/src/device/dram/ddr3.c +++ b/src/device/dram/ddr3.c @@ -382,8 +382,7 @@ 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;
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33744 )
Change subject: device/dram: Inline value into print statement ......................................................................
Patch Set 1: Code-Review+2
Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33744 )
Change subject: device/dram: Inline value into print statement ......................................................................
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 --- M src/device/dram/ddr3.c 1 file changed, 1 insertion(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c index 3272dac..834dc83 100644 --- a/src/device/dram/ddr3.c +++ b/src/device/dram/ddr3.c @@ -382,8 +382,7 @@ 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;