bpf.vger.kernel.org archive mirror
 help / color / mirror / 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 related	[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, other threads:[~2020-03-26 23:48 UTC | newest]

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).