IB/mlx4: Simplify retrieval of ib_device
authorEli Cohen <eli@mellanox.co.il>
Wed, 27 Jan 2010 13:57:03 +0000 (13:57 +0000)
committerRoland Dreier <rolandd@cisco.com>
Fri, 12 Feb 2010 23:18:06 +0000 (15:18 -0800)
struct ib_qp  already holds a pointer to the ib device. No need to dive to the
hw device object to retrieve it.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mlx4/qp.c

index 2a97c964b9ef6c425eeb2072980be58b7a782c40..b377671264e92722c17dc49d819f0f0a6002d989 100644 (file)
@@ -1214,7 +1214,7 @@ out:
 static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr,
                            void *wqe, unsigned *mlx_seg_len)
 {
-       struct ib_device *ib_dev = &to_mdev(sqp->qp.ibqp.device)->ib_dev;
+       struct ib_device *ib_dev = sqp->qp.ibqp.device;
        struct mlx4_wqe_mlx_seg *mlx = wqe;
        struct mlx4_wqe_inline_seg *inl = wqe + sizeof *mlx;
        struct mlx4_ib_ah *ah = to_mah(wr->wr.ud.ah);