diff options
| author | Colin Ian King <[email protected]> | 2018-01-09 15:55:43 +0000 |
|---|---|---|
| committer | Doug Ledford <[email protected]> | 2018-01-10 16:52:52 -0500 |
| commit | da005f9fab3af121a8a9ef17ff7e06ddbc8edf11 (patch) | |
| tree | 1015176a960f778af4564c436059bc72e410b8ad | |
| parent | 5793b46521553774d66653993cfdc132846bb23d (diff) | |
IB/mlx5: remove redundant assignment of mdev
The initial assignment to mdev is redundant as mdev is re-assigned
later and the first assigned value is never read. Remove this
redundant assignment.
Cleans up clang warning:
drivers/infiniband/hw/mlx5/main.c:359:24: warning: Value stored
to 'mdev' during its initialization is never read
Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Leon Romanovsky <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
| -rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 5d6fba986fa5..91e6b42798e5 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -356,7 +356,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num, struct ib_port_attr *props) { struct mlx5_ib_dev *dev = to_mdev(device); - struct mlx5_core_dev *mdev = dev->mdev; + struct mlx5_core_dev *mdev; struct net_device *ndev, *upper; enum ib_mtu ndev_ib_mtu; bool put_mdev = true; |