From patchwork Thu Feb 4 14:27:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 76996 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 o14ETwp1017954 for ; Thu, 4 Feb 2010 14:29:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758275Ab0BDO35 (ORCPT ); Thu, 4 Feb 2010 09:29:57 -0500 Received: from qmta10.westchester.pa.mail.comcast.net ([76.96.62.17]:42604 "EHLO qmta10.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758237Ab0BDO35 (ORCPT ); Thu, 4 Feb 2010 09:29:57 -0500 Received: from omta07.westchester.pa.mail.comcast.net ([76.96.62.59]) by qmta10.westchester.pa.mail.comcast.net with comcast id dnzx1d0091GhbT85AqVxC4; Thu, 04 Feb 2010 14:29:57 +0000 Received: from hal.comcast.net ([75.69.247.31]) by omta07.westchester.pa.mail.comcast.net with comcast id dqVw1d0080hNrtn3TqVwp3; Thu, 04 Feb 2010 14:29:57 +0000 Received: from hal.comcast.net (localhost.localdomain [127.0.0.1]) by hal.comcast.net (8.14.3/8.14.3) with ESMTP id o14ESmYJ014222; Thu, 4 Feb 2010 09:28:53 -0500 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id o14ERTbo014126; Thu, 4 Feb 2010 09:27:29 -0500 Date: Thu, 4 Feb 2010 09:27:28 -0500 From: Hal Rosenstock To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH] opensm/osm_mcast_mgr.c: Cosmetic changes Message-ID: <20100204142728.GA14122@comcast.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) 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]); Thu, 04 Feb 2010 14:29:58 +0000 (UTC) diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c index 19d0593..37ff120 100644 --- a/opensm/opensm/osm_mcast_mgr.c +++ b/opensm/opensm/osm_mcast_mgr.c @@ -195,7 +195,7 @@ static void mcast_mgr_build_switch_map(osm_sm_t * sm, cl_qmap_insert(p_mcast_member_sw_tbl, port_guid, &remote_sw->mgrp_item); /* New element in the table */ if (p_port->p_node->sw) - /* the switch is MC memeber */ + /* the switch is MC member */ remote_sw->is_mc_member = 1; else /* for others - update MC count */ @@ -229,8 +229,8 @@ static void mcast_mgr_destroy_switch_map(osm_sm_t * sm, of the group HCAs **********************************************************************/ #ifdef OSM_VENDOR_INTF_ANAFA -static float osm_mcast_mgr_compute_avg_hops(osm_sm_t * sm, cl_qmap_t * m, - const osm_switch_t * this_sw) +static float mcast_mgr_compute_avg_hops(osm_sm_t * sm, cl_qmap_t * m, + const osm_switch_t * this_sw) { float avg_hops = 0; uint32_t hops = 0; @@ -254,7 +254,7 @@ static float osm_mcast_mgr_compute_avg_hops(osm_sm_t * sm, cl_qmap_t * m, num_ports += sw->num_of_mcm + sw->is_mc_member; } - /* We should be here if there aren't any ports in the group. */ + /* We shouldn't be here if there aren't any ports in the group. */ CL_ASSERT(num_ports); avg_hops = (float)(hops / num_ports); @@ -263,8 +263,8 @@ static float osm_mcast_mgr_compute_avg_hops(osm_sm_t * sm, cl_qmap_t * m, return avg_hops; } #else -static float osm_mcast_mgr_compute_max_hops(osm_sm_t * sm, cl_qmap_t * m, - const osm_switch_t * this_sw) +static float mcast_mgr_compute_max_hops(osm_sm_t * sm, cl_qmap_t * m, + const osm_switch_t * this_sw) { uint32_t max_hops = 0, hops; uint16_t lid; @@ -322,9 +322,9 @@ static osm_switch_t *mcast_mgr_find_optimal_switch(osm_sm_t * sm, continue; #ifdef OSM_VENDOR_INTF_ANAFA - hops = osm_mcast_mgr_compute_avg_hops(sm, &mgrp_sw_map, p_sw); + hops = mcast_mgr_compute_avg_hops(sm, &mgrp_sw_map, p_sw); #else - hops = osm_mcast_mgr_compute_max_hops(sm, &mgrp_sw_map, p_sw); + hops = mcast_mgr_compute_max_hops(sm, &mgrp_sw_map, p_sw); #endif OSM_LOG(sm->p_log, OSM_LOG_DEBUG, @@ -352,7 +352,7 @@ static osm_switch_t *mcast_mgr_find_optimal_switch(osm_sm_t * sm, } /********************************************************************** - This function returns the existing or optimal root swtich for the tree. + This function returns the existing or optimal root switch for the tree. **********************************************************************/ static osm_switch_t *mcast_mgr_find_root_switch(osm_sm_t * sm, cl_qlist_t *list) {