All of lore.kernel.org
 help / color / mirror / Atom feed
From: YangYuxi <yx.atom1@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net, kafai@fb.com,
	songliubraving@fb.com, yhs@fb.com, andriin@fb.com,
	john.fastabend@gmail.com, kpsingh@chromium.org,
	netdev@vger.kernel.org, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] ebpf: fix parameter naming confusing
Date: Thu, 16 Jul 2020 21:41:54 +0800	[thread overview]
Message-ID: <20200716134154.GA7123@vm_111_229_centos> (raw)

Signed-off-by: YangYuxi <yx.atom1@gmail.com>
---
 kernel/bpf/syscall.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 0fd80ac81f70..42406f7275b7 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -1881,13 +1881,13 @@ struct bpf_prog *bpf_prog_inc_not_zero(struct bpf_prog *prog)
 EXPORT_SYMBOL_GPL(bpf_prog_inc_not_zero);
 
 bool bpf_prog_get_ok(struct bpf_prog *prog,
-			    enum bpf_prog_type *attach_type, bool attach_drv)
+			    enum bpf_prog_type *prog_type, bool attach_drv)
 {
 	/* not an attachment, just a refcount inc, always allow */
 	if (!attach_type)
 		return true;
 
-	if (prog->type != *attach_type)
+	if (prog->type != *prog_type)
 		return false;
 	if (bpf_prog_is_dev_bound(prog->aux) && !attach_drv)
 		return false;
@@ -1895,7 +1895,7 @@ bool bpf_prog_get_ok(struct bpf_prog *prog,
 	return true;
 }
 
-static struct bpf_prog *__bpf_prog_get(u32 ufd, enum bpf_prog_type *attach_type,
+static struct bpf_prog *__bpf_prog_get(u32 ufd, enum bpf_prog_type *prog_type,
 				       bool attach_drv)
 {
 	struct fd f = fdget(ufd);
@@ -1904,7 +1904,7 @@ static struct bpf_prog *__bpf_prog_get(u32 ufd, enum bpf_prog_type *attach_type,
 	prog = ____bpf_prog_get(f);
 	if (IS_ERR(prog))
 		return prog;
-	if (!bpf_prog_get_ok(prog, attach_type, attach_drv)) {
+	if (!bpf_prog_get_ok(prog, prog_type, attach_drv)) {
 		prog = ERR_PTR(-EINVAL);
 		goto out;
 	}
-- 
1.8.3.1


             reply	other threads:[~2020-07-16 13:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 13:41 YangYuxi [this message]
2020-07-16 15:18 ` [PATCH] ebpf: fix parameter naming confusing kernel test robot
2020-07-16 15:18   ` kernel test robot
2020-07-16 17:49 ` kernel test robot
2020-07-16 17:49   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-07-17  2:08 YangYuxi
2020-07-21 19:17 ` Alexei Starovoitov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200716134154.GA7123@vm_111_229_centos \
    --to=yx.atom1@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.