public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, david.marchand@redhat.com,
	stable@dpdk.org, Dariusz Sosnowski <dsosnowski@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Bing Zhao <bingz@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>, Ophir Munk <ophirmu@nvidia.com>
Subject: [PATCH 1/2] common/mlx5: fix variable shadowing
Date: Wed, 21 Jan 2026 12:06:00 +0100	[thread overview]
Message-ID: <20260121110757.1948723-2-thomas@monjalon.net> (raw)
In-Reply-To: <20260121110757.1948723-1-thomas@monjalon.net>

The word "unused" is too common for being used in a header.
There is a warning because a parameter is named "unused" in mbuf:

lib/mbuf/rte_mbuf.h: In function 'rte_mbuf_tx_offload':
error: declaration of 'unused' shadows a previous local [-Werror=shadow]
 1910 |         uint64_t ol3, uint64_t ol2, uint64_t unused)
      |                                     ~~~~~~~~~^~~~~~

Such value should be prefixed with "MLX5".

Fixes: bd935fe3e624 ("net/mlx5: wrap sampling actions per OS")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/common/mlx5/windows/mlx5_glue.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/mlx5/windows/mlx5_glue.h b/drivers/common/mlx5/windows/mlx5_glue.h
index 5ba324ebc4..f53142e3d4 100644
--- a/drivers/common/mlx5/windows/mlx5_glue.h
+++ b/drivers/common/mlx5/windows/mlx5_glue.h
@@ -16,7 +16,7 @@
 #endif
 
 #ifndef HAVE_MLX5DV_DR
-enum  mlx5dv_dr_domain_type { unused, };
+enum  mlx5dv_dr_domain_type { MLX5_UNUSED_DOMAIN_TYPE };
 struct mlx5dv_dr_domain;
 struct mlx5dv_dr_action;
 #endif
-- 
2.52.0


  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 ` Thomas Monjalon [this message]
2026-01-21 11:11   ` [PATCH 1/2] common/mlx5: fix variable shadowing David Marchand
2026-01-21 11:06 ` [PATCH 2/2] net/mvpp2: " Thomas Monjalon
2026-01-21 11:11   ` 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-2-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=bingz@nvidia.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=ophirmu@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=suanmingm@nvidia.com \
    --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
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