DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Dariusz Sosnowski <dsosnowski@nvidia.com>,
	Dekel Peled <dekelp@nvidia.com>, Matan Azrad <matan@nvidia.com>,
	Ori Kam <orika@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Tyler Retzlaff <roretzla@linux.microsoft.com>,
	dekelp@mellanox.com, matan@mellanox.com, stable@dpdk.org
Subject: [PATCH] common/mlx5: fix unsigned signed mismatch warning
Date: Mon, 15 Apr 2024 16:09:37 -0700	[thread overview]
Message-ID: <1713222577-7382-1-git-send-email-roretzla@linux.microsoft.com> (raw)

Use unsigned int for 2 loop indexes that are being compared against an
unsigned int struct field to avoid signed/unsigned mismatch warning.

Fixes: 718d166e5504 ("net/mlx5: create advanced RxQ table via DevX")
Fixes: e1da60a8a6e9 ("common/mlx5: add DevX command to modify RQT")
Cc: dekelp@mellanox.com
Cc: matan@mellanox.com
Cc: stable@dpdk.org

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 9b7abab..9952733 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1816,7 +1816,7 @@ struct mlx5_devx_obj *
 	uint32_t out[MLX5_ST_SZ_DW(create_rqt_out)] = {0};
 	void *rqt_ctx;
 	struct mlx5_devx_obj *rqt = NULL;
-	int i;
+	unsigned int i;
 
 	in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);
 	if (!in) {
@@ -1869,7 +1869,7 @@ struct mlx5_devx_obj *
 	uint32_t out[MLX5_ST_SZ_DW(modify_rqt_out)] = {0};
 	uint32_t *in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);
 	void *rqt_ctx;
-	int i;
+	unsigned int i;
 	int ret;
 
 	if (!in) {
-- 
1.8.3.1


             reply	other threads:[~2024-04-15 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 23:09 Tyler Retzlaff [this message]
2024-04-16 10:04 ` Dariusz Sosnowski
2024-04-29  7:46 ` Raslan Darawsheh

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=1713222577-7382-1-git-send-email-roretzla@linux.microsoft.com \
    --to=roretzla@linux.microsoft.com \
    --cc=dekelp@mellanox.com \
    --cc=dekelp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@mellanox.com \
    --cc=matan@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;
as well as URLs for NNTP newsgroup(s).