From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Min Hu (Connor)" <humin29@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
"Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [PATCH] bpf: delete meaningless code
Date: Wed, 21 Apr 2021 11:43:15 +0000 [thread overview]
Message-ID: <DM6PR11MB4491532901682A1EC150167D9A479@DM6PR11MB4491.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1619004925-58869-1-git-send-email-humin29@huawei.com>
>
> 'rd->u.max = rd->u.max' is meaningless which should be deleted.
>
> This patch fixed it.
>
> Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")
> Cc: stable@dpdk.org
As I remember, I did it on purpose.
Some old (but still supported) version of clang complained
about unitialized variable.
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> ---
> lib/librte_bpf/bpf_validate.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.c
> index 9214f15..c5ad951 100644
> --- a/lib/librte_bpf/bpf_validate.c
> +++ b/lib/librte_bpf/bpf_validate.c
> @@ -517,8 +517,6 @@ eval_divmod(uint32_t op, struct bpf_reg_val *rd, struct bpf_reg_val *rs,
> } else {
> if (op == BPF_MOD)
> rd->u.max = RTE_MIN(rd->u.max, rs->u.max - 1);
> - else
> - rd->u.max = rd->u.max;
> rd->u.min = 0;
> }
>
> --
> 2.7.4
next prev parent reply other threads:[~2021-04-21 11:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 11:35 Min Hu (Connor)
2021-04-21 11:43 ` Ananyev, Konstantin [this message]
2021-04-21 12:02 ` Min Hu (Connor)
2021-04-22 11:29 ` Ananyev, Konstantin
2021-04-22 11:39 ` Min Hu (Connor)
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=DM6PR11MB4491532901682A1EC150167D9A479@DM6PR11MB4491.namprd11.prod.outlook.com \
--to=konstantin.ananyev@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=humin29@huawei.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).