From patchwork Fri Apr 29 13:28:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 741061 X-Patchwork-Delegate: alexne@voltaire.com 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 p3TDQl4Z010898 for ; Fri, 29 Apr 2011 13:28:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758609Ab1D2N2L (ORCPT ); Fri, 29 Apr 2011 09:28:11 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:62837 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758587Ab1D2N2K (ORCPT ); Fri, 29 Apr 2011 09:28:10 -0400 Received: by mail-wy0-f174.google.com with SMTP id 21so2840843wya.19 for ; Fri, 29 Apr 2011 06:28:07 -0700 (PDT) Received: by 10.227.184.66 with SMTP id cj2mr892078wbb.90.1304083687801; Fri, 29 Apr 2011 06:28:07 -0700 (PDT) Received: from [192.168.1.100] (c-71-192-10-85.hsd1.ma.comcast.net [71.192.10.85]) by mx.google.com with ESMTPS id h11sm1706154wbc.60.2011.04.29.06.28.05 (version=SSLv3 cipher=OTHER); Fri, 29 Apr 2011 06:28:06 -0700 (PDT) Message-ID: <4DBABCE3.8020608@dev.mellanox.co.il> Date: Fri, 29 Apr 2011 09:28:03 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Alex Netes CC: "linux-rdma@vger.kernel.org" Subject: [PATCH 12/13] opensm: Some cosmetic formatting changes 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.6 (demeter1.kernel.org [140.211.167.41]); Fri, 29 Apr 2011 13:28:12 +0000 (UTC) From ab2bd33678cbeaee545b43184e951732148e5e27 Mon Sep 17 00:00:00 2001 From: Hal Rosenstock Date: Fri, 29 Apr 2011 13:45:27 +0300 Subject: [PATCH] opensm: Some cosmetic formatting changes Signed-off-by: Hal Rosenstock --- opensm/osm_multicast.c | 6 +++--- opensm/osm_state_mgr.c | 14 ++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/opensm/osm_multicast.c b/opensm/osm_multicast.c index c539bb2..cde2589 100644 --- a/opensm/osm_multicast.c +++ b/opensm/osm_multicast.c @@ -85,7 +85,7 @@ void mgrp_delete(IN osm_mgrp_t * p_mgrp) p_next_mcm_alias_guid = (osm_mcm_alias_guid_t *) cl_qmap_next(&p_mcm_alias_guid->map_item); osm_mcm_alias_guid_delete(&p_mcm_alias_guid); - } + } p_next_mcm_port = (osm_mcm_port_t *) cl_qmap_head(&p_mgrp->mcm_port_tbl); @@ -214,7 +214,7 @@ static boolean_t is_qmap_empty_for_port(IN const cl_qmap_t * const p_map, cl_map_item_t *item; osm_mcm_alias_guid_t *mcm_alias_guid; - for (item = cl_qmap_head(p_map); item != cl_qmap_end(p_map); + for (item = cl_qmap_head(p_map); item != cl_qmap_end(p_map); item = cl_qmap_next(item)) { mcm_alias_guid = (osm_mcm_alias_guid_t *) item; if (mcm_alias_guid->p_base_mcm_port->port == port) { @@ -380,7 +380,7 @@ void osm_mgrp_remove_port(osm_subn_t * subn, osm_log_t * log, osm_mgrp_t * mgrp, OSM_LOG(log, OSM_LOG_DEBUG, "removing alias GUID 0x%" PRIx64 "\n", cl_ntoh64(mcm_alias_guid->alias_guid)); cl_qmap_remove_item(&mgrp->mcm_alias_port_tbl, - &mcm_alias_guid->map_item); + &mcm_alias_guid->map_item); if (is_qmap_empty_for_port(&mgrp->mcm_alias_port_tbl, mcm_alias_guid->p_base_mcm_port->port)) { /* last alias in mcast group for this port */ OSM_LOG(log, OSM_LOG_DEBUG, "removing port 0x%" PRIx64 "\n", diff --git a/opensm/osm_state_mgr.c b/opensm/osm_state_mgr.c index dd308f2..131242d 100644 --- a/opensm/osm_state_mgr.c +++ b/opensm/osm_state_mgr.c @@ -1113,7 +1113,8 @@ static void do_sweep(osm_sm_t * sm) if (sm->p_subn->opt.sa_db_dump && !osm_sa_db_file_dump(sm->p_subn->p_osm)) osm_opensm_report_event(sm->p_subn->p_osm, - OSM_EVENT_ID_SA_DB_DUMPED, NULL); + OSM_EVENT_ID_SA_DB_DUMPED, + NULL); OSM_LOG_MSG_BOX(sm->p_log, OSM_LOG_VERBOSE, "LIGHT SWEEP COMPLETE"); return; @@ -1162,7 +1163,8 @@ static void do_sweep(osm_sm_t * sm) OSM_LOG_MSG_BOX(sm->p_log, OSM_LOG_VERBOSE, "REROUTE COMPLETE"); osm_opensm_report_event(sm->p_subn->p_osm, - OSM_EVENT_ID_UCAST_ROUTING_DONE, NULL); + OSM_EVENT_ID_UCAST_ROUTING_DONE, + NULL); return; } } @@ -1205,10 +1207,10 @@ repeat_discovery: osm_drop_mgr_process(sm); /* Move to DISCOVERING state */ - if (sm->p_subn->sm_state != IB_SMINFO_STATE_DISCOVERING) + if (sm->p_subn->sm_state != IB_SMINFO_STATE_DISCOVERING) osm_sm_state_mgr_process(sm, OSM_SM_SIGNAL_DISCOVER); osm_opensm_report_event(sm->p_subn->p_osm, - OSM_EVENT_ID_STATE_CHANGE, NULL); + OSM_EVENT_ID_STATE_CHANGE, NULL); return; } @@ -1230,7 +1232,7 @@ repeat_discovery: /* notify master SM about us */ osm_send_trap144(sm, 0); osm_opensm_report_event(sm->p_subn->p_osm, - OSM_EVENT_ID_STATE_CHANGE, NULL); + OSM_EVENT_ID_STATE_CHANGE, NULL); return; } @@ -1346,7 +1348,7 @@ repeat_discovery: OSM_LOG_MSG_BOX(sm->p_log, OSM_LOG_VERBOSE, "SWITCHES CONFIGURED FOR UNICAST"); osm_opensm_report_event(sm->p_subn->p_osm, - OSM_EVENT_ID_UCAST_ROUTING_DONE, NULL); + OSM_EVENT_ID_UCAST_ROUTING_DONE, NULL); if (!sm->p_subn->opt.disable_multicast) { osm_mcast_mgr_process(sm);