BPF Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH bpf-next] bpf: remove unused vairable 'bpf_xdp_link_lops'
@ 2020-03-26  3:16 YueHaibing
  2020-03-26  4:17 ` Andrii Nakryiko
  2020-03-26 23:48 ` Alexei Starovoitov
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2020-03-26  3:16 UTC (permalink / raw)
  To: ast, daniel, kafai, songliubraving, yhs, andriin, davem, kuba,
	hawk, john.fastabend
  Cc: netdev, bpf, linux-kernel, YueHaibing

kernel/bpf/syscall.c:2263:34: warning: 'bpf_xdp_link_lops' defined but not used [-Wunused-const-variable=]
 static const struct bpf_link_ops bpf_xdp_link_lops;
                                  ^~~~~~~~~~~~~~~~~

commit 70ed506c3bbc ("bpf: Introduce pinnable bpf_link abstraction")
involded this unused variable, remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 kernel/bpf/syscall.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 85567a6ea5f9..7774e55c9881 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -2252,7 +2252,6 @@ static int bpf_link_release(struct inode *inode, struct file *filp)
 #ifdef CONFIG_PROC_FS
 static const struct bpf_link_ops bpf_raw_tp_lops;
 static const struct bpf_link_ops bpf_tracing_link_lops;
-static const struct bpf_link_ops bpf_xdp_link_lops;
 
 static void bpf_link_show_fdinfo(struct seq_file *m, struct file *filp)
 {
-- 
2.17.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next] bpf: remove unused vairable 'bpf_xdp_link_lops'
  2020-03-26  3:16 [PATCH bpf-next] bpf: remove unused vairable 'bpf_xdp_link_lops' YueHaibing
@ 2020-03-26  4:17 ` Andrii Nakryiko
  2020-03-26 23:48 ` Alexei Starovoitov
  1 sibling, 0 replies; 3+ messages in thread
From: Andrii Nakryiko @ 2020-03-26  4:17 UTC (permalink / raw)
  To: YueHaibing
  Cc: Alexei Starovoitov, Daniel Borkmann, Martin Lau, Song Liu,
	Yonghong Song, Andrii Nakryiko, David S. Miller, Jakub Kicinski,
	Jesper Dangaard Brouer, john fastabend, Networking, bpf,
	open list

On Wed, Mar 25, 2020 at 8:16 PM YueHaibing <yuehaibing@huawei.com> wrote:
>
> kernel/bpf/syscall.c:2263:34: warning: 'bpf_xdp_link_lops' defined but not used [-Wunused-const-variable=]
>  static const struct bpf_link_ops bpf_xdp_link_lops;
>                                   ^~~~~~~~~~~~~~~~~
>
> commit 70ed506c3bbc ("bpf: Introduce pinnable bpf_link abstraction")
> involded this unused variable, remove it.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---

Yeah, I noticed this when I was adding bpf_cgroup_link (and replaced
this declaration with bpf_cgroup_link_lops. But I guess we can fix it
sooner.

Acked-by: Andrii Nakryiko <andriin@fb.com>

>  kernel/bpf/syscall.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
> index 85567a6ea5f9..7774e55c9881 100644
> --- a/kernel/bpf/syscall.c
> +++ b/kernel/bpf/syscall.c
> @@ -2252,7 +2252,6 @@ static int bpf_link_release(struct inode *inode, struct file *filp)
>  #ifdef CONFIG_PROC_FS
>  static const struct bpf_link_ops bpf_raw_tp_lops;
>  static const struct bpf_link_ops bpf_tracing_link_lops;
> -static const struct bpf_link_ops bpf_xdp_link_lops;
>
>  static void bpf_link_show_fdinfo(struct seq_file *m, struct file *filp)
>  {
> --
> 2.17.1
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next] bpf: remove unused vairable 'bpf_xdp_link_lops'
  2020-03-26  3:16 [PATCH bpf-next] bpf: remove unused vairable 'bpf_xdp_link_lops' YueHaibing
  2020-03-26  4:17 ` Andrii Nakryiko
@ 2020-03-26 23:48 ` Alexei Starovoitov
  1 sibling, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2020-03-26 23:48 UTC (permalink / raw)
  To: YueHaibing
  Cc: Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, Andrii Nakryiko, David S. Miller, Jakub Kicinski,
	Jesper Dangaard Brouer, John Fastabend, Network Development, bpf,
	LKML

On Wed, Mar 25, 2020 at 8:16 PM YueHaibing <yuehaibing@huawei.com> wrote:
>
> kernel/bpf/syscall.c:2263:34: warning: 'bpf_xdp_link_lops' defined but not used [-Wunused-const-variable=]
>  static const struct bpf_link_ops bpf_xdp_link_lops;
>                                   ^~~~~~~~~~~~~~~~~
>
> commit 70ed506c3bbc ("bpf: Introduce pinnable bpf_link abstraction")
> involded this unused variable, remove it.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied. Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26  3:16 [PATCH bpf-next] bpf: remove unused vairable 'bpf_xdp_link_lops' YueHaibing
2020-03-26  4:17 ` Andrii Nakryiko
2020-03-26 23:48 ` Alexei Starovoitov

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
		bpf@vger.kernel.org
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.bpf


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git