From: David Marchand <david.marchand@redhat.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Juhamatti Kuusisaari <juhamatti.kuusisaari@coriant.com>,
dev <dev@dpdk.org>, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 5/7] net/pcap: remove local variable shadown outer one
Date: Wed, 18 Nov 2020 15:11:49 +0100 [thread overview]
Message-ID: <CAJFAV8wGU_btiNwkq5Lh2ffBTOjVykpmUBKDrdUcqKh8T7vH8w@mail.gmail.com> (raw)
In-Reply-To: <20201118114525.99053-6-ferruh.yigit@intel.com>
On Wed, Nov 18, 2020 at 12:47 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> 'ret' is already defined in the function scope, removing the 'ret' in
> the block scope.
>
> Fixes: c9507cd0cada ("net/pcap: support physical interface MAC address")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: juhamatti.kuusisaari@coriant.com
> ---
> drivers/net/pcap/rte_eth_pcap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
> index 4930d7d382..dd9ef33c85 100644
> --- a/drivers/net/pcap/rte_eth_pcap.c
> +++ b/drivers/net/pcap/rte_eth_pcap.c
> @@ -1324,7 +1324,7 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
>
> /* phy_mac arg is applied only only if "iface" devarg is provided */
> if (rx_queues->phy_mac) {
> - int ret = eth_pcap_update_mac(rx_queues->queue[0].name,
> + ret = eth_pcap_update_mac(rx_queues->queue[0].name,
> eth_dev, vdev->device.numa_node);
> if (ret == 0)
> internals->phy_mac = 1;
It is not used after, why not simply check eth_pcap_update_mac() == 0 ?
--
David Marchand
next prev parent reply other threads:[~2020-11-18 14:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-17 17:14 [dpdk-dev] [PATCH 0/4] cppcheck Ferruh Yigit
2020-11-17 17:14 ` [dpdk-dev] [PATCH 1/4] app/procinfo: fix redundant condition Ferruh Yigit
2020-11-17 17:14 ` [dpdk-dev] [PATCH 2/4] app/procinfo: fix negative check on unsigned variable Ferruh Yigit
2020-11-17 17:14 ` [dpdk-dev] [PATCH 3/4] app/procinfo: remove suspicious sizeof Ferruh Yigit
2020-11-17 18:07 ` Varghese, Vipin
2020-11-17 17:14 ` [dpdk-dev] [PATCH 4/4] app/procinfo: remove useless assignment Ferruh Yigit
2020-11-17 18:04 ` Varghese, Vipin
2020-11-18 10:46 ` Ferruh Yigit
2020-11-18 11:45 ` [dpdk-dev] [PATCH v2 0/7] cppcheck Ferruh Yigit
2020-11-18 11:45 ` [dpdk-dev] [PATCH v2 1/7] app/procinfo: fix redundant condition Ferruh Yigit
2020-11-18 14:10 ` David Marchand
2020-11-19 9:34 ` Ferruh Yigit
2020-11-18 11:45 ` [dpdk-dev] [PATCH v2 2/7] app/procinfo: fix negative check on unsigned variable Ferruh Yigit
2020-11-18 14:10 ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-11-18 11:45 ` [dpdk-dev] [PATCH v2 3/7] app/procinfo: remove suspicious sizeof Ferruh Yigit
2020-11-18 14:10 ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-11-18 11:45 ` [dpdk-dev] [PATCH v2 4/7] app/procinfo: remove useless assignment Ferruh Yigit
2020-11-18 14:11 ` David Marchand
2020-11-18 11:45 ` [dpdk-dev] [PATCH v2 5/7] net/pcap: remove local variable shadown outer one Ferruh Yigit
2020-11-18 14:11 ` David Marchand [this message]
2020-11-18 11:45 ` [dpdk-dev] [PATCH v2 6/7] net/af_xdp: remove useless assignment Ferruh Yigit
2020-11-18 14:42 ` David Marchand
2020-11-18 11:45 ` [dpdk-dev] [PATCH v2 7/7] net/bnxt: fix redundant return Ferruh Yigit
2020-11-18 14:42 ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-11-18 16:12 ` Ajit Khaparde
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=CAJFAV8wGU_btiNwkq5Lh2ffBTOjVykpmUBKDrdUcqKh8T7vH8w@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=juhamatti.kuusisaari@coriant.com \
--cc=stable@dpdk.org \
/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).