Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34576 )
Change subject: vc/cavium/bdk/libdram: Print unknown voltages ......................................................................
vc/cavium/bdk/libdram: Print unknown voltages
volt_str is used to print information about the RAM configuration in report_common_dimm(), so let's print out "unknown voltage" if the voltage isn't recognized rather than a garbage value.
Change-Id: I8e85917fd682e166172fbf10597bde4a8a11dfc7 Signed-off-by: Jacob Garber jgarber1@ualberta.ca Found-by: Coverity CID 1393958, 1393982 --- M src/vendorcode/cavium/bdk/libdram/dram-spd.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/34576/1
diff --git a/src/vendorcode/cavium/bdk/libdram/dram-spd.c b/src/vendorcode/cavium/bdk/libdram/dram-spd.c index 84df69a..894a060 100644 --- a/src/vendorcode/cavium/bdk/libdram/dram-spd.c +++ b/src/vendorcode/cavium/bdk/libdram/dram-spd.c @@ -424,7 +424,7 @@ int dram_width, int dimm_size_mb) { int spd_voltage; - const char *volt_str; + const char *volt_str = "unknown voltage";
spd_voltage = read_spd(node, dimm_config, DDR3_SPD_NOMINAL_VOLTAGE); if ((spd_voltage == 0) || (spd_voltage & 3)) @@ -464,7 +464,7 @@ int dram_width, int dimm_size_mb) { int spd_voltage; - const char *volt_str; + const char *volt_str = "unknown voltage";
spd_voltage = read_spd(node, dimm_config, DDR4_SPD_MODULE_NOMINAL_VOLTAGE); if ((spd_voltage == 0x01) || (spd_voltage & 0x02))
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34576 )
Change subject: vc/cavium/bdk/libdram: Print unknown voltages ......................................................................
Patch Set 1: Code-Review+2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34576 )
Change subject: vc/cavium/bdk/libdram: Print unknown voltages ......................................................................
Patch Set 1: Code-Review+1
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34576 )
Change subject: vc/cavium/bdk/libdram: Print unknown voltages ......................................................................
vc/cavium/bdk/libdram: Print unknown voltages
volt_str is used to print information about the RAM configuration in report_common_dimm(), so let's print out "unknown voltage" if the voltage isn't recognized rather than a garbage value.
Change-Id: I8e85917fd682e166172fbf10597bde4a8a11dfc7 Signed-off-by: Jacob Garber jgarber1@ualberta.ca Found-by: Coverity CID 1393958, 1393982 Reviewed-on: https://review.coreboot.org/c/coreboot/+/34576 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Rudolph siro@das-labor.org Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net --- M src/vendorcode/cavium/bdk/libdram/dram-spd.c 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Patrick Rudolph: Looks good to me, approved
diff --git a/src/vendorcode/cavium/bdk/libdram/dram-spd.c b/src/vendorcode/cavium/bdk/libdram/dram-spd.c index 84df69a..894a060 100644 --- a/src/vendorcode/cavium/bdk/libdram/dram-spd.c +++ b/src/vendorcode/cavium/bdk/libdram/dram-spd.c @@ -424,7 +424,7 @@ int dram_width, int dimm_size_mb) { int spd_voltage; - const char *volt_str; + const char *volt_str = "unknown voltage";
spd_voltage = read_spd(node, dimm_config, DDR3_SPD_NOMINAL_VOLTAGE); if ((spd_voltage == 0) || (spd_voltage & 3)) @@ -464,7 +464,7 @@ int dram_width, int dimm_size_mb) { int spd_voltage; - const char *volt_str; + const char *volt_str = "unknown voltage";
spd_voltage = read_spd(node, dimm_config, DDR4_SPD_MODULE_NOMINAL_VOLTAGE); if ((spd_voltage == 0x01) || (spd_voltage & 0x02))