]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bpf: Remove an unused parameter in check_func_proto
authorSong Chen <chensong_2000@189.cn>
Mon, 5 Jan 2026 15:50:09 +0000 (23:50 +0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Tue, 13 Jan 2026 18:00:15 +0000 (10:00 -0800)
The func_id parameter is not needed in check_func_proto.
This patch removes it.

Signed-off-by: Song Chen <chensong_2000@189.cn>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://patch.msgid.link/20260105155009.4581-1-chensong_2000@189.cn
kernel/bpf/verifier.c

index 9d3ad2876d8f2491b8be142f57e951b448dc3bc2..092003cc784175512d9a8cee269b87073af6e32d 100644 (file)
@@ -10346,7 +10346,7 @@ static bool check_btf_id_ok(const struct bpf_func_proto *fn)
        return true;
 }
 
-static int check_func_proto(const struct bpf_func_proto *fn, int func_id)
+static int check_func_proto(const struct bpf_func_proto *fn)
 {
        return check_raw_mode_ok(fn) &&
               check_arg_pair_ok(fn) &&
@@ -11521,7 +11521,7 @@ static int check_helper_call(struct bpf_verifier_env *env, struct bpf_insn *insn
        memset(&meta, 0, sizeof(meta));
        meta.pkt_access = fn->pkt_access;
 
-       err = check_func_proto(fn, func_id);
+       err = check_func_proto(fn);
        if (err) {
                verifier_bug(env, "incorrect func proto %s#%d", func_id_name(func_id), func_id);
                return err;