From patchwork Tue Sep 11 15:28:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 1438651 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 993924025E for ; Tue, 11 Sep 2012 15:28:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756821Ab2IKP21 (ORCPT ); Tue, 11 Sep 2012 11:28:27 -0400 Received: from eu1sys200aog108.obsmtp.com ([207.126.144.125]:54916 "HELO eu1sys200aog108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756550Ab2IKP20 (ORCPT ); Tue, 11 Sep 2012 11:28:26 -0400 Received: from MTLCAS01.mtl.com ([193.47.165.155]) (using TLSv1) by eu1sys200aob108.postini.com ([207.126.147.11]) with SMTP ID DSNKUE9YmBWtn+ULvoZGAIzQj+iFN+yK6+Es@postini.com; Tue, 11 Sep 2012 15:28:25 UTC Received: from [10.7.17.62] (10.0.13.1) by MTLCAS01.mtl.com (10.0.8.71) with Microsoft SMTP Server id 14.2.247.3; Tue, 11 Sep 2012 18:28:22 +0300 Message-ID: <504F5897.5080301@mellanox.co.il> Date: Tue, 11 Sep 2012 18:28:23 +0300 From: Yevgeny Kliteynik Reply-To: User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: , Linux RDMA , Yevgeny Kliteynik Subject: [PATCH 4/8 v2] opensm/libvendor/osm_vendor_ibumad_sa.c: use wrapper function instead of direct access X-Originating-IP: [10.0.13.1] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Use existing wrapper function to get to context instead of direct access. Signed-off-by: Yevgeny Kliteynik --- libvendor/osm_vendor_ibumad_sa.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libvendor/osm_vendor_ibumad_sa.c b/libvendor/osm_vendor_ibumad_sa.c index 1d482c0..f715cf6 100644 --- a/libvendor/osm_vendor_ibumad_sa.c +++ b/libvendor/osm_vendor_ibumad_sa.c @@ -84,9 +84,8 @@ __osmv_sa_mad_rcv_cb(IN osm_madw_t * p_madw, } /* obtain the sent context since we store it during send in the ni_ctx */ - p_query_req_copy = - (osmv_query_req_t *) (uintptr_t)(p_req_madw->context.ni_context. - node_guid); + p_query_req_copy = (osmv_query_req_t *) + (uintptr_t)(osm_madw_get_ni_context_ptr(p_req_madw)->node_guid); /* provide the context of the original request in the result */ query_res.query_context = p_query_req_copy->query_context; @@ -180,9 +179,8 @@ static void __osmv_sa_mad_err_cb(IN void *bind_context, IN osm_madw_t * p_madw) OSM_LOG_ENTER(p_bind->p_log); /* Obtain the sent context etc */ - p_query_req_copy = - (osmv_query_req_t *) (uintptr_t)(p_madw->context.ni_context. - node_guid); + p_query_req_copy = (osmv_query_req_t *) + (uintptr_t)(osm_madw_get_ni_context_ptr(p_madw)->node_guid); /* provide the context of the original request in the result */ query_res.query_context = p_query_req_copy->query_context; @@ -433,7 +431,7 @@ __osmv_send_sa_req(IN osmv_sa_bind_info_t * p_bind, goto Exit; } *p_query_req_copy = *p_query_req; - p_madw->context.ni_context.node_guid = + osm_madw_get_ni_context_ptr(p_madw)->node_guid = (ib_net64_t) (uintptr_t)p_query_req_copy; /* we can support async as well as sync calls */