[PATCH][next] bpf: devmap: remove redundant assignment of variable drops

From: Colin King
Date: Thu May 27 2021 - 10:36:49 EST


From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

The variable drops is being assigned a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
kernel/bpf/devmap.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
index f9148daab0e3..fe3873b5d13d 100644
--- a/kernel/bpf/devmap.c
+++ b/kernel/bpf/devmap.c
@@ -388,8 +388,6 @@ static void bq_xmit_all(struct xdp_dev_bulk_queue *bq, u32 flags)
to_send = dev_map_bpf_prog_run(bq->xdp_prog, bq->q, cnt, dev);
if (!to_send)
goto out;
-
- drops = cnt - to_send;
}

sent = dev->netdev_ops->ndo_xdp_xmit(dev, to_send, bq->q, flags);
--
2.31.1