DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wei Hu (Xavier)" <huwei013@chinasoftinc.com>
To: <dev@dpdk.org>
Subject: [dpdk-dev] [PATCH 2/4] net/hns3: remove unnecessary input parameter valid judgement
Date: Thu, 16 Jan 2020 17:27:04 +0800	[thread overview]
Message-ID: <20200116092706.17388-3-huwei013@chinasoftinc.com> (raw)
In-Reply-To: <20200116092706.17388-1-huwei013@chinasoftinc.com>

From: Lijun Ou <oulijun@huawei.com>

Since the input parameter named dev has been guaranteed not to be NULL
in the rte layer of DPDK framework, it doesn't need to check dev whether
is null in the 'filter_ctrl' ops implementation function named
hns3_dev_filter_ctrl.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index aa614175d..98affa567 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1887,8 +1887,6 @@ hns3_dev_filter_ctrl(struct rte_eth_dev *dev, enum rte_filter_type filter_type,
 	struct hns3_hw *hw;
 	int ret = 0;
 
-	if (dev == NULL)
-		return -EINVAL;
 	hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	switch (filter_type) {
 	case RTE_ETH_FILTER_GENERIC:
-- 
2.23.0


  parent reply	other threads:[~2020-01-16  9:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16  9:27 [dpdk-dev] [PATCH 0/4] improvement and cleanup for hns3 PMD driver Wei Hu (Xavier)
2020-01-16  9:27 ` [dpdk-dev] [PATCH 1/4] net/hns3: replace memory barrier with data dependency order Wei Hu (Xavier)
2020-01-16  9:27 ` Wei Hu (Xavier) [this message]
2020-01-16  9:27 ` [dpdk-dev] [PATCH 3/4] net/hns3: remove unnecessary branch Wei Hu (Xavier)
2020-01-16  9:27 ` [dpdk-dev] [PATCH 4/4] doc: update release notes for hns3 Wei Hu (Xavier)
2020-01-17 10:15 ` [dpdk-dev] [PATCH 0/4] improvement and cleanup for hns3 PMD driver 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=20200116092706.17388-3-huwei013@chinasoftinc.com \
    --to=huwei013@chinasoftinc.com \
    --cc=dev@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).