drm/drm_vm: Mark expected switch fall-throughs
Subsystems (2)
PATCH 1/1 drm/drm_vm: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Warning level 3 was used: -Wimplicit-fallthrough=3
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
--- drivers/gpu/drm/drm_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_vm.c +2 -2
@@ -584,8 +584,8 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) vma->vm_ops = &drm_vm_ops; break; } -/* fall through to _DRM_FRAME_BUFFER... */ #endif +/* fall through - to _DRM_FRAME_BUFFER... */ case _DRM_FRAME_BUFFER:case _DRM_REGISTERS: offset =drm_core_get_reg_ofs (dev);
@@ -610,7 +610,7 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) vma->vm_end - vma->vm_start, vma->vm_page_prot))return -EAGAIN ; vma->vm_page_prot =drm_dma_prot (map->type, vma); -/* fall through to _DRM_SHM */ +/* fall through - to _DRM_SHM */ case _DRM_SHM: vma->vm_ops = &drm_vm_shm_ops; vma->vm_private_data = (void *)map;
Signature · 1 line
2.20.1
Daniel Vetter
AppliedQuoted 5 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Warning level 3 was used: -Wimplicit-fallthrough=3
Quoted 7 lines
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>
Queued for 5.2, thanks for your patch.
-Daniel
Quoted 30 lines
--- drivers/gpu/drm/drm_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_vm.c +2
-2@@ -584,8 +584,8 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) vma->vm_ops = &drm_vm_ops; break; } -/* fall through to _DRM_FRAME_BUFFER... */ #endif +/* fall through - to _DRM_FRAME_BUFFER... */ case _DRM_FRAME_BUFFER:case _DRM_REGISTERS: offset =drm_core_get_reg_ofs (dev);@@ -610,7 +610,7 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) vma->vm_end - vma->vm_start, vma->vm_page_prot))return -EAGAIN ; vma->vm_page_prot =drm_dma_prot (map->type, vma); -/* fall through to _DRM_SHM */ +/* fall through - to _DRM_SHM */ case _DRM_SHM: vma->vm_ops = &drm_vm_shm_ops; vma->vm_private_data = (void *)map;Signature · 1 line
2.20.1
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Hi Daniel,
Quoted 9 lines · Daniel Vetter
Quoted 8 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Warning level 3 was used: -Wimplicit-fallthrough=3
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
Quoted 8 lines
Quoted 4 lines
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>Queued for 5.2, thanks for your patch.
-Daniel
I wonder if you could take this one too, or give me some feedback about it:
https://patchwork.kernel.org/patch/10646783/
I've pinged twice, but I haven't received any responses.
Thanks
--
Gustavo
Quoted 22 lines · Gustavo A. R. Silva
Hi Daniel,
Quoted 9 lines · Daniel Vetter
Quoted 8 lines · Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.
Warning level 3 was used: -Wimplicit-fallthrough=3
Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find.
Quoted 8 lines
Quoted 4 lines
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>Queued for 5.2, thanks for your patch.
-Daniel
Quoted 6 lines
I wonder if you could take this one too, or give me some feedback about it:
https://patchwork.kernel.org/patch/10646783/
I've pinged twice, but I haven't received any responses.
Dave? nouveau is kinda your thing, at least all the fallout :-) -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel