mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 15:09:50 -04:00
net/mlx5e: Simplify condition on esw_vport_enable_qos()
esw->qos.enabled will only be true if both MLX5_CAP_GEN(dev, qos) and MLX5_CAP_QOS(dev, esw_scheduling) are true. Therefore, remove them from the condition in and rely only on esw->qos.enabled. Signed-off-by: Eli Cohen <elic@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
838b00a226
commit
21bad8da1e
@@ -1042,8 +1042,7 @@ static int esw_vport_enable_qos(struct mlx5_eswitch *esw,
|
||||
void *vport_elem;
|
||||
int err = 0;
|
||||
|
||||
if (!esw->qos.enabled || !MLX5_CAP_GEN(dev, qos) ||
|
||||
!MLX5_CAP_QOS(dev, esw_scheduling))
|
||||
if (!esw->qos.enabled)
|
||||
return 0;
|
||||
|
||||
if (vport->qos.enabled)
|
||||
|
||||
Reference in New Issue
Block a user