Skip to contentSkip to conversation

common/mlx5: fix unsigned signed mismatch warning

PATCH In review Tyler Retzlaff 3 participants 3 messages Apr 15, 2024 – Apr 29, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/mlx5: fix unsigned signed mismatch warning

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")
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/common/mlx5/mlx5_devx_cmds.c +2 -2
index 9b7abab..9952733 100644
@@ -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) {
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines

-----Original Message-----
From: Tyler Retzlaff <[email protected]>
Sent: Tuesday, April 16, 2024 01:10
To: [email protected]
Cc: Dariusz Sosnowski <[email protected]>; Dekel Peled <[email protected]>; Matan Azrad <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Slava Ovsiienko <[email protected]>; Tyler Retzlaff <[email protected]>; [email protected]; Matan Azrad <[email protected]>; [email protected]
Subject: [PATCH] common/mlx5: fix unsigned signed mismatch warning

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

Quoted 7 lines
Fixes 718d166e5504 ("net/mlx5: create advanced RxQ table via DevX")
Fixes e1da60a8a6e9 ("common/mlx5: add DevX command to modify RQT")

Thanks,
Dariusz Sosnowski

#2 lore raw
In reply to Tyler Retzlaff

Hi,

Quoted 15 lines

-----Original Message-----
From: Tyler Retzlaff <[email protected]>
Sent: Tuesday, April 16, 2024 2:10 AM
To: [email protected]
Cc: Dariusz Sosnowski <[email protected]>; Dekel Peled <[email protected]>; Matan Azrad <[email protected]>; Ori Kam <[email protected]>; Suanming Mou <[email protected]>; Slava Ovsiienko <[email protected]>; Tyler Retzlaff <[email protected]>; [email protected]; Matan Azrad <[email protected]>; [email protected]
Subject: [PATCH] common/mlx5: fix unsigned signed mismatch warning

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

Quoted 7 lines
Fixes 718d166e5504 ("net/mlx5: create advanced RxQ table via DevX")
Fixes e1da60a8a6e9 ("common/mlx5: add DevX command to modify RQT")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh