Skip to content

Commit da005f9

Browse files
Colin Ian Kingdledford
authored andcommitted
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 <colin.king@canonical.com> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent 5793b46 commit da005f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/infiniband/hw/mlx5

‎drivers/infiniband/hw/mlx5/main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num,
356356
struct ib_port_attr *props)
357357
{
358358
struct mlx5_ib_dev *dev = to_mdev(device);
359-
struct mlx5_core_dev *mdev = dev->mdev;
359+
struct mlx5_core_dev *mdev;
360360
struct net_device *ndev, *upper;
361361
enum ib_mtu ndev_ib_mtu;
362362
bool put_mdev = true;

0 commit comments

Comments
 (0)