From patchwork Tue Aug 14 21:36:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 1323671 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D57D1DF266 for ; Tue, 14 Aug 2012 21:37:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753768Ab2HNVhE (ORCPT ); Tue, 14 Aug 2012 17:37:04 -0400 Received: from eu1sys200aog102.obsmtp.com ([207.126.144.113]:36454 "HELO eu1sys200aog102.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752122Ab2HNVhD (ORCPT ); Tue, 14 Aug 2012 17:37:03 -0400 Received: from MTLCAS01.mtl.com ([193.47.165.155]) (using TLSv1) by eu1sys200aob102.postini.com ([207.126.147.11]) with SMTP ID DSNKUCrE9STOGOhX3vzHeoB6faFfGBry4H+x@postini.com; Tue, 14 Aug 2012 21:36:55 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; Wed, 15 Aug 2012 00:36:51 +0300 Message-ID: <502AC4F4.7090309@mellanox.co.il> Date: Wed, 15 Aug 2012 00:36:52 +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] 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 */