Skip to content

Commit 57a94d4

Browse files
Cosmin Ratiukuba-moo
authored andcommitted
net/mlx5e: Use unsigned for mlx5e_get_max_num_channels
The max number of channels is always an unsigned int, use the correct type to fix compilation errors done with strict type checking, e.g.: error: call to ‘__compiletime_assert_1110’ declared with attribute error: min(mlx5e_get_devlink_param_num_doorbells(mdev), mlx5e_get_max_num_channels(mdev)) signedness error Fixes: 74a8dad ("net/mlx5e: Preparations for supporting larger number of channels") Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Jacob Keller <Jacob.e.keller@intel.com> Link: https://patch.msgid.link/20260218072904.1764634-7-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 83ac030 commit 57a94d4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • drivers/net/ethernet/mellanox/mlx5/core

drivers/net/ethernet/mellanox/mlx5/core/en.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ static inline u16 mlx5_min_rx_wqes(int wq_type, u32 wq_size)
180180
}
181181

182182
/* Use this function to get max num channels (rxqs/txqs) only to create netdev */
183-
static inline int mlx5e_get_max_num_channels(struct mlx5_core_dev *mdev)
183+
static inline unsigned int
184+
mlx5e_get_max_num_channels(struct mlx5_core_dev *mdev)
184185
{
185186
return is_kdump_kernel() ?
186187
MLX5E_MIN_NUM_CHANNELS :

0 commit comments

Comments
 (0)