2018-11-12 22:11:30

by Nathan Chancellor

[permalink] [raw]
Subject: [PATCH] bpf: Remove unused variable in nsim_bpf

Clang warns:

drivers/net/netdevsim/bpf.c:557:30: error: unused variable 'state'
[-Werror,-Wunused-variable]
struct nsim_bpf_bound_prog *state;
^
1 error generated.

The declaration should have been removed in commit b07ade27e933 ("bpf:
pass translate() as a callback and remove its ndo_bpf subcommand").

Signed-off-by: Nathan Chancellor <[email protected]>
---
drivers/net/netdevsim/bpf.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/netdevsim/bpf.c b/drivers/net/netdevsim/bpf.c
index 6a5b7bd9a1f9..a1b29173ca1c 100644
--- a/drivers/net/netdevsim/bpf.c
+++ b/drivers/net/netdevsim/bpf.c
@@ -554,7 +554,6 @@ static void nsim_bpf_map_free(struct bpf_offloaded_map *offmap)
int nsim_bpf(struct net_device *dev, struct netdev_bpf *bpf)
{
struct netdevsim *ns = netdev_priv(dev);
- struct nsim_bpf_bound_prog *state;
int err;

ASSERT_RTNL();
--
2.19.1



2018-11-12 22:15:18

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH] bpf: Remove unused variable in nsim_bpf

On Mon, 12 Nov 2018 15:10:42 -0700, Nathan Chancellor wrote:
> Clang warns:
>
> drivers/net/netdevsim/bpf.c:557:30: error: unused variable 'state'
> [-Werror,-Wunused-variable]
> struct nsim_bpf_bound_prog *state;
> ^
> 1 error generated.
>
> The declaration should have been removed in commit b07ade27e933 ("bpf:
> pass translate() as a callback and remove its ndo_bpf subcommand").
>
> Signed-off-by: Nathan Chancellor <[email protected]>

Acked-by: Jakub Kicinski <[email protected]>

2018-11-13 06:09:30

by Quentin Monnet

[permalink] [raw]
Subject: Re: [PATCH] bpf: Remove unused variable in nsim_bpf

2018-11-12 14:14 UTC-0800 ~ Jakub Kicinski <[email protected]>
> On Mon, 12 Nov 2018 15:10:42 -0700, Nathan Chancellor wrote:
>> Clang warns:
>>
>> drivers/net/netdevsim/bpf.c:557:30: error: unused variable 'state'
>> [-Werror,-Wunused-variable]
>> struct nsim_bpf_bound_prog *state;
>> ^
>> 1 error generated.
>>
>> The declaration should have been removed in commit b07ade27e933 ("bpf:
>> pass translate() as a callback and remove its ndo_bpf subcommand").
>>
>> Signed-off-by: Nathan Chancellor <[email protected]>
>
> Acked-by: Jakub Kicinski <[email protected]>
>

My bad, thanks for the fix!

Acked-by: Quentin Monnet <[email protected]>

2018-11-17 01:54:51

by Alexei Starovoitov

[permalink] [raw]
Subject: Re: [PATCH] bpf: Remove unused variable in nsim_bpf

On Mon, Nov 12, 2018 at 03:10:42PM -0700, Nathan Chancellor wrote:
> Clang warns:
>
> drivers/net/netdevsim/bpf.c:557:30: error: unused variable 'state'
> [-Werror,-Wunused-variable]
> struct nsim_bpf_bound_prog *state;
> ^
> 1 error generated.
>
> The declaration should have been removed in commit b07ade27e933 ("bpf:
> pass translate() as a callback and remove its ndo_bpf subcommand").
>
> Signed-off-by: Nathan Chancellor <[email protected]>

Applied, Thanks