drm: sti: Mark expected switch fall-throughs
Subsystems (3)
PATCH 1/1 drm: sti: Mark expected switch fall-throughs
Mark switch cases where we are expecting to fall through.
This patch fixes the following warning (Building: arm):
drivers/gpu/drm/sti/sti_hdmi.c: In function ‘hdmi_audio_configure’:drivers/gpu/drm/sti/sti_hdmi.c:851:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
audio_cfg |= HDMI_AUD_CFG_CH78_VALID;drivers/gpu/drm/sti/sti_hdmi.c:852:2: note: here
case 6:
^~~~drivers/gpu/drm/sti/sti_hdmi.c:853:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
audio_cfg |= HDMI_AUD_CFG_CH56_VALID;drivers/gpu/drm/sti/sti_hdmi.c:854:2: note: here
case 4:
^~~~drivers/gpu/drm/sti/sti_hdmi.c:855:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
audio_cfg |= HDMI_AUD_CFG_CH34_VALID | HDMI_AUD_CFG_8CH;drivers/gpu/drm/sti/sti_hdmi.c:856:2: note: here
case 2:
^~~~
--- drivers/gpu/drm/sti/sti_hdmi.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/sti/sti_hdmi.c +3 -0
@@ -849,10 +849,13 @@ static int hdmi_audio_configure(struct sti_hdmi *hdmi)switch (info->channels) {case 8 : audio_cfg |=HDMI_AUD_CFG_CH78_VALID ; +/* fall through */ case 6 : audio_cfg |=HDMI_AUD_CFG_CH56_VALID ; +/* fall through */ case 4 : audio_cfg |=HDMI_AUD_CFG_CH34_VALID |HDMI_AUD_CFG_8CH ; +/* fall through */ case 2 : audio_cfg |=HDMI_AUD_CFG_CH12_VALID ;break ;
Signature · 1 line
2.22.0
Quoted 22 lines · Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through.
This patch fixes the following warning (Building: arm):
drivers/gpu/drm/sti/sti_hdmi.c: In function ‘hdmi_audio_configure’:drivers/gpu/drm/sti/sti_hdmi.c:851:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
audio_cfg|=HDMI_AUD_CFG_CH78_VALID;drivers/gpu/drm/sti/sti_hdmi.c:852:2: note: here
case 6:
^~~~drivers/gpu/drm/sti/sti_hdmi.c:853:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
audio_cfg|=HDMI_AUD_CFG_CH56_VALID;drivers/gpu/drm/sti/sti_hdmi.c:854:2: note: here
case 4:
^~~~drivers/gpu/drm/sti/sti_hdmi.c:855:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
audio_cfg|=HDMI_AUD_CFG_CH34_VALID|HDMI_AUD_CFG_8CH;drivers/gpu/drm/sti/sti_hdmi.c:856:2: note: here
case 2:
^~~~
Quoted 1 line
Signed-off-by Gustavo A. R. Silva <[email protected]>
Applied on drm-misc-next,
Thanks,
Benjamin
Quoted 23 lines
--- drivers/gpu/drm/sti/sti_hdmi.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/sti/sti_hdmi.c +3
-1@@ -849,10 +849,13 @@ static int hdmi_audio_configure(struct sti_hdmi *hdmi)switch (info->channels) {case 8 : audio_cfg |=HDMI_AUD_CFG_CH78_VALID ; +/* fall through */ case 6 : audio_cfg |=HDMI_AUD_CFG_CH56_VALID ; +/* fall through */ case 4 : audio_cfg |=HDMI_AUD_CFG_CH34_VALID |HDMI_AUD_CFG_8CH ; +/* fall through */ case 2 : audio_cfg |=HDMI_AUD_CFG_CH12_VALID ;break ; --
Quoted 2 lines
2.22.0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel