Skip to content

Commit bd4d73a

Browse files
GustavoARSilvadanvet
authored andcommitted
drm/savage: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warnings: drivers/gpu/drm/savage/savage_state.c:301:8: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/gpu/drm/savage/savage_state.c:438:8: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/gpu/drm/savage/savage_state.c:559:8: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/gpu/drm/savage/savage_state.c:697:8: warning: this statement may fall through [-Wimplicit-fallthrough=] Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190129202005.GA25789@embeddedor
1 parent 88c12a0 commit bd4d73a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/savage/savage_state.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ static int savage_dispatch_dma_prim(drm_savage_private_t * dev_priv,
299299
case SAVAGE_PRIM_TRILIST_201:
300300
reorder = 1;
301301
prim = SAVAGE_PRIM_TRILIST;
302+
/* fall through */
302303
case SAVAGE_PRIM_TRILIST:
303304
if (n % 3 != 0) {
304305
DRM_ERROR("wrong number of vertices %u in TRILIST\n",
@@ -436,6 +437,7 @@ static int savage_dispatch_vb_prim(drm_savage_private_t * dev_priv,
436437
case SAVAGE_PRIM_TRILIST_201:
437438
reorder = 1;
438439
prim = SAVAGE_PRIM_TRILIST;
440+
/* fall through */
439441
case SAVAGE_PRIM_TRILIST:
440442
if (n % 3 != 0) {
441443
DRM_ERROR("wrong number of vertices %u in TRILIST\n",
@@ -557,6 +559,7 @@ static int savage_dispatch_dma_idx(drm_savage_private_t * dev_priv,
557559
case SAVAGE_PRIM_TRILIST_201:
558560
reorder = 1;
559561
prim = SAVAGE_PRIM_TRILIST;
562+
/* fall through */
560563
case SAVAGE_PRIM_TRILIST:
561564
if (n % 3 != 0) {
562565
DRM_ERROR("wrong number of indices %u in TRILIST\n", n);
@@ -695,6 +698,7 @@ static int savage_dispatch_vb_idx(drm_savage_private_t * dev_priv,
695698
case SAVAGE_PRIM_TRILIST_201:
696699
reorder = 1;
697700
prim = SAVAGE_PRIM_TRILIST;
701+
/* fall through */
698702
case SAVAGE_PRIM_TRILIST:
699703
if (n % 3 != 0) {
700704
DRM_ERROR("wrong number of indices %u in TRILIST\n", n);

0 commit comments

Comments
 (0)