Skip to contentSkip to conversation

net/mlx5: HWS, Fix an error code in mlx5hws_bwc_rule_create_complex()

PATCH Applied Dan Carpenter 4 participants 4 messages May 23, 2025 – May 28, 2025

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: HWS, Fix an error code in mlx5hws_bwc_rule_create_complex()

This was intended to be negative -ENOMEM but the '-' character was left off accidentally. This typo doesn't affect runtime because the caller treats all non-zero returns the same.

Fixes 17e0accac577 ("net/mlx5: HWS, support complex matchers")
---
 .../net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c +1 -1
index 5d30c5b094fc..70768953a4f6 100644
@@ -1188,7 +1188,7 @@ int mlx5hws_bwc_rule_create_complex(struct mlx5hws_bwc_rule *bwc_rule,
 			      GFP_KERNEL);
 	if (unlikely(!match_buf_2)) {
 		mlx5hws_err(ctx, "Complex rule: failed allocating match_buf\n");
-		ret = ENOMEM;
+		ret = -ENOMEM;
 		goto hash_node_put;
 	}
 
Signature · 1 line
2.47.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Dan Carpenter

This was intended to be negative -ENOMEM but the '-' character was left off accidentally. This typo doesn't affect runtime because the caller treats all non-zero returns the same.

Fixes 17e0accac577 ("net/mlx5: HWS, support complex matchers")
---
  .../net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c  | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c +0 -0
index 5d30c5b094fc..70768953a4f6 100644

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c int mlx5hws_bwc_rule_create_complex(struct mlx5hws_bwc_rule *bwc_rule, · line 1194

Quoted 8 lines
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c +1 -1
@@ -1188,7 +1188,7 @@ int mlx5hws_bwc_rule_create_complex(struct mlx5hws_bwc_rule *bwc_rule,
  			      GFP_KERNEL);
  	if (unlikely(!match_buf_2)) {
  		mlx5hws_err(ctx, "Complex rule: failed allocating match_buf\n");
-		ret = ENOMEM;
+		ret = -ENOMEM;
  		goto hash_node_put;
  	}
 

Thanks Dan.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Dan Carpenter
Quoted 15 lines · Dan Carpenter

This was intended to be negative -ENOMEM but the '-' character was left off accidentally. This typo doesn't affect runtime because the caller treats all non-zero returns the same.

Fixes 17e0accac577 ("net/mlx5: HWS, support complex matchers")
---
  .../net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c  | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c +0 -0
index 5d30c5b094fc..70768953a4f6 100644

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c int mlx5hws_bwc_rule_create_complex(struct mlx5hws_bwc_rule *bwc_rule, · line 1194

Quoted 8 lines
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc_complex.c +1 -1
@@ -1188,7 +1188,7 @@ int mlx5hws_bwc_rule_create_complex(struct mlx5hws_bwc_rule *bwc_rule,
  			      GFP_KERNEL);
  	if (unlikely(!match_buf_2)) {
  		mlx5hws_err(ctx, "Complex rule: failed allocating match_buf\n");
-		ret = ENOMEM;
+		ret = -ENOMEM;
  		goto hash_node_put;
  	}
 
#3 lore raw
In reply to Dan Carpenter
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Fri, 23 May 2025 19:00:12 +0300 you wrote:

This was intended to be negative -ENOMEM but the '-' character was left off accidentally. This typo doesn't affect runtime because the caller treats all non-zero returns the same.

Fixes 17e0accac577 ("net/mlx5: HWS, support complex matchers")

[...]

Here is the summary with links:
- [net-next] net/mlx5: HWS, Fix an error code in mlx5hws_bwc_rule_create_complex()

    https://git.kernel.org/netdev/net-next/c/a540ee75945a

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html