* [PATCH] selftests/bpf: Convert comma to semicolon
@ 2025-03-10 3:20 Chen Ni
2025-03-10 8:09 ` Anton Protopopov
2025-03-11 0:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 6+ messages in thread
From: Chen Ni @ 2025-03-10 3:20 UTC (permalink / raw)
To: andrii, eddyz87, mykolal, ast, daniel, martin.lau, song,
yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa, shuah,
aspsk, bpf, linux-kselftest, linux-kernel
Cc: Chen Ni
Replace comma between expressions with semicolons.
Using a ',' in place of a ';' can have unintended side effects.
Although that is not the case here, it is seems best to use ';'
unless ',' is intended.
Found by inspection.
No functional change intended.
Compile tested only.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
tools/testing/selftests/bpf/prog_tests/fd_array.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/fd_array.c b/tools/testing/selftests/bpf/prog_tests/fd_array.c
index a1d52e73fb16..9add890c2d37 100644
--- a/tools/testing/selftests/bpf/prog_tests/fd_array.c
+++ b/tools/testing/selftests/bpf/prog_tests/fd_array.c
@@ -83,8 +83,8 @@ static inline int bpf_prog_get_map_ids(int prog_fd, __u32 *nr_map_ids, __u32 *ma
int err;
memset(&info, 0, len);
- info.nr_map_ids = *nr_map_ids,
- info.map_ids = ptr_to_u64(map_ids),
+ info.nr_map_ids = *nr_map_ids;
+ info.map_ids = ptr_to_u64(map_ids);
err = bpf_prog_get_info_by_fd(prog_fd, &info, &len);
if (!ASSERT_OK(err, "bpf_prog_get_info_by_fd"))
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] selftests/bpf: Convert comma to semicolon
2025-03-10 3:20 [PATCH] selftests/bpf: Convert comma to semicolon Chen Ni
@ 2025-03-10 8:09 ` Anton Protopopov
2025-03-11 0:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: Anton Protopopov @ 2025-03-10 8:09 UTC (permalink / raw)
To: Chen Ni
Cc: andrii, eddyz87, mykolal, ast, daniel, martin.lau, song,
yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa, shuah,
bpf, linux-kselftest, linux-kernel
On 25/03/10 11:20AM, Chen Ni wrote:
> Replace comma between expressions with semicolons.
>
> Using a ',' in place of a ';' can have unintended side effects.
> Although that is not the case here, it is seems best to use ';'
> unless ',' is intended.
This is a typo, of course. Thanks!
> Found by inspection.
> No functional change intended.
> Compile tested only.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Acked-by: Anton Protopopov <aspsk@isovalent.com>
> ---
> tools/testing/selftests/bpf/prog_tests/fd_array.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/fd_array.c b/tools/testing/selftests/bpf/prog_tests/fd_array.c
> index a1d52e73fb16..9add890c2d37 100644
> --- a/tools/testing/selftests/bpf/prog_tests/fd_array.c
> +++ b/tools/testing/selftests/bpf/prog_tests/fd_array.c
> @@ -83,8 +83,8 @@ static inline int bpf_prog_get_map_ids(int prog_fd, __u32 *nr_map_ids, __u32 *ma
> int err;
>
> memset(&info, 0, len);
> - info.nr_map_ids = *nr_map_ids,
> - info.map_ids = ptr_to_u64(map_ids),
> + info.nr_map_ids = *nr_map_ids;
> + info.map_ids = ptr_to_u64(map_ids);
>
> err = bpf_prog_get_info_by_fd(prog_fd, &info, &len);
> if (!ASSERT_OK(err, "bpf_prog_get_info_by_fd"))
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] selftests/bpf: Convert comma to semicolon
2025-03-10 3:20 [PATCH] selftests/bpf: Convert comma to semicolon Chen Ni
2025-03-10 8:09 ` Anton Protopopov
@ 2025-03-11 0:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-03-11 0:00 UTC (permalink / raw)
To: Chen Ni
Cc: andrii, eddyz87, mykolal, ast, daniel, martin.lau, song,
yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa, shuah,
aspsk, bpf, linux-kselftest, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Mon, 10 Mar 2025 11:20:45 +0800 you wrote:
> Replace comma between expressions with semicolons.
>
> Using a ',' in place of a ';' can have unintended side effects.
> Although that is not the case here, it is seems best to use ';'
> unless ',' is intended.
>
> Found by inspection.
> No functional change intended.
> Compile tested only.
>
> [...]
Here is the summary with links:
- selftests/bpf: Convert comma to semicolon
https://git.kernel.org/bpf/bpf-next/c/233732b289f6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] selftests/bpf: Convert comma to semicolon
@ 2025-04-01 6:15 Chen Ni
2025-04-01 18:05 ` Amery Hung
2025-04-04 16:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 6+ messages in thread
From: Chen Ni @ 2025-04-01 6:15 UTC (permalink / raw)
To: andrii, eddyz87, mykolal, ast, daniel, martin.lau, song,
yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa, shuah,
mcoquelin.stm32, alexandre.torgue, peterz, ameryhung,
juntong.deng, oleg
Cc: bpf, linux-kselftest, linux-stm32, linux-arm-kernel, linux-kernel,
Chen Ni
Replace comma between expressions with semicolons.
Using a ',' in place of a ';' can have unintended side effects.
Although that is not the case here, it is seems best to use ';'
unless ',' is intended.
Found by inspection.
No functional change intended.
Compile tested only.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
tools/testing/selftests/bpf/test_kmods/bpf_testmod.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
index 3220f1d28697..f38eaf0d35ef 100644
--- a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
+++ b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
@@ -1340,7 +1340,7 @@ static int st_ops_gen_prologue_with_kfunc(struct bpf_insn *insn_buf, bool direct
*insn++ = BPF_STX_MEM(BPF_DW, BPF_REG_6, BPF_REG_7, offsetof(struct st_ops_args, a));
*insn++ = BPF_JMP_IMM(BPF_JA, 0, 0, 2);
*insn++ = BPF_MOV64_REG(BPF_REG_1, BPF_REG_0);
- *insn++ = BPF_CALL_KFUNC(0, bpf_cgroup_release_id),
+ *insn++ = BPF_CALL_KFUNC(0, bpf_cgroup_release_id);
*insn++ = BPF_MOV64_REG(BPF_REG_1, BPF_REG_8);
*insn++ = prog->insnsi[0];
@@ -1379,7 +1379,7 @@ static int st_ops_gen_epilogue_with_kfunc(struct bpf_insn *insn_buf, const struc
*insn++ = BPF_STX_MEM(BPF_DW, BPF_REG_1, BPF_REG_6, offsetof(struct st_ops_args, a));
*insn++ = BPF_JMP_IMM(BPF_JA, 0, 0, 2);
*insn++ = BPF_MOV64_REG(BPF_REG_1, BPF_REG_0);
- *insn++ = BPF_CALL_KFUNC(0, bpf_cgroup_release_id),
+ *insn++ = BPF_CALL_KFUNC(0, bpf_cgroup_release_id);
*insn++ = BPF_MOV64_REG(BPF_REG_0, BPF_REG_6);
*insn++ = BPF_ALU64_IMM(BPF_MUL, BPF_REG_0, 2);
*insn++ = BPF_EXIT_INSN();
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] selftests/bpf: Convert comma to semicolon
2025-04-01 6:15 Chen Ni
@ 2025-04-01 18:05 ` Amery Hung
2025-04-04 16:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: Amery Hung @ 2025-04-01 18:05 UTC (permalink / raw)
To: Chen Ni
Cc: andrii, eddyz87, mykolal, ast, daniel, martin.lau, song,
yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa, shuah,
mcoquelin.stm32, alexandre.torgue, peterz, juntong.deng, oleg,
bpf, linux-kselftest, linux-stm32, linux-arm-kernel, linux-kernel
On Mon, Mar 31, 2025 at 11:17 PM Chen Ni <nichen@iscas.ac.cn> wrote:
>
> Replace comma between expressions with semicolons.
>
> Using a ',' in place of a ';' can have unintended side effects.
> Although that is not the case here, it is seems best to use ';'
> unless ',' is intended.
>
> Found by inspection.
> No functional change intended.
> Compile tested only.
>
Oopsie. Thanks for fixing it.
Reviewed-by: Amery Hung <ameryhung@gmail.com>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> tools/testing/selftests/bpf/test_kmods/bpf_testmod.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> index 3220f1d28697..f38eaf0d35ef 100644
> --- a/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> +++ b/tools/testing/selftests/bpf/test_kmods/bpf_testmod.c
> @@ -1340,7 +1340,7 @@ static int st_ops_gen_prologue_with_kfunc(struct bpf_insn *insn_buf, bool direct
> *insn++ = BPF_STX_MEM(BPF_DW, BPF_REG_6, BPF_REG_7, offsetof(struct st_ops_args, a));
> *insn++ = BPF_JMP_IMM(BPF_JA, 0, 0, 2);
> *insn++ = BPF_MOV64_REG(BPF_REG_1, BPF_REG_0);
> - *insn++ = BPF_CALL_KFUNC(0, bpf_cgroup_release_id),
> + *insn++ = BPF_CALL_KFUNC(0, bpf_cgroup_release_id);
> *insn++ = BPF_MOV64_REG(BPF_REG_1, BPF_REG_8);
> *insn++ = prog->insnsi[0];
>
> @@ -1379,7 +1379,7 @@ static int st_ops_gen_epilogue_with_kfunc(struct bpf_insn *insn_buf, const struc
> *insn++ = BPF_STX_MEM(BPF_DW, BPF_REG_1, BPF_REG_6, offsetof(struct st_ops_args, a));
> *insn++ = BPF_JMP_IMM(BPF_JA, 0, 0, 2);
> *insn++ = BPF_MOV64_REG(BPF_REG_1, BPF_REG_0);
> - *insn++ = BPF_CALL_KFUNC(0, bpf_cgroup_release_id),
> + *insn++ = BPF_CALL_KFUNC(0, bpf_cgroup_release_id);
> *insn++ = BPF_MOV64_REG(BPF_REG_0, BPF_REG_6);
> *insn++ = BPF_ALU64_IMM(BPF_MUL, BPF_REG_0, 2);
> *insn++ = BPF_EXIT_INSN();
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] selftests/bpf: Convert comma to semicolon
2025-04-01 6:15 Chen Ni
2025-04-01 18:05 ` Amery Hung
@ 2025-04-04 16:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-04 16:00 UTC (permalink / raw)
To: Chen Ni
Cc: andrii, eddyz87, mykolal, ast, daniel, martin.lau, song,
yonghong.song, john.fastabend, kpsingh, sdf, haoluo, jolsa, shuah,
mcoquelin.stm32, alexandre.torgue, peterz, ameryhung,
juntong.deng, oleg, bpf, linux-kselftest, linux-stm32,
linux-arm-kernel, linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Tue, 1 Apr 2025 14:15:46 +0800 you wrote:
> Replace comma between expressions with semicolons.
>
> Using a ',' in place of a ';' can have unintended side effects.
> Although that is not the case here, it is seems best to use ';'
> unless ',' is intended.
>
> Found by inspection.
> No functional change intended.
> Compile tested only.
>
> [...]
Here is the summary with links:
- selftests/bpf: Convert comma to semicolon
https://git.kernel.org/bpf/bpf-next/c/c9661394850d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-04-04 15:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 3:20 [PATCH] selftests/bpf: Convert comma to semicolon Chen Ni
2025-03-10 8:09 ` Anton Protopopov
2025-03-11 0:00 ` patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2025-04-01 6:15 Chen Ni
2025-04-01 18:05 ` Amery Hung
2025-04-04 16:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox