From patchwork Tue Aug 31 18:21:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 145371 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 o7VIMY4B003947 for ; Tue, 31 Aug 2010 18:22:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754864Ab0HaSWP (ORCPT ); Tue, 31 Aug 2010 14:22:15 -0400 Received: from qmta03.westchester.pa.mail.comcast.net ([76.96.62.32]:54041 "EHLO qmta03.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754865Ab0HaSWP (ORCPT ); Tue, 31 Aug 2010 14:22:15 -0400 Received: from omta11.westchester.pa.mail.comcast.net ([76.96.62.36]) by qmta03.westchester.pa.mail.comcast.net with comcast id 10Pg1f0010mv7h0536NEiw; Tue, 31 Aug 2010 18:22:14 +0000 Received: from hal.comcast.net ([75.69.247.31]) by omta11.westchester.pa.mail.comcast.net with comcast id 16NE1f0070hNrtn3X6NEMM; Tue, 31 Aug 2010 18:22:14 +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 o7VIMIpP004763; Tue, 31 Aug 2010 14:22:23 -0400 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id o7VILXIY004726; Tue, 31 Aug 2010 14:21:33 -0400 Date: Tue, 31 Aug 2010 14:21:33 -0400 From: Hal Rosenstock To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org Subject: [PATCHv2] opensm/osm_pkey_mgr.c: Eliminate unneeded parameter from pkey_mgr_get_physp_max_blocks API Message-ID: <20100831182133.GB4718@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 (demeter1.kernel.org [140.211.167.41]); Tue, 31 Aug 2010 18:22:35 +0000 (UTC) diff --git a/opensm/opensm/osm_pkey_mgr.c b/opensm/opensm/osm_pkey_mgr.c index f2e0cc3..1e98c82 100644 --- a/opensm/opensm/osm_pkey_mgr.c +++ b/opensm/opensm/osm_pkey_mgr.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. - * Copyright (c) 2002-2007 Mellanox Technologies LTD. All rights reserved. + * Copyright (c) 2002-2010 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * @@ -59,8 +59,7 @@ rest of the ports (NodeInfo). */ static uint16_t -pkey_mgr_get_physp_max_blocks(IN const osm_subn_t * p_subn, - IN const osm_physp_t * p_physp) +pkey_mgr_get_physp_max_blocks(IN const osm_physp_t * p_physp) { osm_node_t *p_node = osm_physp_get_node_ptr(p_physp); uint16_t num_pkeys = 0; @@ -272,8 +271,7 @@ static int pkey_mgr_update_port(osm_log_t * p_log, osm_sm_t * sm, p_node = osm_physp_get_node_ptr(p_physp); p_pkey_tbl = &p_physp->pkeys; num_of_blocks = osm_pkey_tbl_get_num_blocks(p_pkey_tbl); - max_num_of_blocks = - pkey_mgr_get_physp_max_blocks(sm->p_subn, p_physp); + max_num_of_blocks = pkey_mgr_get_physp_max_blocks(p_physp); if (p_pkey_tbl->max_blocks > max_num_of_blocks) { OSM_LOG(p_log, OSM_LOG_INFO, "Max number of blocks reduced from %u to %u " @@ -408,7 +406,7 @@ static int pkey_mgr_update_peer_port(osm_log_t * p_log, osm_sm_t * sm, p_pkey_tbl = osm_physp_get_pkey_tbl(p_physp); p_peer_pkey_tbl = &peer->pkeys; num_of_blocks = osm_pkey_tbl_get_num_blocks(p_pkey_tbl); - peer_max_blocks = pkey_mgr_get_physp_max_blocks(p_subn, peer); + peer_max_blocks = pkey_mgr_get_physp_max_blocks(peer); if (peer_max_blocks < p_pkey_tbl->used_blocks) { OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0508: " "Not enough pkey entries (%u < %u) on switch 0x%016"