From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
To: <dev@dpdk.org>
Cc: Thomas Monjalon <thomas@monjalon.net>,
Ferruh Yigit <ferruh.yigit@intel.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
<jerinj@marvell.com>,
Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Subject: [PATCH] ethdev: remove dead code in telemetry handler
Date: Sat, 12 Feb 2022 18:06:21 +0530 [thread overview]
Message-ID: <20220212123621.3394272-1-gmuthukrishn@marvell.com> (raw)
In telemetry handler for port info, there is no need to check if
eth_dev object of a port id is not null, as it had already been
evaluated once in rte_eth_dev_is_valid_port function.
Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
Coverity issue: 373635
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
lib/ethdev/rte_ethdev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index e03e669c31..3484aa2b32 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6465,8 +6465,6 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
return -EINVAL;
eth_dev = &rte_eth_devices[port_id];
- if (!eth_dev)
- return -EINVAL;
rxq_state = rte_tel_data_alloc();
if (!rxq_state)
--
2.25.1
next reply other threads:[~2022-02-12 12:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-12 12:36 Gowrishankar Muthukrishnan [this message]
2022-02-14 12:10 ` Ferruh Yigit
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=20220212123621.3394272-1-gmuthukrishn@marvell.com \
--to=gmuthukrishn@marvell.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=jerinj@marvell.com \
--cc=thomas@monjalon.net \
/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).