mfd: db8500-prcmu: Mark expected switch fall-throughs
Subsystems (2)
PATCH 1/1 mfd: db8500-prcmu: Mark expected switch fall-throughs
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings:
drivers/mfd/db8500-prcmu.c: In function 'dsiclk_rate':drivers/mfd/db8500-prcmu.c:1592:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
div *= 2;
~~~~^~~~drivers/mfd/db8500-prcmu.c:1593:2: note: here
case PRCM_DSI_PLLOUT_SEL_PHI_2:
^~~~drivers/mfd/db8500-prcmu.c:1594:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
div *= 2;
~~~~^~~~drivers/mfd/db8500-prcmu.c:1595:2: note: here
case PRCM_DSI_PLLOUT_SEL_PHI:
^~~~
--- drivers/mfd/db8500-prcmu.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mfd/db8500-prcmu.c +2 -0
@@ -1590,8 +1590,10 @@ static unsigned long dsiclk_rate(u8 n)switch (divsel) {case PRCM_DSI_PLLOUT_SEL_PHI_4 : div *=2 ; +/* Fall through */ case PRCM_DSI_PLLOUT_SEL_PHI_2 : div *=2 ; +/* Fall through */ case PRCM_DSI_PLLOUT_SEL_PHI :return pll_rate (PRCM_PLLDSI_FREQ ,clock_rate (PRCMU_HDMICLK ),PLL_RAW ) / div;
Signature · 1 line
2.22.0
Quoted 12 lines · Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings:
drivers/mfd/db8500-prcmu.c: In function 'dsiclk_rate':drivers/mfd/db8500-prcmu.c:1592:7: warning: this statement may fall through [-Wimplicit-fallthrough=]div *= 2; ~~~~^~~~
drivers/mfd/db8500-prcmu.c:1593:2: note: here
casePRCM_DSI_PLLOUT_SEL_PHI_2:
^~~~drivers/mfd/db8500-prcmu.c:1594:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
Quoted 8 lines
div *= 2; ~~~~^~~~
drivers/mfd/db8500-prcmu.c:1595:2: note: here
casePRCM_DSI_PLLOUT_SEL_PHI:
^~~~Reported-by Stephen Rothwell <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>
-Kees
Quoted 22 lines
--- drivers/mfd/db8500-prcmu.c | 2 ++ 1 file changed, 2 insertions(+)drivers/mfd/db8500-prcmu.c +2
-0@@ -1590,8 +1590,10 @@ static unsigned long dsiclk_rate(u8 n)switch (divsel) {case PRCM_DSI_PLLOUT_SEL_PHI_4 : div *=2 ; +/* Fall through */ case PRCM_DSI_PLLOUT_SEL_PHI_2 : div *=2 ; +/* Fall through */ case PRCM_DSI_PLLOUT_SEL_PHI :return pll_rate (PRCM_PLLDSI_FREQ ,clock_rate (PRCMU_HDMICLK ),PLL_RAW ) / div;Signature · 1 line
2.22.0
Signature · 1 line
Kees Cook
Quoted 12 lines · Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings:
drivers/mfd/db8500-prcmu.c: In function 'dsiclk_rate':drivers/mfd/db8500-prcmu.c:1592:7: warning: this statement may fall through [-Wimplicit-fallthrough=]div *= 2; ~~~~^~~~
drivers/mfd/db8500-prcmu.c:1593:2: note: here
casePRCM_DSI_PLLOUT_SEL_PHI_2:
^~~~drivers/mfd/db8500-prcmu.c:1594:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
Quoted 8 lines
div *= 2; ~~~~^~~~
drivers/mfd/db8500-prcmu.c:1595:2: note: here
casePRCM_DSI_PLLOUT_SEL_PHI:
^~~~Reported-by Stephen Rothwell <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>
Yours,
Linus Walleij
Lee Jones
AppliedQuoted 18 lines · Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings:
drivers/mfd/db8500-prcmu.c: In function 'dsiclk_rate':drivers/mfd/db8500-prcmu.c:1592:7: warning: this statement may fall through [-Wimplicit-fallthrough=]div *= 2; ~~~~^~~~
drivers/mfd/db8500-prcmu.c:1593:2: note: here
casePRCM_DSI_PLLOUT_SEL_PHI_2:
^~~~drivers/mfd/db8500-prcmu.c:1594:7: warning: this statement may fall through [-Wimplicit-fallthrough=]div *= 2; ~~~~^~~~
drivers/mfd/db8500-prcmu.c:1595:2: note: here
casePRCM_DSI_PLLOUT_SEL_PHI:
^~~~
Quoted 5 lines
Reported-by Stephen Rothwell <[email protected]>Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/mfd/db8500-prcmu.c | 2 ++ 1 file changed, 2 insertions(+)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog