diff mbox series

[bpf-next] bpf: change 'BPF_ADD' to 'BPF_AND' in print_bpf_insn()

Message ID 20210127022507.23674-1-dong.menglong@zte.com.cn (mailing list archive)
State Accepted
Commit 60e578e82b7d73fbd9a0966e8fc70a95d8e12e13
Delegated to: BPF
Headers show
Series [bpf-next] bpf: change 'BPF_ADD' to 'BPF_AND' in print_bpf_insn() | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for bpf-next
netdev/subject_prefix success Link
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Menglong Dong Jan. 27, 2021, 2:25 a.m. UTC
From: Menglong Dong <dong.menglong@zte.com.cn>

This 'BPF_ADD' is duplicated, and I belive it should be 'BPF_AND'.

Fixes: 981f94c3e921 ("bpf: Add bitwise atomic instructions")
Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
---
 kernel/bpf/disasm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Brendan Jackman Jan. 27, 2021, 11:53 a.m. UTC | #1
Thanks!

On Wed, 27 Jan 2021 at 03:25, <menglong8.dong@gmail.com> wrote:
>
> From: Menglong Dong <dong.menglong@zte.com.cn>
>
> This 'BPF_ADD' is duplicated, and I belive it should be 'BPF_AND'.
>
> Fixes: 981f94c3e921 ("bpf: Add bitwise atomic instructions")
> Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>

Acked-by: Brendan Jackman <jackmanb@google.com>

> ---
>  kernel/bpf/disasm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/bpf/disasm.c b/kernel/bpf/disasm.c
> index 19ff8fed7f4b..3acc7e0b6916 100644
> --- a/kernel/bpf/disasm.c
> +++ b/kernel/bpf/disasm.c
> @@ -161,7 +161,7 @@ void print_bpf_insn(const struct bpf_insn_cbs *cbs,
>                                 insn->dst_reg,
>                                 insn->off, insn->src_reg);
>                 else if (BPF_MODE(insn->code) == BPF_ATOMIC &&
> -                        (insn->imm == BPF_ADD || insn->imm == BPF_ADD ||
> +                        (insn->imm == BPF_ADD || insn->imm == BPF_AND ||
>                           insn->imm == BPF_OR || insn->imm == BPF_XOR)) {
>                         verbose(cbs->private_data, "(%02x) lock *(%s *)(r%d %+d) %s r%d\n",
>                                 insn->code,
> --
> 2.25.1
>
patchwork-bot+netdevbpf@kernel.org Jan. 27, 2021, 9:30 p.m. UTC | #2
Hello:

This patch was applied to bpf/bpf-next.git (refs/heads/master):

On Tue, 26 Jan 2021 18:25:07 -0800 you wrote:
> From: Menglong Dong <dong.menglong@zte.com.cn>
> 
> This 'BPF_ADD' is duplicated, and I belive it should be 'BPF_AND'.
> 
> Fixes: 981f94c3e921 ("bpf: Add bitwise atomic instructions")
> Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
> 
> [...]

Here is the summary with links:
  - [bpf-next] bpf: change 'BPF_ADD' to 'BPF_AND' in print_bpf_insn()
    https://git.kernel.org/bpf/bpf-next/c/60e578e82b7d

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/kernel/bpf/disasm.c b/kernel/bpf/disasm.c
index 19ff8fed7f4b..3acc7e0b6916 100644
--- a/kernel/bpf/disasm.c
+++ b/kernel/bpf/disasm.c
@@ -161,7 +161,7 @@  void print_bpf_insn(const struct bpf_insn_cbs *cbs,
 				insn->dst_reg,
 				insn->off, insn->src_reg);
 		else if (BPF_MODE(insn->code) == BPF_ATOMIC &&
-			 (insn->imm == BPF_ADD || insn->imm == BPF_ADD ||
+			 (insn->imm == BPF_ADD || insn->imm == BPF_AND ||
 			  insn->imm == BPF_OR || insn->imm == BPF_XOR)) {
 			verbose(cbs->private_data, "(%02x) lock *(%s *)(r%d %+d) %s r%d\n",
 				insn->code,