mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 04:41:21 -04:00
net/mlx5: Lag, Remove redundant bool allocation on the stack
There is no need to allocate the bool variable and can just return the value. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
committed by
Saeed Mahameed
parent
9a49a64ea7
commit
b399b066e2
@@ -28,13 +28,9 @@ static bool mlx5_lag_multipath_check_prereq(struct mlx5_lag *ldev)
|
||||
|
||||
bool mlx5_lag_is_multipath(struct mlx5_core_dev *dev)
|
||||
{
|
||||
struct mlx5_lag *ldev;
|
||||
bool res;
|
||||
struct mlx5_lag *ldev = mlx5_lag_dev(dev);
|
||||
|
||||
ldev = mlx5_lag_dev(dev);
|
||||
res = ldev && __mlx5_lag_is_multipath(ldev);
|
||||
|
||||
return res;
|
||||
return ldev && __mlx5_lag_is_multipath(ldev);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -115,10 +115,8 @@ int mlx5_lag_mpesw_do_mirred(struct mlx5_core_dev *mdev,
|
||||
bool mlx5_lag_mpesw_is_activated(struct mlx5_core_dev *dev)
|
||||
{
|
||||
struct mlx5_lag *ldev = mlx5_lag_dev(dev);
|
||||
bool ret;
|
||||
|
||||
ret = ldev && ldev->mode == MLX5_LAG_MODE_MPESW;
|
||||
return ret;
|
||||
return ldev && ldev->mode == MLX5_LAG_MODE_MPESW;
|
||||
}
|
||||
|
||||
void mlx5_lag_mpesw_init(struct mlx5_lag *ldev)
|
||||
|
||||
Reference in New Issue
Block a user