From: Thierry Herbelot <thierry.herbelot@6wind.com>
To: dev@dpdk.org
Cc: Thierry Herbelot <thierry.herbelot@6wind.com>,
Thomas Monjalon <thomas@monjalon.net>,
stable@dpdk.org, Gagandeep Singh <g.singh@nxp.com>
Subject: [dpdk-dev] [PATCH v2] net/pfe: no need to check dev to be NULL Pointer
Date: Mon, 24 May 2021 11:37:54 +0200 [thread overview]
Message-ID: <20210524093754.21046-1-thierry.herbelot@6wind.com> (raw)
In-Reply-To: <20210524085917.16254-1-thierry.herbelot@6wind.com>
librte_ethdev library is already doing some checks on dev before calling
the link update.
Fixes: acd4818ea2a45 ("net/pfe: add link status update")
Cc: stable@dpdk.org
Cc: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
--
V2: rework after noting dev cannot be NULL
---
drivers/net/pfe/pfe_ethdev.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 3135466713fb..feec4d10a26e 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -582,11 +582,6 @@ pfe_eth_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)
struct rte_eth_link link, old;
unsigned int lstatus = 1;
- if (dev == NULL) {
- PFE_PMD_ERR("Invalid device in link_update.\n");
- return 0;
- }
-
memset(&old, 0, sizeof(old));
memset(&link, 0, sizeof(struct rte_eth_link));
--
2.29.2
next prev parent reply other threads:[~2021-05-24 9:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 8:59 [dpdk-dev] [PATCH] net/pfe: do not use a possibly " Thierry Herbelot
2021-05-24 9:25 ` Gagandeep Singh
2021-05-24 9:37 ` Thierry Herbelot [this message]
2021-05-24 10:28 ` [dpdk-dev] [PATCH v2] net/pfe: no need to check dev to be " Gagandeep Singh
2021-06-29 8:27 ` Andrew Rybchenko
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=20210524093754.21046-1-thierry.herbelot@6wind.com \
--to=thierry.herbelot@6wind.com \
--cc=dev@dpdk.org \
--cc=g.singh@nxp.com \
--cc=stable@dpdk.org \
--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).