Skip to contentSkip to conversation

bpf: Remove unused variable in nsim_bpf

PATCH Applied Nathan Chancellor 4 participants 4 messages Nov 12, 2018 – Nov 17, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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").

---
 drivers/net/netdevsim/bpf.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/netdevsim/bpf.c +0 -1
index 6a5b7bd9a1f9..a1b29173ca1c 100644
@@ -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();
Signature · 1 line
2.19.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Nathan Chancellor

Clang warns:

drivers/net/netdevsim/bpf.c:557:30: error: unused variable 'state' [-Werror,-Wunused-variable]

Quoted 8 lines
        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").

#2 lore raw

2018-11-12 14:14 UTC-0800 ~ Jakub Kicinski <[email protected]>

Quoted 9 lines · Nathan Chancellor
Quoted 8 lines

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.

Quoted 7 lines
Quoted 4 lines

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

My bad, thanks for the fix!

#3 lore raw
In reply to Nathan Chancellor
Quoted 4 lines · Nathan Chancellor

Clang warns:

drivers/net/netdevsim/bpf.c:557:30: error: unused variable 'state' [-Werror,-Wunused-variable]

Quoted 8 lines
        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").

Applied, Thanks