From patchwork Mon Dec 6 23:55:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Smith, Stan" X-Patchwork-Id: 380752 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB6NtRME017546 for ; Mon, 6 Dec 2010 23:55:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753919Ab0LFXzP (ORCPT ); Mon, 6 Dec 2010 18:55:15 -0500 Received: from mga02.intel.com ([134.134.136.20]:19694 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753829Ab0LFXzM (ORCPT ); Mon, 6 Dec 2010 18:55:12 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 06 Dec 2010 15:55:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,307,1288594800"; d="scan'208";a="581163690" Received: from scsmith-mobl1.amr.corp.intel.com (HELO scsmithMOBL1) ([10.7.151.54]) by orsmga002.jf.intel.com with ESMTP; 06 Dec 2010 15:55:12 -0800 From: "Stan C. Smith" To: "'Sasha Khapyorsky'" Cc: "Linux RDMA" Subject: Re: [PATCH] replace (long*)(long) casting with transportable data type (uintptr_t) Date: Mon, 6 Dec 2010 15:55:11 -0800 Message-ID: <3D555CA8351C471B84CD9D6432AFC6D0@amr.corp.intel.com> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcuVoQUFbt4aWmEVSYefl6DSLk4Bwg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 06 Dec 2010 23:55:27 +0000 (UTC) diff --git a/opensm/libvendor/osm_vendor_ibumad_sa.c b/opensm/libvendor/osm_vendor_ibumad_sa.c index 1fdcc47..63728ad 100644 --- a/opensm/libvendor/osm_vendor_ibumad_sa.c +++ b/opensm/libvendor/osm_vendor_ibumad_sa.c @@ -85,8 +85,7 @@ __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 *) (long *)(long)(p_req_madw->context.ni_context. - node_guid); + (osmv_query_req_t *) p_req_madw->context.ni_context.node_guid; /* provide the context of the original request in the result */ query_res.query_context = p_query_req_copy->query_context; @@ -181,8 +180,7 @@ static void __osmv_sa_mad_err_cb(IN void *bind_context, IN osm_madw_t * p_madw) /* Obtain the sent context etc */ p_query_req_copy = - (osmv_query_req_t *) (long *)(long)(p_madw->context.ni_context. - node_guid); + (osmv_query_req_t *) p_madw->context.ni_context.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, } *p_query_req_copy = *p_query_req; p_madw->context.ni_context.node_guid = - (ib_net64_t) (long)p_query_req_copy; + (ib_net64_t) (uintptr_t)p_query_req_copy; /* we can support async as well as sync calls */ sync = ((p_query_req->flags & OSM_SA_FLAGS_SYNC) == OSM_SA_FLAGS_SYNC);