Use the fallthrough statement in switch loops
Clang does not seem to work with 'fall through' in comments.
Change-Id: Idcbe373be33ef7247548f856bfaba7ceb7f749b5
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51498
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
diff --git a/src/soc/nvidia/tegra124/sor.c b/src/soc/nvidia/tegra124/sor.c
index 9e56c68..9d34227 100644
--- a/src/soc/nvidia/tegra124/sor.c
+++ b/src/soc/nvidia/tegra124/sor.c
@@ -220,10 +220,10 @@
case 4:
reg_val |= (NV_SOR_DP_PADCTL_PD_TXD_3_NO |
NV_SOR_DP_PADCTL_PD_TXD_2_NO);
- /* fall through */
+ __fallthrough;
case 2:
reg_val |= NV_SOR_DP_PADCTL_PD_TXD_1_NO;
- /* fall through */
+ __fallthrough;
case 1:
reg_val |= NV_SOR_DP_PADCTL_PD_TXD_0_NO;
break;
@@ -891,10 +891,10 @@
case 4:
val |= (NV_SOR_DP_PADCTL_PD_TXD_3_NO |
NV_SOR_DP_PADCTL_PD_TXD_2_NO);
- /* fall through */
+ __fallthrough;
case 2:
val |= NV_SOR_DP_PADCTL_PD_TXD_1_NO;
- /* fall through */
+ __fallthrough;
case 1:
val |= NV_SOR_DP_PADCTL_PD_TXD_0_NO;
break;
diff --git a/src/soc/nvidia/tegra210/sor.c b/src/soc/nvidia/tegra210/sor.c
index fe89d14..3b0c128 100644
--- a/src/soc/nvidia/tegra210/sor.c
+++ b/src/soc/nvidia/tegra210/sor.c
@@ -222,9 +222,10 @@
case 4:
reg_val |= (NV_SOR_DP_PADCTL_PD_TXD_3_NO |
NV_SOR_DP_PADCTL_PD_TXD_2_NO);
- /* fall through */
+ fallthrough;
case 2:
reg_val |= NV_SOR_DP_PADCTL_PD_TXD_1_NO;
+ fallthrough;
case 1:
reg_val |= NV_SOR_DP_PADCTL_PD_TXD_0_NO;
break;
@@ -889,10 +890,10 @@
case 4:
val |= (NV_SOR_DP_PADCTL_PD_TXD_3_NO |
NV_SOR_DP_PADCTL_PD_TXD_2_NO);
- /* fall through */
+ fallthrough;
case 2:
val |= NV_SOR_DP_PADCTL_PD_TXD_1_NO;
- /* fall through */
+ fallthrough;
case 1:
val |= NV_SOR_DP_PADCTL_PD_TXD_0_NO;
break;
diff --git a/src/soc/rockchip/rk3288/sdram.c b/src/soc/rockchip/rk3288/sdram.c
index 877f53d..2efe19b 100644
--- a/src/soc/rockchip/rk3288/sdram.c
+++ b/src/soc/rockchip/rk3288/sdram.c
@@ -739,7 +739,7 @@
!= PGSR_DLDONE)
;
/* if at low power state, need wakeup first, then enter the config */
- /* fall through */
+ __fallthrough;
case ACCESS:
case INIT_MEM:
write32(&ddr_pctl_regs->sctl, CFG_STATE);
@@ -893,7 +893,8 @@
while ((read32(&ddr_pctl_regs->stat) & PCTL_STAT_MSK)
!= CONF)
;
- /* fall through - enter config next to get to access state */
+ /* enter config next to get to access state */
+ __fallthrough;
case CONF:
write32(&ddr_pctl_regs->sctl, GO_STATE);
while ((read32(&ddr_pctl_regs->stat) & PCTL_STAT_MSK)