linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [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; 3+ 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] 3+ messages in thread

* Re: [PATCH] selftests/bpf: Convert comma to semicolon
  2025-04-01  6:15 [PATCH] selftests/bpf: Convert comma to semicolon Chen Ni
@ 2025-04-01 18:05 ` Amery Hung
  2025-04-04 16:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ 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] 3+ messages in thread

* Re: [PATCH] selftests/bpf: Convert comma to semicolon
  2025-04-01  6:15 [PATCH] selftests/bpf: Convert comma to semicolon Chen Ni
  2025-04-01 18:05 ` Amery Hung
@ 2025-04-04 16:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2025-04-04 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01  6:15 [PATCH] selftests/bpf: Convert comma to semicolon 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;
as well as URLs for NNTP newsgroup(s).