All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Alexander Alemayhu <alexander@alemayhu.com>, netdev@vger.kernel.org
Cc: ast@kernel.org, brouer@redhat.com, dcb314@hotmail.com, jbacik@fb.com
Subject: Re: [PATCH] bpf: reduce compiler warnings by adding fallthrough comments
Date: Tue, 14 Feb 2017 00:18:05 +0100	[thread overview]
Message-ID: <58A23EAD.6040800@iogearbox.net> (raw)
In-Reply-To: <20170213230235.12677-1-alexander@alemayhu.com>

On 02/14/2017 12:02 AM, Alexander Alemayhu wrote:
> Fixes the following warnings:
>
> kernel/bpf/verifier.c: In function ‘may_access_direct_pkt_data’:
> kernel/bpf/verifier.c:702:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     if (t == BPF_WRITE)
>        ^
> kernel/bpf/verifier.c:704:2: note: here
>    case BPF_PROG_TYPE_SCHED_CLS:
>    ^~~~
> kernel/bpf/verifier.c: In function ‘reg_set_min_max_inv’:
> kernel/bpf/verifier.c:2057:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     true_reg->min_value = 0;
>     ~~~~~~~~~~~~~~~~~~~~^~~
> kernel/bpf/verifier.c:2058:2: note: here
>    case BPF_JSGT:
>    ^~~~
> kernel/bpf/verifier.c:2068:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     true_reg->min_value = 0;
>     ~~~~~~~~~~~~~~~~~~~~^~~
> kernel/bpf/verifier.c:2069:2: note: here
>    case BPF_JSGE:
>    ^~~~
> kernel/bpf/verifier.c: In function ‘reg_set_min_max’:
> kernel/bpf/verifier.c:2009:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     false_reg->min_value = 0;
>     ~~~~~~~~~~~~~~~~~~~~~^~~
> kernel/bpf/verifier.c:2010:2: note: here
>    case BPF_JSGT:
>    ^~~~
> kernel/bpf/verifier.c:2019:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     false_reg->min_value = 0;
>     ~~~~~~~~~~~~~~~~~~~~~^~~
> kernel/bpf/verifier.c:2020:2: note: here
>    case BPF_JSGE:
>    ^~~~
>
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>

These fall-through comments are fine for net-next tree.

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

  reply	other threads:[~2017-02-13 23:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 23:02 [PATCH] bpf: reduce compiler warnings by adding fallthrough comments Alexander Alemayhu
2017-02-13 23:18 ` Daniel Borkmann [this message]
2017-02-14  0:00   ` Alexei Starovoitov
2017-02-14 19:32 ` David Miller

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=58A23EAD.6040800@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexander@alemayhu.com \
    --cc=ast@kernel.org \
    --cc=brouer@redhat.com \
    --cc=dcb314@hotmail.com \
    --cc=jbacik@fb.com \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.