From patchwork Fri Oct 9 14:48:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 52748 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 n99F2k3C022640 for ; Fri, 9 Oct 2009 15:02:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761072AbZJIOyb (ORCPT ); Fri, 9 Oct 2009 10:54:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761071AbZJIOyb (ORCPT ); Fri, 9 Oct 2009 10:54:31 -0400 Received: from qmta08.westchester.pa.mail.comcast.net ([76.96.62.80]:59481 "EHLO QMTA08.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760897AbZJIOya (ORCPT ); Fri, 9 Oct 2009 10:54:30 -0400 X-Greylist: delayed 321 seconds by postgrey-1.27 at vger.kernel.org; Fri, 09 Oct 2009 10:54:30 EDT Received: from OMTA21.westchester.pa.mail.comcast.net ([76.96.62.72]) by QMTA08.westchester.pa.mail.comcast.net with comcast id qbW71c0051ZXKqc58enujF; Fri, 09 Oct 2009 14:47:54 +0000 Received: from hal.comcast.net ([75.69.247.31]) by OMTA21.westchester.pa.mail.comcast.net with comcast id qeuT1c00v0hNrtn3heuUXA; Fri, 09 Oct 2009 14:54:28 +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 n99EngAO017918; Fri, 9 Oct 2009 10:49:48 -0400 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id n99EmbC0017872; Fri, 9 Oct 2009 10:48:37 -0400 Date: Fri, 9 Oct 2009 10:48:37 -0400 From: Hal Rosenstock To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH] opensm/osm_pkey.c: Cosmetic changes Message-ID: <20091009144837.GC17861@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_pkey.c b/opensm/opensm/osm_pkey.c index 6075b6a..6355718 100644 --- a/opensm/opensm/osm_pkey.c +++ b/opensm/opensm/osm_pkey.c @@ -97,7 +97,7 @@ ib_api_status_t osm_pkey_tbl_init(IN osm_pkey_tbl_t * p_pkey_tbl) cl_qlist_init(&p_pkey_tbl->pending); p_pkey_tbl->used_blocks = 0; p_pkey_tbl->max_blocks = 0; - return (IB_SUCCESS); + return IB_SUCCESS; } /********************************************************************** @@ -146,7 +146,7 @@ ib_api_status_t osm_pkey_tbl_set(IN osm_pkey_tbl_t * p_pkey_tbl, p_pkey_block = (ib_pkey_table_t *) malloc(sizeof(ib_pkey_table_t)); if (!p_pkey_block) - return (IB_ERROR); + return IB_ERROR; memset(p_pkey_block, 0, sizeof(ib_pkey_table_t)); cl_ptr_vector_set(&p_pkey_tbl->blocks, block, p_pkey_block); } @@ -191,7 +191,7 @@ ib_api_status_t osm_pkey_tbl_set(IN osm_pkey_tbl_t * p_pkey_tbl, ); } } - return (IB_SUCCESS); + return IB_SUCCESS; } /********************************************************************** @@ -210,7 +210,7 @@ ib_api_status_t osm_pkey_tbl_set_new_entry(IN osm_pkey_tbl_t * p_pkey_tbl, if (!(p_block = osm_pkey_tbl_new_block_get(p_pkey_tbl, block_idx))) { p_block = (ib_pkey_table_t *) malloc(sizeof(ib_pkey_table_t)); if (!p_block) - return (IB_ERROR); + return IB_ERROR; memset(p_block, 0, sizeof(ib_pkey_table_t)); cl_ptr_vector_set(&p_pkey_tbl->new_blocks, block_idx, p_block); } @@ -219,7 +219,7 @@ ib_api_status_t osm_pkey_tbl_set_new_entry(IN osm_pkey_tbl_t * p_pkey_tbl, if (p_pkey_tbl->used_blocks <= block_idx) p_pkey_tbl->used_blocks = block_idx + 1; - return (IB_SUCCESS); + return IB_SUCCESS; } /********************************************************************** @@ -275,10 +275,10 @@ ib_api_status_t osm_pkey_tbl_get_block_and_idx(IN osm_pkey_tbl_t * p_pkey_tbl, block->pkey_entry + IB_NUM_PKEY_ELEMENTS_IN_BLOCK)) { *p_block_idx = block_index; *p_pkey_idx = (uint8_t) (p_pkey - block->pkey_entry); - return (IB_SUCCESS); + return IB_SUCCESS; } } - return (IB_NOT_FOUND); + return IB_NOT_FOUND; } /********************************************************************** @@ -294,9 +294,9 @@ static boolean_t match_pkey(IN const ib_net16_t * pkey1, /* compare if the bases are the same. if they are - then this is a match */ if (ib_pkey_get_base(*pkey1) != ib_pkey_get_base(*pkey2)) - return (FALSE); + return FALSE; - return (TRUE); + return TRUE; } /********************************************************************** @@ -447,10 +447,9 @@ boolean_t osm_physp_has_pkey(IN osm_log_t * p_log, IN ib_net16_t pkey, res = TRUE; OSM_LOG(p_log, OSM_LOG_DEBUG, "PKey 0x%04x was found\n", cl_ntoh16(pkey)); - } else { + } else OSM_LOG(p_log, OSM_LOG_DEBUG, "PKey 0x%04x was not found\n", cl_ntoh16(pkey)); - } Exit: OSM_LOG_EXIT(p_log);