From: Ilya Dryomov <idryomov@gmail.com>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Jeff Layton <jlayton@kernel.org>,
Ceph Development <ceph-devel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH RESEND][next] ceph: Fix fall-through warnings for Clang
Date: Fri, 5 Mar 2021 15:07:08 +0100 [thread overview]
Message-ID: <CAOi1vP8UFriFYzzkHs9HQFw=AjJyLayaMfZ2LGJuCoie+FeYaQ@mail.gmail.com> (raw)
In-Reply-To: <20210305095923.GA142236@embeddedor>
On Fri, Mar 5, 2021 at 10:59 AM Gustavo A. R. Silva
<gustavoars@kernel.org> wrote:
>
> In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple
> of warnings by explicitly adding a break and a goto statements instead
> of just letting the code fall through to the next case.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> fs/ceph/dir.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
> index 83d9358854fb..3e575656713e 100644
> --- a/fs/ceph/dir.c
> +++ b/fs/ceph/dir.c
> @@ -631,10 +631,12 @@ static loff_t ceph_dir_llseek(struct file *file, loff_t offset, int whence)
> switch (whence) {
> case SEEK_CUR:
> offset += file->f_pos;
> + break;
> case SEEK_SET:
> break;
> case SEEK_END:
> retval = -EOPNOTSUPP;
> + goto out;
> default:
> goto out;
> }
> --
> 2.27.0
>
Applied.
Thanks,
Ilya
prev parent reply other threads:[~2021-03-05 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-05 9:59 [PATCH RESEND][next] ceph: Fix fall-through warnings for Clang Gustavo A. R. Silva
2021-03-05 14:07 ` Ilya Dryomov [this message]
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='CAOi1vP8UFriFYzzkHs9HQFw=AjJyLayaMfZ2LGJuCoie+FeYaQ@mail.gmail.com' \
--to=idryomov@gmail.com \
--cc=ceph-devel@vger.kernel.org \
--cc=gustavoars@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).