From: Colin Ian King Date: Fri, 2 Aug 2019 15:13:16 +0000 (+0100) Subject: net/mlx5: remove self-assignment on esw->dev X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=694a296024d4cd5e637fa679c4c7e4c63a7c24f3;p=openwrt%2Fstaging%2Fblogic.git net/mlx5: remove self-assignment on esw->dev There is a self assignment of esw->dev to itself, clean this up by removing it. Also make dev a const pointer. Addresses-Coverity: ("Self assignment") Fixes: 6cedde451399 ("net/mlx5: E-Switch, Verify support QoS element type") Signed-off-by: Colin Ian King Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index d4465dd18c11..81e03e493a01 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c @@ -1413,7 +1413,7 @@ out: static bool element_type_supported(struct mlx5_eswitch *esw, int type) { - struct mlx5_core_dev *dev = esw->dev = esw->dev; + const struct mlx5_core_dev *dev = esw->dev; switch (type) { case SCHEDULING_CONTEXT_ELEMENT_TYPE_TSAR: