[2/2] drm: sun4i: tcon: Mark expected switch fall-through

Message ID 20190726112807.19615-1-anders.roxell@linaro.org
State New
Headers show
Series
  • Untitled series #22217
Related show

Commit Message

Anders Roxell July 26, 2019, 11:28 a.m.
When fall-through warnings was enabled by default the following warning
was starting to show up:

../drivers/gpu/drm/sun4i/sun4i_tcon.c: In function ‘sun4i_tcon0_mode_set_dithering’:
../drivers/gpu/drm/sun4i/sun4i_tcon.c:316:7: warning: this statement may fall
 through [-Wimplicit-fallthrough=]
   val |= SUN4I_TCON0_FRM_CTL_MODE_B;
../drivers/gpu/drm/sun4i/sun4i_tcon.c:317:2: note: here
  case MEDIA_BUS_FMT_RGB666_1X18:
  ^~~~

Rework so that the compiler doesn't warn about fall-through.

Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

---
 drivers/gpu/drm/sun4i/sun4i_tcon.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.20.1

Patch

diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index 690aeb822704..04c721d0d3b9 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -316,6 +316,7 @@  static void sun4i_tcon0_mode_set_dithering(struct sun4i_tcon *tcon,
 		/* R and B components are only 5 bits deep */
 		val |= SUN4I_TCON0_FRM_CTL_MODE_R;
 		val |= SUN4I_TCON0_FRM_CTL_MODE_B;
+		/* Fall through */
 	case MEDIA_BUS_FMT_RGB666_1X18:
 	case MEDIA_BUS_FMT_RGB666_1X7X3_SPWG:
 		/* Fall through: enable dithering */