Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/62699 )
Change subject: lib/spd: Do not print part number if it is not available ......................................................................
lib/spd: Do not print part number if it is not available
If the DRAM part number is not available in the SPD data (meaning filled with 0x00) do not print it in the log.
Change-Id: If7224c6e114731b1c03915a2bde80f57369d0cee Signed-off-by: Werner Zeh werner.zeh@siemens.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/62699 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Subrata Banik subratabanik@google.com Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/lib/spd_bin.c 1 file changed, 4 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, but someone else must approve Subrata Banik: Looks good to me, approved
diff --git a/src/lib/spd_bin.c b/src/lib/spd_bin.c index 865f16c..1b236b0 100644 --- a/src/lib/spd_bin.c +++ b/src/lib/spd_bin.c @@ -167,8 +167,10 @@ case SPD_DRAM_DDR5: case SPD_DRAM_LPDDR4: case SPD_DRAM_LPDDR4X: - *spd_name = (const char *) &spd[DDR4_SPD_PART_OFF]; - *len = DDR4_SPD_PART_LEN; + if (spd[DDR4_SPD_PART_OFF]) { + *spd_name = (const char *) &spd[DDR4_SPD_PART_OFF]; + *len = DDR4_SPD_PART_LEN; + } break; default: *len = 0;