From: Daniel Vetter <daniel@ffwll.ch>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <maxime.ripard@bootlin.com>,
Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] drm/drm_vm: Mark expected switch fall-throughs
Date: Mon, 18 Feb 2019 09:57:01 +0100 [thread overview]
Message-ID: <20190218085701.GR2665@phenom.ffwll.local> (raw)
In-Reply-To: <20190215170546.GA30950@embeddedor>
On Fri, Feb 15, 2019 at 11:05:46AM -0600, Gustavo A. R. Silva wrote:
> 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>
Queued for 5.2, thanks for your patch.
-Daniel
> ---
> drivers/gpu/drm/drm_vm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
> index c3301046dfaa..8987501f53b2 100644
> --- a/drivers/gpu/drm/drm_vm.c
> +++ b/drivers/gpu/drm/drm_vm.c
> @@ -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;
> --
> 2.20.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2019-02-18 8:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-15 17:05 [PATCH] drm/drm_vm: Mark expected switch fall-throughs Gustavo A. R. Silva
2019-02-18 8:57 ` Daniel Vetter [this message]
2019-02-18 18:02 ` Gustavo A. R. Silva
2019-02-18 18:58 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190218085701.GR2665@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@embeddedor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=maxime.ripard@bootlin.com \
--cc=sean@poorly.run \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox