From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, david.marchand@redhat.com,
stable@dpdk.org, Liron Himi <lironh@marvell.com>,
Jacek Siuda <jck@semihalf.com>,
Tomasz Duszynski <tduszynski@marvell.com>
Subject: [PATCH 2/2] net/mvpp2: fix variable shadowing
Date: Wed, 21 Jan 2026 12:06:01 +0100 [thread overview]
Message-ID: <20260121110757.1948723-3-thomas@monjalon.net> (raw)
In-Reply-To: <20260121110757.1948723-1-thomas@monjalon.net>
With shadowing warning enabled, we can see "i" was declared twice:
drivers/net/mvpp2/mrvl_ethdev.c: In function 'mrvl_rx_pkt_burst':
error: declaration of 'i' shadows a previous local [-Werror=shadow]
2676 | int i;
| ^
/mrvl_ethdev.c:2592:13: note: shadowed declaration is here
2592 | int i, ret, rx_done = 0;
| ^
Fixes: afb4d0d0bf91 ("net/mrvl: add Rx/Tx support")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/net/mvpp2/mrvl_ethdev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index 845819e4d8..1074092d43 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -2673,7 +2673,6 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
(!rx_done && num < q->priv->bpool_init_size))) {
mrvl_fill_bpool(q, q->priv->fill_bpool_buffs);
} else if (unlikely(num > q->priv->bpool_max_size)) {
- int i;
int pkt_to_remove = num - q->priv->bpool_init_size;
struct rte_mbuf *mbuf;
struct pp2_buff_inf buff;
--
2.52.0
next prev parent reply other threads:[~2026-01-21 11:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 11:05 [PATCH 0/2] More fixes after enabling -Wshadow Thomas Monjalon
2026-01-21 11:06 ` [PATCH 1/2] common/mlx5: fix variable shadowing Thomas Monjalon
2026-01-21 11:11 ` David Marchand
2026-01-21 11:06 ` Thomas Monjalon [this message]
2026-01-21 11:11 ` [PATCH 2/2] net/mvpp2: " David Marchand
2026-01-21 11:12 ` [PATCH 0/2] More fixes after enabling -Wshadow Bruce Richardson
2026-01-21 14:37 ` David Marchand
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=20260121110757.1948723-3-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jck@semihalf.com \
--cc=lironh@marvell.com \
--cc=stable@dpdk.org \
--cc=tduszynski@marvell.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
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