From patchwork Thu Nov 12 20:21:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 59643 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nACKJO75007931 for ; Thu, 12 Nov 2009 20:19:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753435AbZKLUTR (ORCPT ); Thu, 12 Nov 2009 15:19:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753462AbZKLUTR (ORCPT ); Thu, 12 Nov 2009 15:19:17 -0500 Received: from fg-out-1718.google.com ([72.14.220.157]:43926 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753435AbZKLUTQ (ORCPT ); Thu, 12 Nov 2009 15:19:16 -0500 Received: by fg-out-1718.google.com with SMTP id e12so1093994fga.1 for ; Thu, 12 Nov 2009 12:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:date:from:to :cc:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=vEj/Qvukw8dalOOrEcqrYIiMD/gtkE3bt6fOnLHqxKQ=; b=O3V5LqXGHadA0xvSPCVaOHaaqQ355BnI3IF4k8vBI0Eeweq7Wkuhc8Zn72BeZXuUUI 9Fh+0pyfM1tMXRTPr9QJIIx4ZHOY2Y23YrdMB2/dmCQpRMOR6EGMHygGVhJ/QaQLKLWV Y8PbcImFP/H7waHz3KDqIywbXYit/0P5EAQDE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=EbOKQ8f/qxN3NNLQKha+8WFIs8d1BMZ9oKg0D1hO3yWprfSZ3EUja1q7IvGzoO9xho uxEGOgV5DLFk5sL7N5cB9RRbSrdeI4XT4k4MHVRbkeLOOhYD5BnYQuZm61PrlBkTvvQK aUPH3w91OiT55vKLCH63nJ4ow6nUOBVVAhvCk= Received: by 10.102.12.1 with SMTP id 1mr1537235mul.63.1258057160850; Thu, 12 Nov 2009 12:19:20 -0800 (PST) Received: from me.localdomain (85.64.35.106.dynamic.barak-online.net [85.64.35.106]) by mx.google.com with ESMTPS id y6sm9753762mug.10.2009.11.12.12.19.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 12 Nov 2009 12:19:20 -0800 (PST) Received: by me.localdomain (Postfix, from userid 1000) id DD4D11209B; Thu, 12 Nov 2009 22:21:37 +0200 (IST) Date: Thu, 12 Nov 2009 22:21:37 +0200 From: Sasha Khapyorsky To: linux-rdma Cc: Sean Hefty , "Smith, Stan" , Hal Rosenstock Subject: [PATCH] opensm: cleanup intn_t uses Message-ID: <20091112202137.GQ7192@me> References: <3F6F638B8D880340AB536D29CD4C1E1912C86E8A8F@orsmsx501.amr.corp.intel.com> <20091004001316.GK17846@me> <20091112191811.GO7192@me> <81D21ED9D6F34BC1B7DA64F50EE5A7DD@amr.corp.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <81D21ED9D6F34BC1B7DA64F50EE5A7DD@amr.corp.intel.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/opensm/include/opensm/osm_mcast_tbl.h b/opensm/include/opensm/osm_mcast_tbl.h index 0745b5b..37e2c26 100644 --- a/opensm/include/opensm/osm_mcast_tbl.h +++ b/opensm/include/opensm/osm_mcast_tbl.h @@ -174,7 +174,7 @@ void osm_mcast_tbl_delete(IN osm_mcast_tbl_t ** pp_tbl); * * SYNOPSIS */ -int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN uintn_t mlid_offset); +int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN unsigned mlid_offset); /* * PARAMETERS * diff --git a/opensm/libvendor/osm_vendor_al.c b/opensm/libvendor/osm_vendor_al.c index abf3395..3ac05c9 100644 --- a/opensm/libvendor/osm_vendor_al.c +++ b/opensm/libvendor/osm_vendor_al.c @@ -489,7 +489,7 @@ Exit: static ib_api_status_t __osm_vendor_get_ca_guids(IN osm_vendor_t * const p_vend, IN ib_net64_t ** const p_guids, - IN uintn_t * const p_num_guids) + IN unsigned * const p_num_guids) { ib_api_status_t status; @@ -581,7 +581,7 @@ osm_vendor_get_all_port_attr(IN osm_vendor_t * const p_vend, ib_api_status_t status; uint32_t ca; - uintn_t ca_count; + unsigned ca_count; uint32_t port_count = 0; uint8_t port_num; uint32_t total_ports = 0; diff --git a/opensm/libvendor/osm_vendor_ibumad_sa.c b/opensm/libvendor/osm_vendor_ibumad_sa.c index 1a7d5a2..e05a5ef 100644 --- a/opensm/libvendor/osm_vendor_ibumad_sa.c +++ b/opensm/libvendor/osm_vendor_ibumad_sa.c @@ -129,9 +129,9 @@ __osmv_sa_mad_rcv_cb(IN osm_madw_t * p_madw, if (ib_get_attr_size(p_sa_mad->attr_offset)) { /* we used the offset value to calculate the number of records in here */ - query_res.result_cnt = (uintn_t) - ((p_madw->mad_size - IB_SA_MAD_HDR_SIZE) / - ib_get_attr_size(p_sa_mad->attr_offset)); + query_res.result_cnt = + (p_madw->mad_size - IB_SA_MAD_HDR_SIZE) / + ib_get_attr_size(p_sa_mad->attr_offset); OSM_LOG(p_bind->p_log, OSM_LOG_DEBUG, "Count = %u = %zu / %u (%zu)\n", query_res.result_cnt, diff --git a/opensm/libvendor/osm_vendor_mlx_sa.c b/opensm/libvendor/osm_vendor_mlx_sa.c index 0a4e050..e47f072 100644 --- a/opensm/libvendor/osm_vendor_mlx_sa.c +++ b/opensm/libvendor/osm_vendor_mlx_sa.c @@ -141,9 +141,9 @@ __osmv_sa_mad_rcv_cb(IN osm_madw_t * p_madw, "__osmv_sa_mad_rcv_cb: Count = 0\n"); } else { - query_res.result_cnt = (uintn_t) - ((p_madw->mad_size - IB_SA_MAD_HDR_SIZE) / - ib_get_attr_size(p_sa_mad->attr_offset)); + query_res.result_cnt = + (p_madw->mad_size - IB_SA_MAD_HDR_SIZE) / + ib_get_attr_size(p_sa_mad->attr_offset); osm_log(p_bind->p_log, OSM_LOG_DEBUG, "__osmv_sa_mad_rcv_cb: " "Count = %u = %zu / %u (%zu)\n", diff --git a/opensm/opensm/osm_mcast_tbl.c b/opensm/opensm/osm_mcast_tbl.c index 14f8e7a..ee59275 100644 --- a/opensm/opensm/osm_mcast_tbl.c +++ b/opensm/opensm/osm_mcast_tbl.c @@ -88,9 +88,7 @@ void osm_mcast_tbl_destroy(IN osm_mcast_tbl_t * p_tbl) void osm_mcast_tbl_set(IN osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho, IN uint8_t port) { - uintn_t mlid_offset; - uintn_t mask_offset; - uintn_t bit_mask; + unsigned mlid_offset, mask_offset, bit_mask; int16_t block_num; CL_ASSERT(p_tbl && p_tbl->p_mask_tbl); @@ -108,7 +106,7 @@ void osm_mcast_tbl_set(IN osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho, p_tbl->max_block_in_use = (uint16_t) block_num; } -int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN uintn_t mlid_offset) +int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN unsigned mlid_offset) { size_t mft_depth, size; uint16_t (*p_mask_tbl)[][IB_MCAST_POSITION_MAX + 1]; @@ -144,9 +142,7 @@ done: boolean_t osm_mcast_tbl_is_port(IN const osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho, IN uint8_t port_num) { - uintn_t mlid_offset; - uintn_t mask_offset; - uintn_t bit_mask; + unsigned mlid_offset, mask_offset, bit_mask; CL_ASSERT(p_tbl); @@ -171,7 +167,7 @@ boolean_t osm_mcast_tbl_is_port(IN const osm_mcast_tbl_t * p_tbl, boolean_t osm_mcast_tbl_is_any_port(IN const osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho) { - uintn_t mlid_offset; + unsigned mlid_offset; uint8_t position; uint16_t result = 0; @@ -223,7 +219,7 @@ ib_api_status_t osm_mcast_tbl_set_block(IN osm_mcast_tbl_t * p_tbl, void osm_mcast_tbl_clear_mlid(IN osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho) { - uintn_t mlid_offset; + unsigned mlid_offset; CL_ASSERT(p_tbl); CL_ASSERT(mlid_ho >= IB_LID_MCAST_START_HO); diff --git a/opensm/opensm/osm_sa_multipath_record.c b/opensm/opensm/osm_sa_multipath_record.c index ca3d967..0658480 100644 --- a/opensm/opensm/osm_sa_multipath_record.c +++ b/opensm/opensm/osm_sa_multipath_record.c @@ -872,8 +872,7 @@ static uint32_t mpr_rcv_get_port_pair_paths(IN osm_sa_t * sa, uint16_t dest_lid_ho; uint32_t path_num = 0; uint8_t preference; - uintn_t src_offset; - uintn_t dest_offset; + unsigned src_offset, dest_offset; OSM_LOG_ENTER(sa->p_log); @@ -1058,7 +1057,7 @@ static osm_mpr_item_t *mpr_rcv_get_apm_port_pair_paths(IN osm_sa_t * sa, uint16_t dest_lid_max_ho; uint16_t src_lid_ho; uint16_t dest_lid_ho; - uintn_t iterations; + unsigned iterations; int src_lids, dest_lids; OSM_LOG_ENTER(sa->p_log); diff --git a/opensm/opensm/osm_sa_path_record.c b/opensm/opensm/osm_sa_path_record.c index 457b40c..62a2a8b 100644 --- a/opensm/opensm/osm_sa_path_record.c +++ b/opensm/opensm/osm_sa_path_record.c @@ -898,9 +898,7 @@ static void pr_rcv_get_port_pair_paths(IN osm_sa_t * sa, uint16_t dest_lid_ho; uint32_t path_num; uint8_t preference; - uintn_t iterations; - uintn_t src_offset; - uintn_t dest_offset; + unsigned iterations, src_offset, dest_offset; OSM_LOG_ENTER(sa->p_log); @@ -1015,7 +1013,7 @@ static void pr_rcv_get_port_pair_paths(IN osm_sa_t * sa, else if (comp_mask & IB_PR_COMPMASK_NUMBPATH) iterations = ib_path_rec_num_path(p_pr); else - iterations = (uintn_t) (-1); + iterations = (unsigned) (-1); while (path_num < iterations) { /*