All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ruan Jinjie <ruanjinjie@huawei.com>
To: <Ast@kernel.org>, <Daniel@iogearbox.net>, <Andrii@kernel.org>,
	<Martin.lau@linux.dev>, <Song@kernel.org>,
	<Yonghong.song@linux.dev>, <John.fastabend@gmail.com>,
	<Kpsingh@kernel.org>, <Sdf@google.com>, <Haoluo@google.com>,
	<Jolsa@kernel.org>, <Mykolal@fb.com>, <Shuah@kernel.org>,
	<Benjamin.tissoires@redhat.com>, <Asavkov@redhat.com>,
	<Memxor@gmail.com>, <Iii@linux.ibm.com>, <Colin.i.king@gmail.com>,
	<Awkrail01@gmail.com>, <Rdunlap@infradead.org>,
	<Joannelkoong@gmail.com>, <bpf@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>
Cc: <ruanjinjie@huawei.com>
Subject: [PATCH -next v2] selftests/bpf: replace fall through comment by fallthrough pseudo-keyword
Date: Tue, 1 Aug 2023 14:54:47 +0800	[thread overview]
Message-ID: <20230801065447.3609130-1-ruanjinjie@huawei.com> (raw)

Replace the existing /* fall through */ 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: Ruan Jinjie <ruanjinjie@huawei.com>
---
v2:
- Update the subject and commit message.
---
 tools/testing/selftests/bpf/prog_tests/kfunc_call.c          | 4 ++--
 tools/testing/selftests/bpf/progs/test_cls_redirect.c        | 2 +-
 tools/testing/selftests/bpf/progs/test_cls_redirect_dynptr.c | 2 +-
 tools/testing/selftests/bpf/test_verifier.c                  | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/kfunc_call.c b/tools/testing/selftests/bpf/prog_tests/kfunc_call.c
index a543742cd7bd..0fd08172965a 100644
--- a/tools/testing/selftests/bpf/prog_tests/kfunc_call.c
+++ b/tools/testing/selftests/bpf/prog_tests/kfunc_call.c
@@ -101,7 +101,7 @@ static void verify_success(struct kfunc_test_params *param)
 	case syscall_test:
 		topts.ctx_in = &args;
 		topts.ctx_size_in = sizeof(args);
-		/* fallthrough */
+		fallthrough;
 	case syscall_null_ctx_test:
 		break;
 	case tc_test:
@@ -167,7 +167,7 @@ static void verify_fail(struct kfunc_test_params *param)
 	case syscall_test:
 		topts.ctx_in = &args;
 		topts.ctx_size_in = sizeof(args);
-		/* fallthrough */
+		fallthrough;
 	case syscall_null_ctx_test:
 		break;
 	case tc_test:
diff --git a/tools/testing/selftests/bpf/progs/test_cls_redirect.c b/tools/testing/selftests/bpf/progs/test_cls_redirect.c
index 66b304982245..f97960759558 100644
--- a/tools/testing/selftests/bpf/progs/test_cls_redirect.c
+++ b/tools/testing/selftests/bpf/progs/test_cls_redirect.c
@@ -300,7 +300,7 @@ bool pkt_skip_ipv6_extension_headers(buf_t *pkt,
 		case IPPROTO_FRAGMENT:
 			*is_fragment = true;
 			/* NB: We don't check that hdrlen == 0 as per spec. */
-			/* fallthrough; */
+			fallthrough;
 
 		case IPPROTO_HOPOPTS:
 		case IPPROTO_ROUTING:
diff --git a/tools/testing/selftests/bpf/progs/test_cls_redirect_dynptr.c b/tools/testing/selftests/bpf/progs/test_cls_redirect_dynptr.c
index f41c81212ee9..54dbf307c692 100644
--- a/tools/testing/selftests/bpf/progs/test_cls_redirect_dynptr.c
+++ b/tools/testing/selftests/bpf/progs/test_cls_redirect_dynptr.c
@@ -204,7 +204,7 @@ static bool pkt_skip_ipv6_extension_headers(struct bpf_dynptr *dynptr, __u64 *of
 		case IPPROTO_FRAGMENT:
 			*is_fragment = true;
 			/* NB: We don't check that hdrlen == 0 as per spec. */
-			/* fallthrough; */
+			fallthrough;
 
 		case IPPROTO_HOPOPTS:
 		case IPPROTO_ROUTING:
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index 31f1c935cd07..5621a4e0a1be 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -1289,7 +1289,7 @@ static int do_prog_test_run(int fd_prog, bool unpriv, uint32_t expected_val,
 				printf("Did not run the program (no permission) ");
 				return 0;
 			}
-			/* fallthrough; */
+			fallthrough;
 		default:
 			printf("FAIL: Unexpected bpf_prog_test_run error (%s) ",
 				strerror(saved_errno));
-- 
2.34.1


             reply	other threads:[~2023-08-01  6:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01  6:54 Ruan Jinjie [this message]
2023-08-01  7:38 ` [PATCH -next v2] selftests/bpf: replace fall through comment by fallthrough pseudo-keyword Hou Tao
2023-08-01  8:17   ` Ruan Jinjie
2023-08-01  7:47 ` Artem Savkov
2023-08-01  8:17   ` Ruan Jinjie

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=20230801065447.3609130-1-ruanjinjie@huawei.com \
    --to=ruanjinjie@huawei.com \
    --cc=Andrii@kernel.org \
    --cc=Asavkov@redhat.com \
    --cc=Ast@kernel.org \
    --cc=Awkrail01@gmail.com \
    --cc=Benjamin.tissoires@redhat.com \
    --cc=Colin.i.king@gmail.com \
    --cc=Daniel@iogearbox.net \
    --cc=Haoluo@google.com \
    --cc=Iii@linux.ibm.com \
    --cc=Joannelkoong@gmail.com \
    --cc=John.fastabend@gmail.com \
    --cc=Jolsa@kernel.org \
    --cc=Kpsingh@kernel.org \
    --cc=Martin.lau@linux.dev \
    --cc=Memxor@gmail.com \
    --cc=Mykolal@fb.com \
    --cc=Rdunlap@infradead.org \
    --cc=Sdf@google.com \
    --cc=Shuah@kernel.org \
    --cc=Song@kernel.org \
    --cc=Yonghong.song@linux.dev \
    --cc=bpf@vger.kernel.org \
    --cc=linux-kselftest@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.