Skip to content

Commit 2b14767

Browse files
elic307iSaeed Mahameed
authored andcommitted
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 <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent a546432 commit 2b14767

File tree

1 file changed

+3
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+3
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/lag.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,9 @@ static void mlx5_do_bond(struct mlx5_lag *ldev)
289289
!mlx5_sriov_is_enabled(dev1);
290290

291291
#ifdef CONFIG_MLX5_ESWITCH
292-
roce_lag &= dev0->priv.eswitch->mode == MLX5_ESWITCH_NONE &&
293-
dev1->priv.eswitch->mode == MLX5_ESWITCH_NONE;
292+
roce_lag = roce_lag &&
293+
dev0->priv.eswitch->mode == MLX5_ESWITCH_NONE &&
294+
dev1->priv.eswitch->mode == MLX5_ESWITCH_NONE;
294295
#endif
295296

296297
if (roce_lag)

0 commit comments

Comments
 (0)