From: Eli Cohen Date: Mon, 3 May 2021 09:35:05 +0000 (+0300) Subject: net/mlx5: Use boolean arithmetic to evaluate roce_lag X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2b1476752521aae142d4c8bc37dfd2be66b2acfa;p=linux.git net/mlx5: Use boolean arithmetic to evaluate roce_lag Avoid mixing boolean and bit arithmetic when evaluating validity of roce_lag. Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag.c b/drivers/net/ethernet/mellanox/mlx5/core/lag.c index c9c00163d9183..e52e2144ab122 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lag.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag.c @@ -289,8 +289,9 @@ static void mlx5_do_bond(struct mlx5_lag *ldev) !mlx5_sriov_is_enabled(dev1); #ifdef CONFIG_MLX5_ESWITCH - roce_lag &= dev0->priv.eswitch->mode == MLX5_ESWITCH_NONE && - dev1->priv.eswitch->mode == MLX5_ESWITCH_NONE; + roce_lag = roce_lag && + dev0->priv.eswitch->mode == MLX5_ESWITCH_NONE && + dev1->priv.eswitch->mode == MLX5_ESWITCH_NONE; #endif if (roce_lag)