HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36135 )
Change subject: nb/intel/nehalem: Fix 'dead increment' ......................................................................
nb/intel/nehalem: Fix 'dead increment'
Dead increment spotted out using clang-tools. Value stored to 'some_delay_3_halfcycles' is never read.
Change-Id: I8133f9e8786006bd278d281a132b6a2bd863a967 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/nehalem/raminit.c 1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/36135/1
diff --git a/src/northbridge/intel/nehalem/raminit.c b/src/northbridge/intel/nehalem/raminit.c index 1fca4c4..f24d643 100644 --- a/src/northbridge/intel/nehalem/raminit.c +++ b/src/northbridge/intel/nehalem/raminit.c @@ -825,7 +825,6 @@ int some_delay_1_cycle_ceil; int some_delay_1_cycle_floor;
- some_delay_3_halfcycles = 0; some_delay_3_ps_rounded = 0; extended_silicon_revision = info->silicon_revision; if (!info->silicon_revision)
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36135 )
Change subject: nb/intel/nehalem: Fix 'dead increment' ......................................................................
Patch Set 1:
The rest of the code that uses that variable is this... thing:
if (info->revision_flag_1) { if (some_delay_3_ps < 150) some_delay_3_halfcycles = 0; else some_delay_3_halfcycles = (some_delay_3_ps << 6) / halfcycle_ps(info); some_delay_3_ps_rounded = halfcycle_ps(info) * some_delay_3_halfcycles >> 6; }
Hello Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36135
to look at the new patch set (#2).
Change subject: nb/intel/nehalem: Fix 'dead increment' ......................................................................
nb/intel/nehalem: Fix 'dead increment'
Dead increment spotted out using clang-tools. Value stored to 'some_delay_3_halfcycles' is never read.
Change-Id: I8133f9e8786006bd278d281a132b6a2bd863a967 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/nehalem/raminit.c 1 file changed, 4 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/36135/2
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36135 )
Change subject: nb/intel/nehalem: Fix 'dead increment' ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36135/2/src/northbridge/intel/nehal... File src/northbridge/intel/nehalem/raminit.c:
https://review.coreboot.org/c/coreboot/+/36135/2/src/northbridge/intel/nehal... PS2, Line 879: halfcycle_ps(info) * some_delay_3_halfcycles >> 6; code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/36135/2/src/northbridge/intel/nehal... PS2, Line 879: halfcycle_ps(info) * some_delay_3_halfcycles >> 6; please, no space before tabs
Hello Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36135
to look at the new patch set (#3).
Change subject: nb/intel/nehalem: Fix 'dead increment' ......................................................................
nb/intel/nehalem: Fix 'dead increment'
Dead increment spotted out using clang-tools. Value stored to 'some_delay_3_halfcycles' is never read.
Change-Id: I8133f9e8786006bd278d281a132b6a2bd863a967 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/nehalem/raminit.c 1 file changed, 4 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/36135/3
Hello Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36135
to look at the new patch set (#4).
Change subject: nb/intel/nehalem: Fix 'dead assignment' ......................................................................
nb/intel/nehalem: Fix 'dead assignment'
Dead increment spotted out using clang-tools. Value stored to 'some_delay_3_halfcycles' is never read.
Change-Id: I8133f9e8786006bd278d281a132b6a2bd863a967 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/nehalem/raminit.c 1 file changed, 4 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/36135/4
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36135 )
Change subject: nb/intel/nehalem: Fix 'dead assignment' ......................................................................
Patch Set 4:
(2 comments)
With the proposed changes, this should end up being a mere scope reduction.
https://review.coreboot.org/c/coreboot/+/36135/4/src/northbridge/intel/nehal... File src/northbridge/intel/nehalem/raminit.c:
https://review.coreboot.org/c/coreboot/+/36135/4/src/northbridge/intel/nehal... PS4, Line 823: int some_delay_3_halfcycles; remove this
https://review.coreboot.org/c/coreboot/+/36135/4/src/northbridge/intel/nehal... PS4, Line 876: some_delay_3_halfcycles const int some_delay_3_halfcycles
Hello Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36135
to look at the new patch set (#5).
Change subject: nb/intel/nehalem: Fix 'dead assignment' ......................................................................
nb/intel/nehalem: Fix 'dead assignment'
Dead increment spotted out using clang-tools. Value stored to 'some_delay_3_halfcycles' is never read.
Change-Id: I8133f9e8786006bd278d281a132b6a2bd863a967 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/northbridge/intel/nehalem/raminit.c 1 file changed, 5 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/36135/5
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36135 )
Change subject: nb/intel/nehalem: Fix 'dead assignment' ......................................................................
Patch Set 5: Code-Review+2
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36135 )
Change subject: nb/intel/nehalem: Fix 'dead assignment' ......................................................................
Patch Set 5:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36135/4/src/northbridge/intel/nehal... File src/northbridge/intel/nehalem/raminit.c:
https://review.coreboot.org/c/coreboot/+/36135/4/src/northbridge/intel/nehal... PS4, Line 823: int some_delay_3_halfcycles;
remove this
Done
https://review.coreboot.org/c/coreboot/+/36135/4/src/northbridge/intel/nehal... PS4, Line 876: some_delay_3_halfcycles
const int some_delay_3_halfcycles
Done
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/36135 )
Change subject: nb/intel/nehalem: Fix 'dead assignment' ......................................................................
nb/intel/nehalem: Fix 'dead assignment'
Dead increment spotted out using clang-tools. Value stored to 'some_delay_3_halfcycles' is never read.
Change-Id: I8133f9e8786006bd278d281a132b6a2bd863a967 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/36135 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/northbridge/intel/nehalem/raminit.c 1 file changed, 5 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/northbridge/intel/nehalem/raminit.c b/src/northbridge/intel/nehalem/raminit.c index 21c13d9..a393cb7 100644 --- a/src/northbridge/intel/nehalem/raminit.c +++ b/src/northbridge/intel/nehalem/raminit.c @@ -820,12 +820,10 @@ int some_delay_2_halfcycles_ceil; int some_delay_2_halfcycles_floor; int some_delay_3_ps; - int some_delay_3_halfcycles; int some_delay_3_ps_rounded; int some_delay_1_cycle_ceil; int some_delay_1_cycle_floor;
- some_delay_3_halfcycles = 0; some_delay_3_ps_rounded = 0; extended_silicon_revision = info->silicon_revision; if (!info->silicon_revision) @@ -873,13 +871,12 @@ some_delay_3_ps = halfcycle_ps(info) - some_delay_2_ps % halfcycle_ps(info); if (info->revision_flag_1) { - if (some_delay_3_ps < 150) - some_delay_3_halfcycles = 0; - else - some_delay_3_halfcycles = + if (some_delay_3_ps >= 150) { + const int some_delay_3_halfcycles = (some_delay_3_ps << 6) / halfcycle_ps(info); - some_delay_3_ps_rounded = - halfcycle_ps(info) * some_delay_3_halfcycles >> 6; + some_delay_3_ps_rounded = + halfcycle_ps(info) * some_delay_3_halfcycles >> 6; + } } some_delay_2_halfcycles_ceil = (some_delay_2_ps + halfcycle_ps(info) - 1) / halfcycle_ps(info) -