From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Colin King <colin.king@canonical.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>, KP Singh <kpsingh@kernel.org>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] bpf: devmap: remove redundant assignment of variable drops
Date: Thu, 27 May 2021 16:55:49 +0200 [thread overview]
Message-ID: <20210527145549.GA7570@ranger.igk.intel.com> (raw)
In-Reply-To: <20210527143637.795393-1-colin.king@canonical.com>
On Thu, May 27, 2021 at 03:36:37PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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.
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Would help if you would have CCed me given the fact that hour ago I
confirmed that it could be removed :p but no big deal.
Thanks!
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> 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
>
next prev parent reply other threads:[~2021-05-27 15:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-27 14:36 [PATCH][next] bpf: devmap: remove redundant assignment of variable drops Colin King
2021-05-27 14:55 ` Maciej Fijalkowski [this message]
2021-05-28 20:21 ` Daniel Borkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210527145549.GA7570@ranger.igk.intel.com \
--to=maciej.fijalkowski@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=colin.king@canonical.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).