linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] bpf: verifier: Use fallthrough pseudo-keyword
@ 2020-10-02 23:42 Gustavo A. R. Silva
  2020-10-03  2:41 ` Yonghong Song
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2020-10-02 23:42 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, Andrii Nakryiko, John Fastabend, KP Singh
  Cc: netdev, bpf, linux-kernel, Gustavo A. R. Silva, linux-hardening

Replace /* fallthrough */ comments with the new pseudo-keyword macro
fallthrough[1].

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 kernel/bpf/verifier.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 015a1c074b6b..fcef04b80b66 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -2667,7 +2667,7 @@ static bool may_access_direct_pkt_data(struct bpf_verifier_env *env,
 	case BPF_PROG_TYPE_CGROUP_SKB:
 		if (t == BPF_WRITE)
 			return false;
-		/* fallthrough */
+		fallthrough;
 
 	/* Program types with direct read + write access go here! */
 	case BPF_PROG_TYPE_SCHED_CLS:
@@ -5432,7 +5432,7 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,
 		/* smin_val represents the known value */
 		if (known && smin_val == 0 && opcode == BPF_ADD)
 			break;
-		/* fall-through */
+		fallthrough;
 	case PTR_TO_PACKET_END:
 	case PTR_TO_SOCKET:
 	case PTR_TO_SOCKET_OR_NULL:
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][next] bpf: verifier: Use fallthrough pseudo-keyword
  2020-10-02 23:42 [PATCH][next] bpf: verifier: Use fallthrough pseudo-keyword Gustavo A. R. Silva
@ 2020-10-03  2:41 ` Yonghong Song
  0 siblings, 0 replies; 2+ messages in thread
From: Yonghong Song @ 2020-10-03  2:41 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Andrii Nakryiko, John Fastabend,
	KP Singh
  Cc: netdev, bpf, linux-kernel, linux-hardening



On 10/2/20 4:42 PM, Gustavo A. R. Silva wrote:
> Replace /* fallthrough */ comments with the new pseudo-keyword macro
> fallthrough[1].
> 
> [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
> 
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Acked-by: Yonghong Song <yhs@fb.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-03  2:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 23:42 [PATCH][next] bpf: verifier: Use fallthrough pseudo-keyword Gustavo A. R. Silva
2020-10-03  2:41 ` Yonghong Song

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).