HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32428
Change subject: device/dram/ddr3: Remove unused variables ......................................................................
device/dram/ddr3: Remove unused variables
Change-Id: I0cdf34cbb9aaed5045db5294eeefeaac642aeb1a Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/device/dram/ddr3.c 1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/32428/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) {
Jacob Garber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32428 )
Change subject: device/dram/ddr3: Remove unused variables ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/#/c/32428/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/32428/1//COMMIT_MSG@7 PS1, Line 7: variables In this case it's just a single variable
https://review.coreboot.org/#/c/32428/1//COMMIT_MSG@8 PS1, Line 8: This variable is unused because printram only expands to something in debug builds (not default ones) - it might be nice to explain this, since otherwise it's not immediately clear why this variable is unused.
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32428 )
Change subject: device/dram/ddr3: Remove unused variables ......................................................................
Patch Set 1: Code-Review+2
Hello Patrick Rudolph, Jacob Garber, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/32428
to look at the new patch set (#2).
Change subject: device/dram/ddr3: Remove unused variable ......................................................................
device/dram/ddr3: Remove unused variable
'param' variable is unused because 'printram' function only expands to something in debug builds (not default ones).
Change-Id: I0cdf34cbb9aaed5045db5294eeefeaac642aeb1a Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/device/dram/ddr3.c 1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/32428/2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32428 )
Change subject: device/dram/ddr3: Remove unused variable ......................................................................
Patch Set 2: Code-Review+2
Jacob Garber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32428 )
Change subject: device/dram/ddr3: Remove unused variable ......................................................................
Patch Set 2: Code-Review+1
(2 comments)
https://review.coreboot.org/#/c/32428/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/32428/1//COMMIT_MSG@7 PS1, Line 7: variables
In this case it's just a single variable
Done
https://review.coreboot.org/#/c/32428/1//COMMIT_MSG@8 PS1, Line 8:
This variable is unused because printram only expands to something in debug builds (not default ones […]
Done
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/32428 )
Change subject: device/dram/ddr3: Remove unused variable ......................................................................
device/dram/ddr3: Remove unused variable
'param' variable is unused because 'printram' function only expands to something in debug builds (not default ones).
Change-Id: I0cdf34cbb9aaed5045db5294eeefeaac642aeb1a Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/32428 Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Jacob Garber jgarber1@ualberta.ca Reviewed-by: Patrick Rudolph siro@das-labor.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/device/dram/ddr3.c 1 file changed, 2 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved Angel Pons: Looks good to me, approved Jacob Garber: Looks good to me, but someone else must approve
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) {