Jacob Garber has uploaded this change for review.

View Change

soc/rockchip/rk3288: Add fallthrough comment

To break, or not to break, that is the question.
-- Hamlet, probably

The case statement for INIT_MEM does not have a break, and so falls
through to the one for CONF. Is this intentional, or is it a mistake?
Well, it doesn't completely matter, since if a break were added the
state would be CONF on the next iteration of the while loop, and so it
would execute the CONF case anyway. To be safe however, let's leave the
existing control flow and add a comment that the fallthrough is
intentional.

Change-Id: I1d0cfea07211c54d6a906f5a7481c2c760f8ef0d
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 1291959
---
M src/soc/rockchip/rk3288/sdram.c
1 file changed, 1 insertion(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/34296/1
diff --git a/src/soc/rockchip/rk3288/sdram.c b/src/soc/rockchip/rk3288/sdram.c
index 808ff963..f5d1f74 100644
--- a/src/soc/rockchip/rk3288/sdram.c
+++ b/src/soc/rockchip/rk3288/sdram.c
@@ -908,6 +908,7 @@
while ((read32(&ddr_pctl_regs->stat) & PCTL_STAT_MSK)
!= CONF)
;
+ /* fallthrough */
case CONF:
write32(&ddr_pctl_regs->sctl, GO_STATE);
while ((read32(&ddr_pctl_regs->stat) & PCTL_STAT_MSK)

To view, visit change 34296. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1d0cfea07211c54d6a906f5a7481c2c760f8ef0d
Gerrit-Change-Number: 34296
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-MessageType: newchange