DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Baum <michaelba@nvidia.com>
To: dev@dpdk.org
Cc: Matan Azrad <matan@nvidia.com>,
	Raslan Darawsheh <rasland@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH 3/7] regex/mlx5: fix unnecessary init in RXP handle
Date: Wed, 18 Nov 2020 17:00:07 +0000
Message-ID: <1605718811-18652-3-git-send-email-michaelba@nvidia.com> (raw)
In-Reply-To: <1605718811-18652-1-git-send-email-michaelba@nvidia.com>

The rxp_poll_csr_for_value function defines a variable named ret. It is
the return value of the function, and It is updated to 0 by default
later in the function.
Similarly the rxp_init_rtru function also defines a variable named ret.
The function assigns into it return values from functions during the
function.

In both functions they initialize the ret variable when defining it.
however, in both cases they do not use any ret variable before assigning
into them different values, so the initializations are unnecessary.

Clean the aforementioned unnecessary initializations.

Fixes: e3dbbf718ebc ("regex/mlx5: support configuration")
Fixes: b34d816363b5 ("regex/mlx5: support rules import")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/regex/mlx5/mlx5_rxp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regex/mlx5/mlx5_rxp.c b/drivers/regex/mlx5/mlx5_rxp.c
index e54d2b8..41fbae7 100644
--- a/drivers/regex/mlx5/mlx5_rxp.c
+++ b/drivers/regex/mlx5/mlx5_rxp.c
@@ -225,7 +225,7 @@
 		       uint32_t expected_mask, uint32_t timeout_ms, uint8_t id)
 {
 	unsigned int i;
-	int ret = 0;
+	int ret;
 
 	ret = -EBUSY;
 	for (i = 0; i < timeout_ms; i++) {
@@ -276,7 +276,7 @@
 	uint32_t poll_value;
 	uint32_t expected_value;
 	uint32_t expected_mask;
-	int ret = 0;
+	int ret;
 
 	/* Read the rtru ctrl CSR. */
 	ret = mlx5_devx_regex_register_read(ctx, id, MLX5_RXP_RTRU_CSR_CTRL,
-- 
1.8.3.1


  parent reply	other threads:[~2020-11-18 17:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18 17:00 [dpdk-dev] [PATCH 1/7] regex/mlx5: fix jump to the wrong label Michael Baum
2020-11-18 17:00 ` [dpdk-dev] [PATCH 2/7] regex/mlx5: fix iterator type in RXP engines management Michael Baum
2020-11-18 17:00 ` Michael Baum [this message]
2020-11-18 17:00 ` [dpdk-dev] [PATCH 4/7] regex/mlx5: fix unchecked return value in RXP handle Michael Baum
2020-11-18 17:00 ` [dpdk-dev] [PATCH 5/7] regex/mlx5: improve error messages in RXP rules flush Michael Baum
2020-11-18 17:00 ` [dpdk-dev] [PATCH 6/7] regex/mlx5: improve constants type in QP buffers creation Michael Baum
2020-11-22 13:58   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2020-11-18 17:00 ` [dpdk-dev] [PATCH 7/7] regex/mlx5: fix QP setuping error flow Michael Baum
2020-11-22 14:06 ` [dpdk-dev] [dpdk-stable] [PATCH 1/7] regex/mlx5: fix jump to the wrong label Thomas Monjalon

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=1605718811-18652-3-git-send-email-michaelba@nvidia.com \
    --to=michaelba@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@nvidia.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git