drm/savage: mark expected switch fall-throughs
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/savage/savage_state.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/savage/savage_state.c +4 -0
@@ -299,6 +299,7 @@ static int savage_dispatch_dma_prim(drm_savage_private_t * dev_priv,case SAVAGE_PRIM_TRILIST_201 : reorder =1 ; prim =SAVAGE_PRIM_TRILIST ; +/* fall through */ case SAVAGE_PRIM_TRILIST :if (n %3 !=0 ) { 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,case SAVAGE_PRIM_TRILIST_201 : reorder =1 ; prim =SAVAGE_PRIM_TRILIST ; +/* fall through */ case SAVAGE_PRIM_TRILIST :if (n %3 !=0 ) { 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,case SAVAGE_PRIM_TRILIST_201 : reorder =1 ; prim =SAVAGE_PRIM_TRILIST ; +/* fall through */ case SAVAGE_PRIM_TRILIST :if (n %3 !=0 ) {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,case SAVAGE_PRIM_TRILIST_201 : reorder =1 ; prim =SAVAGE_PRIM_TRILIST ; +/* fall through */ case SAVAGE_PRIM_TRILIST :if (n %3 !=0 ) {DRM_ERROR ("wrong number of indices %u in TRILIST\n" , n);
Signature · 1 line
2.20.1
Quoted 10 lines · Gustavo A. R. Silva
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=]
Quoted 6 lines
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 <[email protected]>
This and the via patch merged to drm-misc-next, thanks. -Daniel
Quoted 43 lines
--- drivers/gpu/drm/savage/savage_state.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/savage/savage_state.c +4
-0@@ -299,6 +299,7 @@ static int savage_dispatch_dma_prim(drm_savage_private_t * dev_priv,case SAVAGE_PRIM_TRILIST_201 : reorder =1 ; prim =SAVAGE_PRIM_TRILIST ; +/* fall through */ case SAVAGE_PRIM_TRILIST :if (n %3 !=0 ) { 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,case SAVAGE_PRIM_TRILIST_201 : reorder =1 ; prim =SAVAGE_PRIM_TRILIST ; +/* fall through */ case SAVAGE_PRIM_TRILIST :if (n %3 !=0 ) { 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,case SAVAGE_PRIM_TRILIST_201 : reorder =1 ; prim =SAVAGE_PRIM_TRILIST ; +/* fall through */ case SAVAGE_PRIM_TRILIST :if (n %3 !=0 ) {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,case SAVAGE_PRIM_TRILIST_201 : reorder =1 ; prim =SAVAGE_PRIM_TRILIST ; +/* fall through */ case SAVAGE_PRIM_TRILIST :if (n %3 !=0 ) {DRM_ERROR ("wrong number of indices %u in TRILIST\n" , n);Signature · 1 line
2.20.1
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Quoted 13 lines · Daniel Vetter
Quoted 12 lines · Gustavo A. R. Silva
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
Quoted 8 lines
Quoted 4 lines
This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>This and the via patch merged to drm-misc-next, thanks. -Daniel
Daniel,
I wonder if you can take this one too:
https://lore.kernel.org/patchwork/patch/1001180/
Thanks
--
Gustavo