On Tue, Aug 11, 2026 at 09:16:37AM +0300, Tariq Toukan wrote:
From: Michael Guralnik <redacted>
All callers of these create functions treat NULL and ERR_PTR as
equivalent error cases. Align the return convention to NULL-on-failure
to simplify the checks at usage sites.
Since its return value is never checked and failure is non-fatal, change
hv_vhca init function to return void.
Signed-off-by: Michael Guralnik <redacted>
Reviewed-by: Shay Drori <redacted>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
...
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/hv_vhca.h b/drivers/net/ethernet/mellanox/mlx5/core/lib/hv_vhca.h
quoted hunk ↗ jump to hunk
@@ -63,9 +63,9 @@ static inline void mlx5_hv_vhca_destroy(struct mlx5_hv_vhca *hv_vhca)
{
}
-static inline int mlx5_hv_vhca_init(struct mlx5_hv_vhca *hv_vhca)
+static inline void mlx5_hv_vhca_init(struct mlx5_hv_vhca *hv_vhca)
{
- return 0;
+ return;
}
The AI-generated review on netdev-ai [1] points out that the
return; line is unnecessary and inconsistent with surrounding code.
[1] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260811061637.3195320-1-tariqt%40nvidia.com
But that not withstanding this looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>