From patchwork Wed Mar 24 15:50:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 87943 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2OFoi6x022085 for ; Wed, 24 Mar 2010 15:50:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751747Ab0CXPud (ORCPT ); Wed, 24 Mar 2010 11:50:33 -0400 Received: from mail.mellanox.co.il ([194.90.237.43]:39814 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752560Ab0CXPuc (ORCPT ); Wed, 24 Mar 2010 11:50:32 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 24 Mar 2010 17:50:25 +0200 Received: from [10.4.1.29] ([10.4.1.29]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 24 Mar 2010 17:50:25 +0200 Message-ID: <4BAA34B2.9060808@dev.mellanox.co.il> Date: Wed, 24 Mar 2010 17:50:10 +0200 From: Yevgeny Kliteynik User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky , Linux RDMA Subject: [PATCH] opensm: fixing compilation issues in some header files X-OriginalArrivalTime: 24 Mar 2010 15:50:25.0747 (UTC) FILETIME=[B84BF230:01CACB69] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17272.005 X-TM-AS-Result: No--7.389700-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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 24 Mar 2010 15:50:45 +0000 (UTC) diff --git a/opensm/include/opensm/osm_pkey.h b/opensm/include/opensm/osm_pkey.h index d10479d..53e9657 100644 --- a/opensm/include/opensm/osm_pkey.h +++ b/opensm/include/opensm/osm_pkey.h @@ -252,7 +252,8 @@ static inline ib_pkey_table_t *osm_pkey_tbl_block_get(const osm_pkey_tbl_t * uint16_t block) { return ((block < cl_ptr_vector_get_size(&p_pkey_tbl->blocks)) ? - cl_ptr_vector_get(&p_pkey_tbl->blocks, block) : NULL); + (ib_pkey_table_t *)cl_ptr_vector_get( + &p_pkey_tbl->blocks, block) : NULL); }; /* @@ -282,8 +283,9 @@ static inline ib_pkey_table_t *osm_pkey_tbl_new_block_get(const osm_pkey_tbl_t * p_pkey_tbl, uint16_t block) { - return (block < cl_ptr_vector_get_size(&p_pkey_tbl->new_blocks)) ? - cl_ptr_vector_get(&p_pkey_tbl->new_blocks, block) : NULL; + return ((block < cl_ptr_vector_get_size(&p_pkey_tbl->new_blocks)) ? + (ib_pkey_table_t *)cl_ptr_vector_get( + &p_pkey_tbl->new_blocks, block) : NULL); }; /****f* OpenSM: osm_pkey_tbl_set_new_entry diff --git a/opensm/include/opensm/osm_port.h b/opensm/include/opensm/osm_port.h index ff0a178..8c68c99 100644 --- a/opensm/include/opensm/osm_port.h +++ b/opensm/include/opensm/osm_port.h @@ -549,7 +549,7 @@ static inline void osm_physp_set_slvl_tbl(IN osm_physp_t * p_physp, CL_ASSERT(p_slvl_tbl); CL_ASSERT(osm_physp_is_valid(p_physp)); - p_tbl = cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num); + p_tbl = (ib_slvl_table_t *)cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num); *p_tbl = *p_slvl_tbl; } @@ -590,7 +590,7 @@ static inline ib_slvl_table_t *osm_physp_get_slvl_tbl(IN const osm_physp_t * ib_slvl_table_t *p_tbl; CL_ASSERT(osm_physp_is_valid(p_physp)); - p_tbl = cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num); + p_tbl = (ib_slvl_table_t *)cl_ptr_vector_get(&p_physp->slvl_by_port, in_port_num); return p_tbl; } diff --git a/opensm/include/opensm/osm_subnet.h b/opensm/include/opensm/osm_subnet.h index 3970e98..2eef9c7 100644 --- a/opensm/include/opensm/osm_subnet.h +++ b/opensm/include/opensm/osm_subnet.h @@ -1015,7 +1015,7 @@ struct osm_mgrp *osm_get_mgrp_by_mgid(IN osm_subn_t * subn, IN ib_gid_t * mgid); */ static inline struct osm_mgrp_box *osm_get_mbox_by_mlid(osm_subn_t const *p_subn, ib_net16_t mlid) { - return p_subn->mboxes[cl_ntoh16(mlid) - IB_LID_MCAST_START_HO]; + return (struct osm_mgrp_box *)p_subn->mboxes[cl_ntoh16(mlid) - IB_LID_MCAST_START_HO]; } /* * PARAMETERS