From patchwork Thu Oct 15 18:43:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 54082 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 n9FK9sk0031265 for ; Thu, 15 Oct 2009 20:09:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758665AbZJOUAz (ORCPT ); Thu, 15 Oct 2009 16:00:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933472AbZJOUAz (ORCPT ); Thu, 15 Oct 2009 16:00:55 -0400 Received: from qmta01.westchester.pa.mail.comcast.net ([76.96.62.16]:38034 "EHLO QMTA01.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758665AbZJOUAy (ORCPT ); Thu, 15 Oct 2009 16:00:54 -0400 Received: from OMTA11.westchester.pa.mail.comcast.net ([76.96.62.36]) by QMTA01.westchester.pa.mail.comcast.net with comcast id t3141c01U0mv7h05180J7t; Thu, 15 Oct 2009 20:00:18 +0000 Received: from hal.comcast.net ([75.69.247.31]) by OMTA11.westchester.pa.mail.comcast.net with comcast id t80J1c0090hNrtn3X80JX5; Thu, 15 Oct 2009 20:00:18 +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 n9FK0jbV014885; Thu, 15 Oct 2009 16:00:50 -0400 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id n9FIh8mD009774; Thu, 15 Oct 2009 14:43:08 -0400 Date: Thu, 15 Oct 2009 14:43:07 -0400 From: Hal Rosenstock To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH] opensm/osm_lid_mgr.c: Cosmetic commentary changes Message-ID: <20091015184307.GA9771@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 diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c index 74b5e39..990c26e 100644 --- a/opensm/opensm/osm_lid_mgr.c +++ b/opensm/opensm/osm_lid_mgr.c @@ -175,8 +175,8 @@ static void lid_mgr_validate_db(IN osm_lid_mgr_t * p_mgr) lids_ok = FALSE; } else if (min_lid != max_lid && (min_lid & lmc_mask) != min_lid) { - /* check that if the lids define a range that is valid - for the current LMC mask */ + /* check that if the lids define a range that is + valid for the current LMC mask */ OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 0313: " "LID range [%u:%u] for guid:0x%016" @@ -210,7 +210,7 @@ static void lid_mgr_validate_db(IN osm_lid_mgr_t * p_mgr) "guid:0x%016" PRIx64 "\n", p_item->guid); } else { - /* mark it was visited */ + /* mark that it was visited */ for (lid = min_lid; lid <= max_lid; lid++) p_mgr->used_lids[lid] = 1; } @@ -412,8 +412,8 @@ static int lid_mgr_init_sweep(IN osm_lid_mgr_t * p_mgr) Our task is to find free lid ranges. A lid can be used if 1. a persistent assignment exists - 2. the lid is used by a discovered port that does not have a persistent - assignment. + 2. the lid is used by a discovered port that does not have a + persistent assignment. scan through all lid values of both the persistent table and discovered table. @@ -454,15 +454,15 @@ static int lid_mgr_init_sweep(IN osm_lid_mgr_t * p_mgr) lid))) { /* we have a port. Now lets see if we can preserve its lid range. */ /* For that, we need to make sure: - 1. The port has a (legal) persistency entry. Then the local lid - is free (we will use the persistency value). + 1. The port has a (legal) persistency entry. Then the + local lid is free (we will use the persistency value). 2. Can the port keep its local assignment? a. Make sure the lid a aligned. - b. Make sure all needed lids (for the lmc) are free according - to persistency table. + b. Make sure all needed lids (for the lmc) are free + according to persistency table. */ - /* qualify the guid of the port is not persistently mapped to - another range */ + /* qualify the guid of the port is not persistently + mapped to another range */ if (!osm_db_guid2lid_get(p_mgr->p_g2l, cl_ntoh64 (osm_port_get_guid(p_port)), @@ -474,8 +474,9 @@ static int lid_mgr_init_sweep(IN osm_lid_mgr_t * p_mgr) lid, db_min_lid, db_max_lid); } else { /* can the port keep its assignment ? */ - /* get the lid range of that port, and the required number - of lids we are about to assign to it */ + /* get the lid range of that port, and the + required number of lids we are about to + assign to it */ osm_port_get_lid_range_ho(p_port, &disc_min_lid, &disc_max_lid);