drm/drm_vm: Mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Fri, 15 Feb 2019 17:05:46 +0000 (11:05 -0600)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 19 Feb 2019 11:20:41 +0000 (12:20 +0100)
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.

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/20190215170546.GA30950@embeddedor
drivers/gpu/drm/drm_vm.c

index c3301046dfaa54d898198056dfb0631a9afb1b86..8987501f53b28e5334953cba645a22aa5a367f10 100644 (file)
@@ -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;