]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bpf: Simplify assignment to struct bpf_insn pointer in do_misc_fixups()
authorYonghong Song <yonghong.song@linux.dev>
Thu, 3 Jul 2025 14:11:06 +0000 (07:11 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 4 Jul 2025 02:31:29 +0000 (19:31 -0700)
commit3b87251439b2abf207b9b2cc03bf8d29ae6bb257
tree25fb84165e97c88b24c5a28f258a7dc84bb9d3d5
parent032547272eb0884470165e6a8fd73b80688e847f
bpf: Simplify assignment to struct bpf_insn pointer in do_misc_fixups()

In verifier.c, the following code patterns (in two places)
  struct bpf_insn *patch = &insn_buf[0];
can be simplified to
  struct bpf_insn *patch = insn_buf;
which is easier to understand.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20250703141106.1483216-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c