From: Daniel Borkmann <daniel@iogearbox.net>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
Colin King <colin.king@canonical.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
"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: Fri, 28 May 2021 22:21:36 +0200 [thread overview]
Message-ID: <70c6e7d3-7faf-c4e7-3ae5-78f9a8e4c2b3@iogearbox.net> (raw)
In-Reply-To: <20210527145549.GA7570@ranger.igk.intel.com>
On 5/27/21 4:55 PM, Maciej Fijalkowski wrote:
> 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 guys, fyi, took in this one for bpf-next [0], since more unneeded
code removed.
[0] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=e8e0f0f484780d7b90a63ea50020ac4bb027178d
>> 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
>>
prev parent reply other threads:[~2021-05-28 20:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-27 14:36 Colin King
2021-05-27 14:55 ` Maciej Fijalkowski
2021-05-28 20:21 ` Daniel Borkmann [this message]
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=70c6e7d3-7faf-c4e7-3ae5-78f9a8e4c2b3@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=colin.king@canonical.com \
--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=maciej.fijalkowski@intel.com \
--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
all inboxes | Powered by JetHome®