Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32190
Change subject: device/dram: Remove set but unused variable ......................................................................
device/dram: Remove set but unused variable
The `printram` function only expands to a value when a certain debug macro is defined. This isn't done in default builds, and so Clang (being ever so fastidious) flags `param` with -Werror=unused-but-set-variable. This inlines the value of `param` into the function call to prevent the error.
Signed-off-by: Jacob Garber jgarber1@ualberta.ca Change-Id: I3da657e74723e7443c2ea9e7bd4142baa262d751 --- M src/device/dram/ddr3.c 1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/32190/1
diff --git a/src/device/dram/ddr3.c b/src/device/dram/ddr3.c index f27fdcb..e545b4d 100644 --- a/src/device/dram/ddr3.c +++ b/src/device/dram/ddr3.c @@ -136,7 +136,7 @@ u8 reg8; u32 mtb; /* medium time base */ u32 ftb; /* fine time base */ - unsigned int val, param; + unsigned int val;
ret = SPD_STATUS_OK;
@@ -173,8 +173,7 @@ printram(" Invalid number of memory banks\n"); ret = SPD_STATUS_INVALID_FIELD; } - param = 1 << (val + 3); - printram(" Banks : %u\n", param); + printram(" Banks : %u\n", 1 << (val + 3)); /* SDRAM capacity */ capacity_shift = reg8 & 0x0f; if (capacity_shift > 0x06) {
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32190 )
Change subject: device/dram: Remove set but unused variable ......................................................................
Patch Set 1:
Duplicate of #29917
Jacob Garber has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/32190 )
Change subject: device/dram: Remove set but unused variable ......................................................................
Abandoned
Done in #29917