DPDK patches and discussions
 help / color / mirror / Atom feed
From: Oleksandr Kolomeiets <okl-plv@napatech.com>
To: dev@dpdk.org
Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com,
	stephen@networkplumber.org, thomas@monjalon.net,
	Danylo Vodopianov <dvo-plv@napatech.com>
Subject: [PATCH v1 15/25] net/ntnic: remove redundant initialization
Date: Wed, 30 Apr 2025 15:48:27 +0200	[thread overview]
Message-ID: <20250430134840.402553-16-okl-plv@napatech.com> (raw)
In-Reply-To: <20250430134840.402553-1-okl-plv@napatech.com>

From: Danylo Vodopianov <dvo-plv@napatech.com>

Some variables set twice in the code.
Fix host side FEC enablement

Signed-off-by: Danylo Vodopianov <dvo-plv@napatech.com>
---
 drivers/net/ntnic/nim/i2c_nim.c             | 2 +-
 drivers/net/ntnic/nthw/core/nthw_phy_tile.c | 1 -
 drivers/net/ntnic/ntnic_vfio.c              | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ntnic/nim/i2c_nim.c b/drivers/net/ntnic/nim/i2c_nim.c
index 5e8eeb16a7..c6fa75e13a 100644
--- a/drivers/net/ntnic/nim/i2c_nim.c
+++ b/drivers/net/ntnic/nim/i2c_nim.c
@@ -877,7 +877,7 @@ bool nthw_qsfp28_set_fec_enable(nim_i2c_ctx_p ctx, bool media_side_fec, bool hos
 
 	write_data_lin(ctx, addr, sizeof(data), &data);
 	ctx->specific_u.qsfp.specific_u.qsfp28.media_side_fec_ena = media_side_fec;
-	ctx->specific_u.qsfp.specific_u.qsfp28.media_side_fec_ena = host_side_fec;
+	ctx->specific_u.qsfp.specific_u.qsfp28.host_side_fec_ena = host_side_fec;
 	return true;
 }
 
diff --git a/drivers/net/ntnic/nthw/core/nthw_phy_tile.c b/drivers/net/ntnic/nthw/core/nthw_phy_tile.c
index 77400d2514..5b2af77f7d 100644
--- a/drivers/net/ntnic/nthw/core/nthw_phy_tile.c
+++ b/drivers/net/ntnic/nthw/core/nthw_phy_tile.c
@@ -797,7 +797,6 @@ static uint32_t nthw_phy_tile_cpi_request(nthw_phy_tile_t *p, uint8_t intf_no, u
 	/* Find quad lane */
 	quad_lane = nthw_phy_tile_read_xcvr(p, intf_no, lane, 0xFFFFC) & 0x3;
 
-	xcvr_instance = lane;
 	lane_offset = (uint32_t)(lane << 20);
 
 	cpi_cmd = (data << 16) | cpi_assert | cpi_set_get | (quad_lane << 8) | op_code;
diff --git a/drivers/net/ntnic/ntnic_vfio.c b/drivers/net/ntnic/ntnic_vfio.c
index a62234353b..8d955e8342 100644
--- a/drivers/net/ntnic/ntnic_vfio.c
+++ b/drivers/net/ntnic/ntnic_vfio.c
@@ -68,7 +68,6 @@ nt_vfio_setup(struct rte_pci_device *dev)
 
 	vfio->dev_fd = -1;
 	vfio->group_fd = -1;
-	vfio->container_fd = -1;
 	vfio->iova_addr = START_VF_IOVA;
 
 	rte_pci_device_name(&dev->addr, devname, RTE_DEV_NAME_MAX_LEN);
-- 
2.47.1


  parent reply	other threads:[~2025-04-30 13:51 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-30 13:48 [PATCH v1 00/25] net/ntnic: fixes and improvements Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 01/25] net/ntnic: remove usage of the variable-length arrays Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 02/25] net/ntnic: handle string truncations when using strlcpy Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 03/25] net/ntnic: replace pragma pack with DPDK defined macros Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 04/25] net/ntnic: remove extra memset Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 05/25] net/ntnic: include all queues into statistics Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 06/25] net/ntnic: avoid misleading variable names Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 07/25] net/ntnic: apply packing to the structure Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 08/25] net/ntnic: improve logging format specifiers Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 09/25] net/ntnic: remove usless expressions Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 10/25] net/ntnic: remove unused code Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 11/25] net/ntnic: remove usless part of conditional expression Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 12/25] net/ntnic: add error logging for hsh Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 13/25] net/ntnic: add explicitly specificator Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 14/25] net/ntnic: add handle memory allocation failures Oleksandr Kolomeiets
2025-04-30 13:48 ` Oleksandr Kolomeiets [this message]
2025-04-30 13:48 ` [PATCH v1 16/25] net/ntnic: enhance null checks and assertions Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 17/25] net/ntnic: add return value check Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 18/25] net/ntnic: remove redundant assignments and branching Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 19/25] net/ntnic: rework array usage Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 20/25] net/ntnic: avoid divide by zero Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 21/25] net/ntnic: remove unnecessary void cast Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 22/25] net/ntnic: remove unnecessary memset Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 23/25] net/ntnic: add null verification Oleksandr Kolomeiets
2025-04-30 13:48 ` [PATCH v1 24/25] net/ntnic: avoid possible deadlock Oleksandr Kolomeiets
2025-04-30 14:05   ` Stephen Hemminger
2025-04-30 13:48 ` [PATCH v1 25/25] net/ntnic: fix operation with rte ring queue Oleksandr Kolomeiets

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=20250430134840.402553-16-okl-plv@napatech.com \
    --to=okl-plv@napatech.com \
    --cc=ckm@napatech.com \
    --cc=dev@dpdk.org \
    --cc=dvo-plv@napatech.com \
    --cc=mko-plv@napatech.com \
    --cc=sil-plv@napatech.com \
    --cc=stephen@networkplumber.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).