From patchwork Wed Jan 27 13:57:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 75455 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0RDsuel030514 for ; Wed, 27 Jan 2010 13:54:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754017Ab0A0Nyz (ORCPT ); Wed, 27 Jan 2010 08:54:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754912Ab0A0Nyz (ORCPT ); Wed, 27 Jan 2010 08:54:55 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:59698 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754017Ab0A0Nyz (ORCPT ); Wed, 27 Jan 2010 08:54:55 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.co.il) with SMTP; 27 Jan 2010 15:54:49 +0200 Received: from localhost ([10.4.1.30]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 27 Jan 2010 15:54:48 +0200 Date: Wed, 27 Jan 2010 15:57:03 +0200 From: Eli Cohen To: Roland Dreier Cc: Linux RDMA list Subject: [PATCH] mlx4_ib: simplify retrieval of ib_device Message-ID: <20100127135703.GA31648@mtls03> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 27 Jan 2010 13:54:49.0207 (UTC) FILETIME=[4AA9F070:01CA9F58] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17156.007 X-TM-AS-Result: No--4.065800-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 2a97c96..b377671 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -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);