Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bpf, arm64: Simplify if logic in emit_lse_atomic()

Delete that unnecessary outer if clause. No functional change.

Signed-off-by: Peilin Ye <yepeilin@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Xu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/bpf/e8520e5503a489e2dea8526077976ae5a0ab1849.1735868489.git.yepeilin@google.com

authored by

Peilin Ye and committed by
Daniel Borkmann
0a580721 73b9075f

+8 -10
+8 -10
arch/arm64/net/bpf_jit_comp.c
··· 648 648 const s16 off = insn->off; 649 649 u8 reg = dst; 650 650 651 - if (off || arena) { 652 - if (off) { 653 - emit_a64_mov_i(1, tmp, off, ctx); 654 - emit(A64_ADD(1, tmp, tmp, dst), ctx); 655 - reg = tmp; 656 - } 657 - if (arena) { 658 - emit(A64_ADD(1, tmp, reg, arena_vm_base), ctx); 659 - reg = tmp; 660 - } 651 + if (off) { 652 + emit_a64_mov_i(1, tmp, off, ctx); 653 + emit(A64_ADD(1, tmp, tmp, dst), ctx); 654 + reg = tmp; 655 + } 656 + if (arena) { 657 + emit(A64_ADD(1, tmp, reg, arena_vm_base), ctx); 658 + reg = tmp; 661 659 } 662 660 663 661 switch (insn->imm) {