Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2299322iob; Thu, 5 May 2022 22:26:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiMXA9+QalB+Ry94ACsR9Ua4IZncGP4UD8hIrbA35alscCZmF6llt0UQx24wL9P6WqDGyQ X-Received: by 2002:a17:903:230e:b0:15e:ce57:d66f with SMTP id d14-20020a170903230e00b0015ece57d66fmr1839090plh.35.1651814764727; Thu, 05 May 2022 22:26:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651814764; cv=none; d=google.com; s=arc-20160816; b=oYeTfn8mkrS/2+HA8ciAF6SayYLo39BxKZwd+M07392I/0YY50vGTCeT8zlcH+rDTN PU0mM5tGWZTja/RJro9HBPMGCahihkT6F63nwr/vdilsmb1C/CRXJK0hXEMR9osiR0CN 4KM986lOnNqi2FLCKAoK875gOUWdg26MJ0y2qTQ1QBNHGac7+SW6O/NiJuEGylbT3PWy u+eBRClL2nke6GtG7H5IWqoHDhcmYosxcJDLBBhVtM5hm07yfZNA9iHYLSxl31x7AcwS D9xGgVyL+Z8DsXeo2JnAec4JuY6L8vkq1RokCS241SSpbjq9wI2sKpwRKUy/cw/yjs1Y XaaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=oEvUp+vyk+kyHOCOgG5usVRVDzAYyII5UrneuqC2py4=; b=g0cZIGUP1nGz7qJM5VbPo9tYB1vJJ3miz//xpsReQaH0/q9sYhXP2yMMDBKfh+9u6Y lZCPcd0xMYG8a9f+i2vOvbyJiKNUc8Pn1JPFn9AxV5EcRXu1er2U4o170UTU+uCmkbJL Im4s9OPuPY8drVBEJMSvKFcjerS4XPv5e30XCXrVc55LtuyoMzflYJKxOvit+5kHxw8K Yhc89eCoWssrp7dWRvYOR/qgp1icef3oMu4z9HcmZgIZnLewCkEOdSJNkjCSNdsHxYrD 8j59VAi6rVi93ISuSYnGgoGGqhZaaMhjUBGOXe74hSAiAevUTfGR2g/nT/O86/I/bdKD nXRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hu5dI2n2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y39-20020a056a00182700b004f70dcc690csi4323505pfa.1.2022.05.05.22.25.50; Thu, 05 May 2022 22:26:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hu5dI2n2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245443AbiEEHFQ (ORCPT + 99 others); Thu, 5 May 2022 03:05:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245404AbiEEHFN (ORCPT ); Thu, 5 May 2022 03:05:13 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AA62434BE; Thu, 5 May 2022 00:01:35 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id g3so2983280pgg.3; Thu, 05 May 2022 00:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oEvUp+vyk+kyHOCOgG5usVRVDzAYyII5UrneuqC2py4=; b=hu5dI2n2abFL5Y/r9WUshvPOufEMDyAeODTu4+O1ig0EQwvbOtz8MVQeTUC0OPTg7l LiLUmbi+zV3CvgNbMX6uErOp51yu+q1lcktssO6ivbgVZDsi0qdgJGGXQ1XMybSJzUPv OrcKgubG8Rd01IsLd1pb4E4Hokyjj68ccJh992BcKqCu0QpliUXSjfmXhjDS44atZwuJ tDZZuu0Wbl3IJXncYzJQnsCE6uX3pUnm8zSmuTnLVBDQZwfQja1mlytSusYCHwB7be1e Sj6zlVf1K1e8sIROdkS2TK3PEbTPaWYIk7qsJHWbfp/xPVZ52DBFOZvO7S5YYoy9sPSx RyzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oEvUp+vyk+kyHOCOgG5usVRVDzAYyII5UrneuqC2py4=; b=rV7B/WDzQoiu5ys5UDS3N2LfxLumrBzjisG7arys+5J7g95RPEjWg2Q5DlkNYl4FMQ WNBZPcsvnZby2vD68gFkTRz5sP5OLncGCYUjen8Yai6Lfrt55X7RsZMn8njWXPVD2p+X 75WifSpmMCfE89U2H4ZS2eskEACpPz1UoeCpeKbFa9ay2/yusIzYzLPHl+el7rEHQzDC 4+6CrZJcUeunvdUJi8UjbPc7X6q2Dd+k2bTMitKfP/Ls1lGoBmwFya++ikOdJRP8bxd4 /HYfI+2vBoL14evYQnufM7tfq5Asb/EIYXd3jqRwFMpWsuOGLGOtgQ7fTVTbnb01rgAP uomg== X-Gm-Message-State: AOAM53071a40xW/67MzGwSzamcqHx8erTlNmYVQHh4Lyqe81mIoO/j14 jPOa/2dTqzZ33RRhH0IJVt4= X-Received: by 2002:a63:570f:0:b0:39d:2648:261d with SMTP id l15-20020a63570f000000b0039d2648261dmr20550623pgb.551.1651734094739; Thu, 05 May 2022 00:01:34 -0700 (PDT) Received: from localhost.localdomain ([43.132.141.9]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b0015e8d4eb213sm716386plg.93.2022.05.05.00.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 00:01:33 -0700 (PDT) From: Yuntao Wang To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Yuntao Wang Subject: [PATCH bpf-next] bpf: Remove unused parameter from find_kfunc_desc_btf() Date: Thu, 5 May 2022 15:01:14 +0800 Message-Id: <20220505070114.3522522-1-ytcoode@gmail.com> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The func_id parameter in find_kfunc_desc_btf() is not used, get rid of it. Signed-off-by: Yuntao Wang --- kernel/bpf/verifier.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 813f6ee80419..c27fee73a2cb 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -1815,8 +1815,7 @@ void bpf_free_kfunc_btf_tab(struct bpf_kfunc_btf_tab *tab) kfree(tab); } -static struct btf *find_kfunc_desc_btf(struct bpf_verifier_env *env, - u32 func_id, s16 offset) +static struct btf *find_kfunc_desc_btf(struct bpf_verifier_env *env, s16 offset) { if (offset) { if (offset < 0) { @@ -1891,7 +1890,7 @@ static int add_kfunc_call(struct bpf_verifier_env *env, u32 func_id, s16 offset) prog_aux->kfunc_btf_tab = btf_tab; } - desc_btf = find_kfunc_desc_btf(env, func_id, offset); + desc_btf = find_kfunc_desc_btf(env, offset); if (IS_ERR(desc_btf)) { verbose(env, "failed to find BTF for kernel function\n"); return PTR_ERR(desc_btf); @@ -2360,7 +2359,7 @@ static const char *disasm_kfunc_name(void *data, const struct bpf_insn *insn) if (insn->src_reg != BPF_PSEUDO_KFUNC_CALL) return NULL; - desc_btf = find_kfunc_desc_btf(data, insn->imm, insn->off); + desc_btf = find_kfunc_desc_btf(data, insn->off); if (IS_ERR(desc_btf)) return ""; @@ -7237,7 +7236,7 @@ static int check_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn, if (!insn->imm) return 0; - desc_btf = find_kfunc_desc_btf(env, insn->imm, insn->off); + desc_btf = find_kfunc_desc_btf(env, insn->off); if (IS_ERR(desc_btf)) return PTR_ERR(desc_btf); -- 2.36.0