[ofa-general] [PATCH] opensm: remove osm_log_is_active() check

Sasha Khapyorsky sashak at voltaire.com
Sat Jul 26 19:03:06 PDT 2008


This osm_log_is_active() check is built in OSM_LOG() macro now and can
be cleaned up from the code.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/opensm/osm_drop_mgr.c            |   43 ++++-------
 opensm/opensm/osm_dump.c                |    3 +-
 opensm/opensm/osm_inform.c              |    7 +--
 opensm/opensm/osm_lid_mgr.c             |   46 ++++-------
 opensm/opensm/osm_link_mgr.c            |   18 ++---
 opensm/opensm/osm_mcast_fwd_rcv.c       |   12 +--
 opensm/opensm/osm_mcast_mgr.c           |  132 +++++++++++--------------------
 opensm/opensm/osm_node_desc_rcv.c       |    9 +--
 opensm/opensm/osm_node_info_rcv.c       |   27 +++----
 opensm/opensm/osm_pkey_mgr.c            |    3 +-
 opensm/opensm/osm_pkey_rcv.c            |   12 +--
 opensm/opensm/osm_port.c                |   74 +++++++----------
 opensm/opensm/osm_port_info_rcv.c       |   55 +++++--------
 opensm/opensm/osm_req.c                 |   22 ++---
 opensm/opensm/osm_resp.c                |   11 +--
 opensm/opensm/osm_sa_guidinfo_record.c  |   26 ++----
 opensm/opensm/osm_sa_informinfo.c       |    6 +-
 opensm/opensm/osm_sa_lft_record.c       |   11 +--
 opensm/opensm/osm_sa_link_record.c      |   14 ++--
 opensm/opensm/osm_sa_mad_ctrl.c         |   15 +---
 opensm/opensm/osm_sa_mft_record.c       |   11 +--
 opensm/opensm/osm_sa_multipath_record.c |   71 +++++++----------
 opensm/opensm/osm_sa_node_record.c      |   51 ++++--------
 opensm/opensm/osm_sa_path_record.c      |   59 ++++++---------
 opensm/opensm/osm_sa_pkey_record.c      |   12 +--
 opensm/opensm/osm_sa_portinfo_record.c  |   18 ++---
 opensm/opensm/osm_sa_service_record.c   |   21 ++---
 opensm/opensm/osm_sa_slvl_record.c      |   12 +--
 opensm/opensm/osm_sa_sminfo_record.c    |    5 +-
 opensm/opensm/osm_sa_sw_info_record.c   |   19 ++---
 opensm/opensm/osm_sa_vlarb_record.c     |   11 +--
 opensm/opensm/osm_slvl_map_rcv.c        |   13 +--
 opensm/opensm/osm_sm_mad_ctrl.c         |   58 +++++---------
 opensm/opensm/osm_sm_state_mgr.c        |   18 ++---
 opensm/opensm/osm_sminfo_rcv.c          |    7 +-
 opensm/opensm/osm_state_mgr.c           |   35 +-------
 opensm/opensm/osm_sw_info_rcv.c         |   33 +++-----
 opensm/opensm/osm_ucast_mgr.c           |   54 +++++--------
 opensm/opensm/osm_vl15intf.c            |   50 +++++-------
 opensm/opensm/osm_vl_arb_rcv.c          |   12 +--
 40 files changed, 423 insertions(+), 693 deletions(-)

diff --git a/opensm/opensm/osm_drop_mgr.c b/opensm/opensm/osm_drop_mgr.c
index a7b2553..1aeb172 100644
--- a/opensm/opensm/osm_drop_mgr.c
+++ b/opensm/opensm/osm_drop_mgr.c
@@ -251,14 +251,12 @@ static void __osm_drop_mgr_remove_port(osm_sm_t * sm, IN osm_port_t * p_port)
 		goto Exit;
 	}
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_INFO)) {
-		OSM_LOG(sm->p_log, OSM_LOG_INFO,
-			"Removed port with GUID:0x%016" PRIx64
-			" LID range [%u, %u] of node:%s\n",
-			cl_ntoh64(port_gid.unicast.interface_id),
-			min_lid_ho, max_lid_ho,
-			p_node ? p_node->print_desc : "UNKNOWN");
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_INFO,
+		"Removed port with GUID:0x%016" PRIx64
+		" LID range [%u, %u] of node:%s\n",
+		cl_ntoh64(port_gid.unicast.interface_id),
+		min_lid_ho, max_lid_ho,
+		p_node ? p_node->print_desc : "UNKNOWN");
 
 Exit:
 	OSM_LOG_EXIT(sm->p_log);
@@ -428,8 +426,6 @@ void osm_drop_mgr_process(osm_sm_t * sm)
 	osm_port_t *p_next_port;
 	osm_node_t *p_node;
 	osm_node_t *p_next_node;
-	ib_net64_t port_guid;
-	ib_net64_t node_guid;
 
 	CL_ASSERT(sm);
 
@@ -449,12 +445,9 @@ void osm_drop_mgr_process(osm_sm_t * sm)
 		CL_ASSERT(cl_qmap_key(&p_node->map_item) ==
 			  osm_node_get_node_guid(p_node));
 
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			node_guid = osm_node_get_node_guid(p_node);
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Checking node 0x%016" PRIx64 "\n",
-				cl_ntoh64(node_guid));
-		}
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"Checking node 0x%016" PRIx64 "\n",
+			cl_ntoh64(osm_node_get_node_guid(p_node)));
 
 		/*
 		   Check if this node was discovered during the last sweep.
@@ -478,12 +471,9 @@ void osm_drop_mgr_process(osm_sm_t * sm)
 		p_next_node =
 		    (osm_node_t *) cl_qmap_next(&p_next_node->map_item);
 
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			node_guid = osm_node_get_node_guid(p_node);
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Checking full discovery of node 0x%016" PRIx64
-				"\n", cl_ntoh64(node_guid));
-		}
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"Checking full discovery of node 0x%016" PRIx64 "\n",
+			cl_ntoh64(osm_node_get_node_guid(p_node)));
 
 		if (osm_node_get_type(p_node) != IB_NODE_TYPE_SWITCH)
 			continue;
@@ -501,12 +491,9 @@ void osm_drop_mgr_process(osm_sm_t * sm)
 		CL_ASSERT(cl_qmap_key(&p_port->map_item) ==
 			  osm_port_get_guid(p_port));
 
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			port_guid = osm_port_get_guid(p_port);
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Checking port 0x%016" PRIx64 "\n",
-				cl_ntoh64(port_guid));
-		}
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"Checking port 0x%016" PRIx64 "\n",
+			cl_ntoh64(osm_port_get_guid(p_port)));
 
 		/*
 		   If the port is unreachable, remove it from the guid table.
diff --git a/opensm/opensm/osm_dump.c b/opensm/opensm/osm_dump.c
index 9447cc8..7e0ba47 100644
--- a/opensm/opensm/osm_dump.c
+++ b/opensm/opensm/osm_dump.c
@@ -606,12 +606,11 @@ static void print_report(osm_opensm_t *osm, FILE *file)
 
 void osm_dump_mcast_routes(osm_opensm_t * osm)
 {
-	if (osm_log_is_active(&osm->log, OSM_LOG_ROUTING)) {
+	if (osm_log_is_active(&osm->log, OSM_LOG_ROUTING))
 		/* multicast routes */
 		osm_dump_qmap_to_file(osm, "opensm.mcfdbs",
 				      &osm->subn.sw_guid_tbl,
 				      dump_mcast_routes, osm);
-	}
 }
 
 void osm_dump_all(osm_opensm_t * osm)
diff --git a/opensm/opensm/osm_inform.c b/opensm/opensm/osm_inform.c
index c8c06b2..b9a3254 100644
--- a/opensm/opensm/osm_inform.c
+++ b/opensm/opensm/osm_inform.c
@@ -85,10 +85,8 @@ static void dump_all_informs(IN osm_subn_t const *p_subn, IN osm_log_t * p_log)
 {
 	cl_list_item_t *p_list_item;
 
-	OSM_LOG_ENTER(p_log);
-
 	if (!osm_log_is_active(p_log, OSM_LOG_DEBUG))
-		goto Exit;
+		return;
 
 	p_list_item = cl_qlist_head(&p_subn->sa_infr_list);
 	while (p_list_item != cl_qlist_end(&p_subn->sa_infr_list)) {
@@ -97,9 +95,6 @@ static void dump_all_informs(IN osm_subn_t const *p_subn, IN osm_log_t * p_log)
 				     inform_record.inform_info, OSM_LOG_DEBUG);
 		p_list_item = cl_qlist_next(p_list_item);
 	}
-
-Exit:
-	OSM_LOG_EXIT(p_log);
 }
 
 /**********************************************************************
diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c
index d66ced3..9472065 100644
--- a/opensm/opensm/osm_lid_mgr.c
+++ b/opensm/opensm/osm_lid_mgr.c
@@ -656,8 +656,7 @@ __osm_lid_mgr_find_free_lid_range(IN osm_lid_mgr_t * const p_mgr,
 	uint8_t lmc_num_lids;
 	uint16_t lmc_mask;
 
-	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
-		"LMC = %u, number LIDs = %u\n",
+	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG, "LMC = %u, number LIDs = %u\n",
 		p_mgr->p_subn->opt.lmc, num_lids);
 
 	lmc_num_lids = (1 << p_mgr->p_subn->opt.lmc);
@@ -772,10 +771,8 @@ __osm_lid_mgr_get_port_lid(IN osm_lid_mgr_t * const p_mgr,
 		*p_min_lid = min_lid;
 		*p_max_lid = min_lid + num_lids - 1;
 		if (min_lid == cl_ntoh16(osm_port_get_base_lid(p_port))) {
-			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
-				"0x%016" PRIx64
-				" matches its known lid:%u\n", guid,
-				min_lid);
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG, "0x%016" PRIx64
+				" matches its known lid:%u\n", guid, min_lid);
 			goto Exit;
 		} else {
 			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
@@ -906,11 +903,9 @@ __osm_lid_mgr_set_physp_pi(IN osm_lid_mgr_t * const p_mgr,
 		   with the following attributes as they are set later
 		   (during NO_CHANGE state in link mgr).
 		 */
-		if (osm_log_is_active(p_mgr->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
-				"Skipping switch port %u, GUID 0x%016" PRIx64
-				"\n", port_num,
-				cl_ntoh64(osm_physp_get_port_guid(p_physp)));
+		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
+			"Skipping switch port %u, GUID 0x%016" PRIx64 "\n",
+			port_num, cl_ntoh64(osm_physp_get_port_guid(p_physp)));
 		goto Exit;
 	}
 
@@ -1038,17 +1033,14 @@ __osm_lid_mgr_set_physp_pi(IN osm_lid_mgr_t * const p_mgr,
 		 */
 		if ((mtu != ib_port_info_get_neighbor_mtu(p_old_pi)) ||
 		    (op_vls != ib_port_info_get_op_vls(p_old_pi))) {
-			if (osm_log_is_active(p_mgr->p_log, OSM_LOG_DEBUG))
-				OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
-					"Sending Link Down to GUID 0x%016"
-					PRIx64 "port %d due to op_vls or "
-					"mtu change. MTU:%u,%u VL_CAP:%u,%u\n",
-					cl_ntoh64(osm_physp_get_port_guid
-						  (p_physp)), port_num, mtu,
-					ib_port_info_get_neighbor_mtu(p_old_pi),
-					op_vls,
-					ib_port_info_get_op_vls(p_old_pi)
-				    );
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
+				"Sending Link Down to GUID 0x%016"
+				PRIx64 "port %d due to op_vls or "
+				"mtu change. MTU:%u,%u VL_CAP:%u,%u\n",
+				cl_ntoh64(osm_physp_get_port_guid(p_physp)),
+				port_num, mtu,
+				ib_port_info_get_neighbor_mtu(p_old_pi),
+				op_vls, ib_port_info_get_op_vls(p_old_pi));
 
 			/*
 			   we need to make sure the internal DB will follow the
@@ -1186,12 +1178,10 @@ __osm_lid_mgr_process_our_sm_node(IN osm_lid_mgr_t * const p_mgr)
 	p_mgr->p_subn->master_sm_base_lid = cl_hton16(min_lid_ho);
 	p_mgr->p_subn->sm_base_lid = cl_hton16(min_lid_ho);
 
-	if (osm_log_is_active(p_mgr->p_log, OSM_LOG_VERBOSE))
-		OSM_LOG(p_mgr->p_log, OSM_LOG_VERBOSE,
-			"Assigning SM's port 0x%016" PRIx64
-			"\n\t\t\t\tto LID range [%u,%u]\n",
-			cl_ntoh64(osm_port_get_guid(p_port)),
-			min_lid_ho, max_lid_ho);
+	OSM_LOG(p_mgr->p_log, OSM_LOG_VERBOSE,
+		"Assigning SM's port 0x%016" PRIx64
+		"\n\t\t\t\tto LID range [%u,%u]\n",
+		cl_ntoh64(osm_port_get_guid(p_port)), min_lid_ho, max_lid_ho);
 
 	/*
 	   Set the PortInfo the Physical Port associated with this Port.
diff --git a/opensm/opensm/osm_link_mgr.c b/opensm/opensm/osm_link_mgr.c
index 3454024..452d151 100644
--- a/opensm/opensm/osm_link_mgr.c
+++ b/opensm/opensm/osm_link_mgr.c
@@ -95,12 +95,9 @@ __osm_link_mgr_set_physp_pi(osm_sm_t * sm,
 		    == FALSE) {
 			/* This means the switch doesn't support enhanced port 0.
 			   Can skip it. */
-			if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-				OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-					"Skipping port 0, GUID 0x%016" PRIx64
-					"\n",
-					cl_ntoh64(osm_physp_get_port_guid
-						  (p_physp)));
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+				"Skipping port 0, GUID 0x%016" PRIx64 "\n",
+				cl_ntoh64(osm_physp_get_port_guid(p_physp)));
 			goto Exit;
 		}
 		esp0 = TRUE;
@@ -347,11 +344,10 @@ __osm_link_mgr_process_node(osm_sm_t * sm,
 
 	OSM_LOG_ENTER(sm->p_log);
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Node 0x%" PRIx64 " going to %s\n",
-			cl_ntoh64(osm_node_get_node_guid(p_node)),
-			ib_get_port_state_str(link_state));
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Node 0x%" PRIx64 " going to %s\n",
+		cl_ntoh64(osm_node_get_node_guid(p_node)),
+		ib_get_port_state_str(link_state));
 
 	/*
 	   Set the PortInfo for every Physical Port associated
diff --git a/opensm/opensm/osm_mcast_fwd_rcv.c b/opensm/opensm/osm_mcast_fwd_rcv.c
index b2f491f..5271f69 100644
--- a/opensm/opensm/osm_mcast_fwd_rcv.c
+++ b/opensm/opensm/osm_mcast_fwd_rcv.c
@@ -89,13 +89,11 @@ void osm_mft_rcv_process(IN void *context, IN void *data)
 	p_mft_context = osm_madw_get_mft_context_ptr(p_madw);
 	node_guid = p_mft_context->node_guid;
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Setting MFT block %u, position %u, "
-			"Switch 0x%016" PRIx64 ", TID 0x%" PRIx64 "\n",
-			block_num, position, cl_ntoh64(node_guid),
-			cl_ntoh64(p_smp->trans_id));
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Setting MFT block %u, position %u, "
+		"Switch 0x%016" PRIx64 ", TID 0x%" PRIx64 "\n",
+		block_num, position, cl_ntoh64(node_guid),
+		cl_ntoh64(p_smp->trans_id));
 
 	CL_PLOCK_EXCL_ACQUIRE(sm->p_lock);
 	p_sw = osm_get_switch_by_guid(sm->p_subn, node_guid);
diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c
index 20fb41f..78eed50 100644
--- a/opensm/opensm/osm_mcast_mgr.c
+++ b/opensm/opensm/osm_mcast_mgr.c
@@ -260,7 +260,6 @@ static osm_switch_t *__osm_mcast_mgr_find_optimal_switch(osm_sm_t * sm,
 	const osm_switch_t *p_best_sw = NULL;
 	float hops = 0;
 	float best_hops = 10000;	/* any big # will do */
-	uint64_t sw_guid_ho;
 #ifdef OSM_VENDOR_INTF_ANAFA
 	boolean_t use_avg_hops = TRUE;	/* anafa2 - bug hca on switch *//* use max hops for root */
 #else
@@ -284,13 +283,9 @@ static osm_switch_t *__osm_mcast_mgr_find_optimal_switch(osm_sm_t * sm,
 		else
 			hops = osm_mcast_mgr_compute_max_hops(sm, p_mgrp, p_sw);
 
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			sw_guid_ho =
-			    cl_ntoh64(osm_node_get_node_guid(p_sw->p_node));
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Switch 0x%016" PRIx64 ", hops = %f\n",
-				sw_guid_ho, hops);
-		}
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"Switch 0x%016" PRIx64 ", hops = %f\n",
+			cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)), hops);
 
 		if (hops < best_hops) {
 			p_best_sw = p_sw;
@@ -298,19 +293,14 @@ static osm_switch_t *__osm_mcast_mgr_find_optimal_switch(osm_sm_t * sm,
 		}
 	}
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE)) {
-		if (p_best_sw) {
-			sw_guid_ho =
-			    cl_ntoh64(osm_node_get_node_guid
-				      (p_best_sw->p_node));
-			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-				"Best switch is 0x%" PRIx64 ", hops = %f\n",
-				sw_guid_ho, best_hops);
-		} else {
-			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-				"No multicast capable switches detected\n");
-		}
-	}
+	if (p_best_sw)
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+			"Best switch is 0x%" PRIx64 ", hops = %f\n",
+			cl_ntoh64(osm_node_get_node_guid(p_best_sw->p_node)),
+			best_hops);
+	else
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+			"No multicast capable switches detected\n");
 
 	OSM_LOG_EXIT(sm->p_log);
 	return ((osm_switch_t *) p_best_sw);
@@ -384,10 +374,8 @@ __osm_mcast_mgr_set_tbl(osm_sm_t * sm, IN osm_switch_t * const p_sw)
 
 	while (osm_mcast_tbl_get_block(p_tbl, block_num,
 				       (uint8_t) position, block)) {
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Writing MFT block 0x%X\n", block_id_ho);
-		}
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"Writing MFT block 0x%X\n", block_id_ho);
 
 		block_id_ho = block_num + (position << 28);
 
@@ -554,12 +542,10 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 	node_guid_ho = cl_ntoh64(node_guid);
 	mlid_ho = cl_ntoh16(osm_mgrp_get_mlid(p_mgrp));
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE)) {
-		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-			"Routing MLID 0x%X through switch 0x%" PRIx64
-			", %u nodes at depth %u\n",
-			mlid_ho, node_guid_ho, cl_qlist_count(p_list), depth);
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+		"Routing MLID 0x%X through switch 0x%" PRIx64
+		", %u nodes at depth %u\n",
+		mlid_ho, node_guid_ho, cl_qlist_count(p_list), depth);
 
 	CL_ASSERT(cl_qlist_count(p_list) > 0);
 
@@ -641,10 +627,8 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 	   we're at the root of the spanning tree.
 	 */
 	if (depth > 1) {
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Adding upstream port 0x%X\n", upstream_port);
-		}
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"Adding upstream port 0x%X\n", upstream_port);
 
 		CL_ASSERT(upstream_port);
 		osm_mcast_tbl_set(p_tbl, mlid_ho, upstream_port);
@@ -677,11 +661,9 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 		if (count == 0)
 			continue;	/* No routes down this port. */
 
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Routing %zu destinations via switch port 0x%X\n",
-				count, i);
-		}
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"Routing %zu destinations via switch port 0x%X\n",
+			count, i);
 
 		/*
 		   This port routes frames for this mcast group.  Therefore,
@@ -732,13 +714,11 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 
 			CL_ASSERT(cl_is_qlist_empty(p_port_list));
 
-			if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-				OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-					"Found leaf for port 0x%016" PRIx64
-					" on switch port 0x%X\n",
-					cl_ntoh64(osm_port_get_guid
-						  (p_wobj->p_port)), i);
-			}
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+				"Found leaf for port 0x%016" PRIx64
+				" on switch port 0x%X\n",
+				cl_ntoh64(osm_port_get_guid (p_wobj->p_port)),
+				i);
 
 			__osm_mcast_work_obj_delete(p_wobj);
 		}
@@ -781,11 +761,9 @@ __osm_mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
 	p_mcm_tbl = &p_mgrp->mcm_port_tbl;
 	num_ports = cl_qmap_count(p_mcm_tbl);
 	if (num_ports == 0) {
-		if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE)) {
-			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-				"MLID 0x%X has no members - nothing to do\n",
-				cl_ntoh16(osm_mgrp_get_mlid(p_mgrp)));
-		}
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+			"MLID 0x%X has no members - nothing to do\n",
+			cl_ntoh16(osm_mgrp_get_mlid(p_mgrp)));
 		goto Exit;
 	}
 
@@ -884,11 +862,9 @@ osm_mcast_mgr_set_table(osm_sm_t * sm,
 
 	CL_ASSERT(p_sw);
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE)) {
-		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-			"Configuring MLID 0x%X on switch 0x%" PRIx64 "\n",
-			mlid_ho, osm_node_get_node_guid(p_sw->p_node));
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+		"Configuring MLID 0x%X on switch 0x%" PRIx64 "\n",
+		mlid_ho, osm_node_get_node_guid(p_sw->p_node));
 
 	/*
 	   For every child of this tree node, set the corresponding
@@ -966,12 +942,10 @@ osm_mcast_mgr_process_single(osm_sm_t * sm,
 
 	mlid_ho = cl_ntoh16(mlid);
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Attempting to add port 0x%" PRIx64 " to MLID 0x%X, "
-			"\n\t\t\t\tjoin state = 0x%X\n",
-			cl_ntoh64(port_guid), mlid_ho, join_state);
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Attempting to add port 0x%" PRIx64 " to MLID 0x%X, "
+		"\n\t\t\t\tjoin state = 0x%X\n",
+		cl_ntoh64(port_guid), mlid_ho, join_state);
 
 	/*
 	   Acquire the Port object.
@@ -1043,13 +1017,11 @@ osm_mcast_mgr_process_single(osm_sm_t * sm,
 			    osm_switch_get_mcast_tbl_ptr(p_remote_node->sw);
 			osm_mcast_tbl_set(p_mcast_tbl, mlid_ho, port_num);
 		} else {
-			if (join_state & IB_JOIN_STATE_SEND_ONLY) {
-				if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-					OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-						"Success.  Nothing to do for send"
-						"only member\n");
-				}
-			} else {
+			if (join_state & IB_JOIN_STATE_SEND_ONLY)
+				OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+					"Success.  Nothing to do for send"
+					"only member\n");
+			else {
 				OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A13: "
 					"Unknown join state 0x%X\n",
 					join_state);
@@ -1057,12 +1029,8 @@ osm_mcast_mgr_process_single(osm_sm_t * sm,
 				goto Exit;
 			}
 		}
-	} else {
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Unable to add port\n");
-		}
-	}
+	} else
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG, "Unable to add port\n");
 
 Exit:
 	OSM_LOG_EXIT(sm->p_log);
@@ -1086,19 +1054,15 @@ osm_mcast_mgr_process_tree(osm_sm_t * sm,
 
 	mlid = osm_mgrp_get_mlid(p_mgrp);
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Processing multicast group 0x%X\n", cl_ntoh16(mlid));
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Processing multicast group 0x%X\n", cl_ntoh16(mlid));
 
 	/*
 	   If there are no switches in the subnet, then we have nothing to do.
 	 */
 	if (cl_qmap_count(&sm->p_subn->sw_guid_tbl) == 0) {
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"No switches in subnet. Nothing to do\n");
-		}
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"No switches in subnet. Nothing to do\n");
 		goto Exit;
 	}
 
diff --git a/opensm/opensm/osm_node_desc_rcv.c b/opensm/opensm/osm_node_desc_rcv.c
index d848513..c0c64d7 100644
--- a/opensm/opensm/osm_node_desc_rcv.c
+++ b/opensm/opensm/osm_node_desc_rcv.c
@@ -81,12 +81,9 @@ __osm_nd_rcv_process_nd(IN osm_sm_t * sm,
 		free(p_node->print_desc);
 	p_node->print_desc = tmp_desc;
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE)) {
-		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-			"Node 0x%" PRIx64 "\n\t\t\t\tDescription = %s\n",
-			cl_ntoh64(osm_node_get_node_guid(p_node)),
-			p_node->print_desc);
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+		"Node 0x%" PRIx64 "\n\t\t\t\tDescription = %s\n",
+		cl_ntoh64(osm_node_get_node_guid(p_node)), p_node->print_desc);
 
 	OSM_LOG_EXIT(sm->p_log);
 }
diff --git a/opensm/opensm/osm_node_info_rcv.c b/opensm/opensm/osm_node_info_rcv.c
index 2bccf33..86710d1 100644
--- a/opensm/opensm/osm_node_info_rcv.c
+++ b/opensm/opensm/osm_node_info_rcv.c
@@ -233,14 +233,12 @@ __osm_ni_rcv_set_links(IN osm_sm_t * sm,
 		}
 	}
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Creating new link between:\n\t\t\t\tnode 0x%" PRIx64
-			", port number 0x%X and\n\t\t\t\tnode 0x%" PRIx64
-			", port number 0x%X\n",
-			cl_ntoh64(osm_node_get_node_guid(p_node)), port_num,
-			cl_ntoh64(p_ni_context->node_guid),
-			p_ni_context->port_num);
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Creating new link between:\n\t\t\t\tnode 0x%" PRIx64
+		", port number 0x%X and\n\t\t\t\tnode 0x%" PRIx64
+		", port number 0x%X\n",
+		cl_ntoh64(osm_node_get_node_guid(p_node)), port_num,
+		cl_ntoh64(p_ni_context->node_guid), p_ni_context->port_num);
 
 	osm_node_link(p_node, port_num, p_neighbor_node,
 		      p_ni_context->port_num);
@@ -751,13 +749,12 @@ __osm_ni_rcv_process_existing(IN osm_sm_t * sm,
 	p_ni_context = osm_madw_get_ni_context_ptr(p_madw);
 	port_num = ib_node_info_get_local_port_num(p_ni);
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE))
-		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-			"Rediscovered %s node 0x%" PRIx64
-			" TID 0x%" PRIx64 ", discovered %u times already\n",
-			ib_get_node_type_str(p_ni->node_type),
-			cl_ntoh64(p_ni->node_guid),
-			cl_ntoh64(p_smp->trans_id), p_node->discovery_count);
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+		"Rediscovered %s node 0x%" PRIx64 " TID 0x%" PRIx64
+		", discovered %u times already\n",
+		ib_get_node_type_str(p_ni->node_type),
+		cl_ntoh64(p_ni->node_guid),
+		cl_ntoh64(p_smp->trans_id), p_node->discovery_count);
 
 	/*
 	   If we haven't already encountered this existing node
diff --git a/opensm/opensm/osm_pkey_mgr.c b/opensm/opensm/osm_pkey_mgr.c
index 04fb18b..a8f5100 100644
--- a/opensm/opensm/osm_pkey_mgr.c
+++ b/opensm/opensm/osm_pkey_mgr.c
@@ -461,13 +461,12 @@ pkey_mgr_update_peer_port(osm_log_t * p_log, osm_sm_t * sm,
 		}
 	}
 
-	if ((ret_val == TRUE) && osm_log_is_active(p_log, OSM_LOG_DEBUG)) {
+	if (ret_val)
 		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"Pkey table was updated for node 0x%016" PRIx64
 			" port %u\n",
 			cl_ntoh64(osm_node_get_node_guid(p_node)),
 			osm_physp_get_port_num(peer));
-	}
 
 	if (port_info_set)
 		return TRUE;
diff --git a/opensm/opensm/osm_pkey_rcv.c b/opensm/opensm/osm_pkey_rcv.c
index db9ab99..9e09806 100644
--- a/opensm/opensm/osm_pkey_rcv.c
+++ b/opensm/opensm/osm_pkey_rcv.c
@@ -115,13 +115,11 @@ void osm_pkey_rcv_process(IN void *context, IN void *data)
 	   We do not mind if this is a result of a set or get - all we want is to
 	   update the subnet.
 	 */
-	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE)) {
-		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-			"Got GetResp(PKey) block:%u port_num %u with GUID 0x%"
-			PRIx64 " for parent node GUID 0x%" PRIx64 ", TID 0x%"
-			PRIx64 "\n", block_num, port_num, cl_ntoh64(port_guid),
-			cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+		"Got GetResp(PKey) block:%u port_num %u with GUID 0x%"
+		PRIx64 " for parent node GUID 0x%" PRIx64 ", TID 0x%"
+		PRIx64 "\n", block_num, port_num, cl_ntoh64(port_guid),
+		cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
 
 	/*
 	   Determine if we encountered a new Physical Port.
diff --git a/opensm/opensm/osm_port.c b/opensm/opensm/osm_port.c
index 4b71fa9..54a5fd1 100644
--- a/opensm/opensm/osm_port.c
+++ b/opensm/opensm/osm_port.c
@@ -321,33 +321,26 @@ osm_physp_calc_link_mtu(IN osm_log_t * p_log, IN const osm_physp_t * p_physp)
 		remote_mtu =
 		    ib_port_info_get_mtu_cap(&p_remote_physp->port_info);
 
-		if (osm_log_is_active(p_log, OSM_LOG_DEBUG))
-			OSM_LOG(p_log, OSM_LOG_DEBUG,
-				"Remote port 0x%016" PRIx64 " port = 0x%X : "
-				"MTU = %u. This Port MTU: %u\n",
-				cl_ntoh64(osm_physp_get_port_guid
-					  (p_remote_physp)),
-				osm_physp_get_port_num(p_remote_physp),
-				remote_mtu, mtu);
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
+			"Remote port 0x%016" PRIx64 " port = 0x%X : "
+			"MTU = %u. This Port MTU: %u\n",
+			cl_ntoh64(osm_physp_get_port_guid(p_remote_physp)),
+			osm_physp_get_port_num(p_remote_physp),
+			remote_mtu, mtu);
 
 		if (mtu != remote_mtu) {
 			if (mtu > remote_mtu)
 				mtu = remote_mtu;
 
-			if (osm_log_is_active(p_log, OSM_LOG_VERBOSE))
-				OSM_LOG(p_log, OSM_LOG_VERBOSE,
-					"MTU mismatch between ports."
-					"\n\t\t\t\tPort 0x%016" PRIx64
-					", port 0x%X" " and port 0x%016" PRIx64
-					", port 0x%X."
-					"\n\t\t\t\tUsing lower MTU of %u\n",
-					cl_ntoh64(osm_physp_get_port_guid
-						  (p_physp)),
-					osm_physp_get_port_num(p_physp),
-					cl_ntoh64(osm_physp_get_port_guid
-						  (p_remote_physp)),
-					osm_physp_get_port_num(p_remote_physp),
-					mtu);
+			OSM_LOG(p_log, OSM_LOG_VERBOSE,
+				"MTU mismatch between ports."
+				"\n\t\t\t\tPort 0x%016" PRIx64 ", port 0x%X"
+				" and port 0x%016" PRIx64 ", port 0x%X."
+				"\n\t\t\t\tUsing lower MTU of %u\n",
+				cl_ntoh64(osm_physp_get_port_guid(p_physp)),
+				osm_physp_get_port_num(p_physp),
+				cl_ntoh64(osm_physp_get_port_guid(p_remote_physp)),
+				osm_physp_get_port_num(p_remote_physp),mtu);
 		}
 	} else
 		mtu = ib_port_info_get_neighbor_mtu(&p_physp->port_info);
@@ -383,33 +376,26 @@ osm_physp_calc_link_op_vls(IN osm_log_t * p_log,
 		remote_op_vls =
 		    ib_port_info_get_vl_cap(&p_remote_physp->port_info);
 
-		if (osm_log_is_active(p_log, OSM_LOG_DEBUG))
-			OSM_LOG(p_log, OSM_LOG_DEBUG,
-				"Remote port 0x%016" PRIx64 " port = 0x%X : "
-				"VL_CAP = %u. This port VL_CAP = %u\n",
-				cl_ntoh64(osm_physp_get_port_guid
-					  (p_remote_physp)),
-				osm_physp_get_port_num(p_remote_physp),
-				remote_op_vls, op_vls);
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
+			"Remote port 0x%016" PRIx64 " port = 0x%X : "
+			"VL_CAP = %u. This port VL_CAP = %u\n",
+			cl_ntoh64(osm_physp_get_port_guid(p_remote_physp)),
+			osm_physp_get_port_num(p_remote_physp),
+			remote_op_vls, op_vls);
 
 		if (op_vls != remote_op_vls) {
 			if (op_vls > remote_op_vls)
 				op_vls = remote_op_vls;
 
-			if (osm_log_is_active(p_log, OSM_LOG_VERBOSE))
-				OSM_LOG(p_log, OSM_LOG_VERBOSE,
-					"OP_VLS mismatch between ports."
-					"\n\t\t\t\tPort 0x%016" PRIx64
-					", port 0x%X" " and port 0x%016" PRIx64
-					", port 0x%X."
-					"\n\t\t\t\tUsing lower OP_VLS of %u\n",
-					cl_ntoh64(osm_physp_get_port_guid
-						  (p_physp)),
-					osm_physp_get_port_num(p_physp),
-					cl_ntoh64(osm_physp_get_port_guid
-						  (p_remote_physp)),
-					osm_physp_get_port_num(p_remote_physp),
-					op_vls);
+			OSM_LOG(p_log, OSM_LOG_VERBOSE,
+				"OP_VLS mismatch between ports."
+				"\n\t\t\t\tPort 0x%016" PRIx64 ", port 0x%X"
+				" and port 0x%016" PRIx64 ", port 0x%X."
+				"\n\t\t\t\tUsing lower OP_VLS of %u\n",
+				cl_ntoh64(osm_physp_get_port_guid(p_physp)),
+				osm_physp_get_port_num(p_physp),
+				cl_ntoh64(osm_physp_get_port_guid(p_remote_physp)),
+				osm_physp_get_port_num(p_remote_physp), op_vls);
 		}
 	} else
 		op_vls = ib_port_info_get_op_vls(&p_physp->port_info);
diff --git a/opensm/opensm/osm_port_info_rcv.c b/opensm/opensm/osm_port_info_rcv.c
index 90eb48b..a820069 100644
--- a/opensm/opensm/osm_port_info_rcv.c
+++ b/opensm/opensm/osm_port_info_rcv.c
@@ -72,9 +72,8 @@ __osm_pi_rcv_set_sm(IN osm_sm_t * sm,
 
 	OSM_LOG_ENTER(sm->p_log);
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Setting IS_SM bit in port attributes\n");
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Setting IS_SM bit in port attributes\n");
 
 	p_dr_path = osm_physp_get_dr_path_ptr(p_physp);
 	h_bind = osm_dr_path_get_bind_handle(p_dr_path);
@@ -165,12 +164,10 @@ __osm_pi_rcv_process_endport(IN osm_sm_t * sm,
 					"Ignoring SM on port 0x%" PRIx64 "\n",
 					cl_ntoh64(port_guid));
 			else {
-				if (osm_log_is_active
-				    (sm->p_log, OSM_LOG_VERBOSE))
-					OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-						"Detected another SM. Requesting SMInfo"
-						"\n\t\t\t\tPort 0x%" PRIx64
-						"\n", cl_ntoh64(port_guid));
+				OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+					"Detected another SM. Requesting SMInfo"
+					"\n\t\t\t\tPort 0x%" PRIx64 "\n",
+					cl_ntoh64(port_guid));
 
 				/*
 				   This port indicates it's an SM and it's not our own port.
@@ -294,7 +291,6 @@ __osm_pi_rcv_process_switch_port(IN osm_sm_t * sm,
 						"Failure initiating NodeInfo request (%s)\n",
 						ib_get_err_str(status));
 			} else
-			    if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
 				OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 					"Skipping SMP responder port 0x%X\n",
 					p_pi->local_port_num);
@@ -490,16 +486,14 @@ osm_pi_rcv_process_set(IN osm_sm_t * sm, IN osm_node_t * const p_node,
 				   port_guid, port_num, p_pi, level);
 	}
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Received logical SetResp() for GUID 0x%" PRIx64
-			", port num 0x%X"
-			"\n\t\t\t\tfor parent node GUID 0x%" PRIx64
-			" TID 0x%" PRIx64 "\n",
-			cl_ntoh64(port_guid),
-			port_num,
-			cl_ntoh64(osm_node_get_node_guid(p_node)),
-			cl_ntoh64(p_smp->trans_id));
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Received logical SetResp() for GUID 0x%" PRIx64
+		", port num 0x%X"
+		"\n\t\t\t\tfor parent node GUID 0x%" PRIx64
+		" TID 0x%" PRIx64 "\n",
+		cl_ntoh64(port_guid), port_num,
+		cl_ntoh64(osm_node_get_node_guid(p_node)),
+		cl_ntoh64(p_smp->trans_id));
 
 	osm_physp_set_port_info(p_physp, p_pi);
 
@@ -603,15 +597,12 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
 		   This PortInfo arrived because we did a Get() method,
 		   most likely due to a subnet sweep in progress.
 		 */
-		if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE))
-			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-				"Discovered port num 0x%X with GUID 0x%" PRIx64
-				" for parent node GUID 0x%" PRIx64
-				", TID 0x%" PRIx64 "\n",
-				port_num,
-				cl_ntoh64(port_guid),
-				cl_ntoh64(node_guid),
-				cl_ntoh64(p_smp->trans_id));
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+			"Discovered port num 0x%X with GUID 0x%" PRIx64
+			" for parent node GUID 0x%" PRIx64
+			", TID 0x%" PRIx64 "\n",
+			port_num, cl_ntoh64(port_guid),
+			cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
 
 		p_physp = osm_node_get_physp_ptr(p_node, port_num);
 
@@ -621,10 +612,8 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
 		   continue processing as normal.
 		 */
 		if (!p_physp) {
-			if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE))
-				OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-					"Initializing port number 0x%X\n",
-					port_num);
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+				"Initializing port number 0x%X\n", port_num);
 			p_physp = &p_node->physp_table[port_num];
 			osm_physp_init(p_physp,
 				       port_guid,
diff --git a/opensm/opensm/osm_req.c b/opensm/opensm/osm_req.c
index 5454144..46f0d9d 100644
--- a/opensm/opensm/osm_req.c
+++ b/opensm/opensm/osm_req.c
@@ -96,13 +96,10 @@ osm_req_get(IN osm_sm_t * sm,
 
 	tid = cl_hton64((uint64_t) cl_atomic_inc(&sm->sm_trans_id));
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Getting %s (0x%X), modifier 0x%X, TID 0x%" PRIx64 "\n",
-			ib_get_sm_attr_str(attr_id),
-			cl_ntoh16(attr_id),
-			cl_ntoh32(attr_mod), cl_ntoh64(tid));
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Getting %s (0x%X), modifier 0x%X, TID 0x%" PRIx64 "\n",
+		ib_get_sm_attr_str(attr_id), cl_ntoh16(attr_id),
+		cl_ntoh32(attr_mod), cl_ntoh64(tid));
 
 	ib_smp_init_new(osm_madw_get_smp_ptr(p_madw),
 			IB_MAD_METHOD_GET,
@@ -177,13 +174,10 @@ osm_req_set(IN osm_sm_t * sm,
 
 	tid = cl_hton64((uint64_t) cl_atomic_inc(&sm->sm_trans_id));
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Setting %s (0x%X), modifier 0x%X, TID 0x%" PRIx64 "\n",
-			ib_get_sm_attr_str(attr_id),
-			cl_ntoh16(attr_id),
-			cl_ntoh32(attr_mod), cl_ntoh64(tid));
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Setting %s (0x%X), modifier 0x%X, TID 0x%" PRIx64 "\n",
+		ib_get_sm_attr_str(attr_id), cl_ntoh16(attr_id),
+		cl_ntoh32(attr_mod), cl_ntoh64(tid));
 
 	ib_smp_init_new(osm_madw_get_smp_ptr(p_madw),
 			IB_MAD_METHOD_SET,
diff --git a/opensm/opensm/osm_resp.c b/opensm/opensm/osm_resp.c
index d141812..eb544db 100644
--- a/opensm/opensm/osm_resp.c
+++ b/opensm/opensm/osm_resp.c
@@ -144,13 +144,10 @@ osm_resp_send(IN osm_sm_t * sm,
 	p_madw->resp_expected = FALSE;
 	p_madw->fail_msg = CL_DISP_MSGID_NONE;
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG, "Responding to %s (0x%X)"
-			"\n\t\t\t\tattribute modifier 0x%X, TID 0x%" PRIx64
-			"\n", ib_get_sm_attr_str(p_smp->attr_id),
-			cl_ntoh16(p_smp->attr_id), cl_ntoh32(p_smp->attr_mod),
-			cl_ntoh64(p_smp->trans_id));
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG, "Responding to %s (0x%X)"
+		"\n\t\t\t\tattribute modifier 0x%X, TID 0x%" PRIx64 "\n",
+		ib_get_sm_attr_str(p_smp->attr_id), cl_ntoh16(p_smp->attr_id),
+		cl_ntoh32(p_smp->attr_mod), cl_ntoh64(p_smp->trans_id));
 
 	osm_vl15_post(sm->p_vl15, p_madw);
 
diff --git a/opensm/opensm/osm_sa_guidinfo_record.c b/opensm/opensm/osm_sa_guidinfo_record.c
index aaf4d6c..1848bc1 100644
--- a/opensm/opensm/osm_sa_guidinfo_record.c
+++ b/opensm/opensm/osm_sa_guidinfo_record.c
@@ -94,11 +94,9 @@ __osm_gir_rcv_new_gir(IN osm_sa_t * sa,
 		goto Exit;
 	}
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"New GUIDInfoRecord: lid 0x%X, block num %d\n",
-			cl_ntoh16(match_lid), block_num);
-	}
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"New GUIDInfoRecord: lid 0x%X, block num %d\n",
+		cl_ntoh16(match_lid), block_num);
 
 	memset(p_rec_item, 0, sizeof(*p_rec_item));
 
@@ -138,13 +136,9 @@ __osm_sa_gir_create_gir(IN osm_sa_t * sa,
 
 	OSM_LOG_ENTER(sa->p_log);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Looking for GUIDRecord with LID: %u GUID:0x%016"
-			PRIx64 "\n", cl_ntoh16(match_lid),
-			cl_ntoh64(match_port_guid)
-		    );
-	}
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"Looking for GUIDRecord with LID: %u GUID:0x%016"
+		PRIx64 "\n", cl_ntoh16(match_lid), cl_ntoh64(match_port_guid));
 
 	/*
 	   For switches, do not return the GUIDInfo record(s)
@@ -201,11 +195,9 @@ __osm_sa_gir_create_gir(IN osm_sa_t * sa,
 			/*
 			   We validate that the lid belongs to this node.
 			 */
-			if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-					"Comparing LID: %u <= %u <= %u\n",
-					base_lid_ho, match_lid_ho, max_lid_ho);
-			}
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+				"Comparing LID: %u <= %u <= %u\n",
+				base_lid_ho, match_lid_ho, max_lid_ho);
 
 			if (match_lid_ho < base_lid_ho
 			    || match_lid_ho > max_lid_ho)
diff --git a/opensm/opensm/osm_sa_informinfo.c b/opensm/opensm/osm_sa_informinfo.c
index 334d22e..c8bfad8 100644
--- a/opensm/opensm/osm_sa_informinfo.c
+++ b/opensm/opensm/osm_sa_informinfo.c
@@ -221,10 +221,8 @@ __osm_infr_rcv_respond(IN osm_sa_t * sa,
 
 	OSM_LOG_ENTER(sa->p_log);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Generating successful InformInfo response\n");
-	}
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"Generating successful InformInfo response\n");
 
 	item = malloc(sizeof(*item));
 	if (!item) {
diff --git a/opensm/opensm/osm_sa_lft_record.c b/opensm/opensm/osm_sa_lft_record.c
index e69211a..9589cac 100644
--- a/opensm/opensm/osm_sa_lft_record.c
+++ b/opensm/opensm/osm_sa_lft_record.c
@@ -88,12 +88,11 @@ __osm_lftr_rcv_new_lftr(IN osm_sa_t * sa,
 		goto Exit;
 	}
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"New LinearForwardingTable: sw 0x%016" PRIx64
-			"\n\t\t\t\tblock 0x%02X lid 0x%02X\n",
-			cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)),
-			block, cl_ntoh16(lid));
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"New LinearForwardingTable: sw 0x%016" PRIx64
+		"\n\t\t\t\tblock 0x%02X lid 0x%02X\n",
+		cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)),
+		block, cl_ntoh16(lid));
 
 	memset(p_rec_item, 0, sizeof(*p_rec_item));
 
diff --git a/opensm/opensm/osm_sa_link_record.c b/opensm/opensm/osm_sa_link_record.c
index f08eee1..84dad6b 100644
--- a/opensm/opensm/osm_sa_link_record.c
+++ b/opensm/opensm/osm_sa_link_record.c
@@ -193,14 +193,12 @@ __osm_lr_rcv_get_physp_link(IN osm_sa_t * sa,
 		if (to_base_lid != (p_lr->to_lid & lmc_mask))
 			goto Exit;
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Acquiring link record\n"
-			"\t\t\t\tsrc port 0x%" PRIx64 " (port 0x%X)"
-			", dest port 0x%" PRIx64 " (port 0x%X)\n",
-			cl_ntoh64(osm_physp_get_port_guid(p_src_physp)),
-			src_port_num,
-			cl_ntoh64(osm_physp_get_port_guid(p_dest_physp)),
-			dest_port_num);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Acquiring link record\n"
+		"\t\t\t\tsrc port 0x%" PRIx64 " (port 0x%X)"
+		", dest port 0x%" PRIx64 " (port 0x%X)\n",
+		cl_ntoh64(osm_physp_get_port_guid(p_src_physp)), src_port_num,
+		cl_ntoh64(osm_physp_get_port_guid(p_dest_physp)),
+		dest_port_num);
 
 
 	__osm_lr_rcv_build_physp_link(sa, from_base_lid, to_base_lid,
diff --git a/opensm/opensm/osm_sa_mad_ctrl.c b/opensm/opensm/osm_sa_mad_ctrl.c
index 08026bc..f2ce125 100644
--- a/opensm/opensm/osm_sa_mad_ctrl.c
+++ b/opensm/opensm/osm_sa_mad_ctrl.c
@@ -296,10 +296,8 @@ __osm_sa_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 	 */
 	cl_atomic_inc(&p_ctrl->p_stats->sa_mads_rcvd);
 
-	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"%u SA MADs received\n", p_ctrl->p_stats->sa_mads_rcvd);
-	}
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
+		"%u SA MADs received\n", p_ctrl->p_stats->sa_mads_rcvd);
 
 	/*
 	 * C15-0.1.3 requires not responding to any MAD if the SM is
@@ -430,12 +428,9 @@ __osm_sa_mad_ctrl_send_err_callback(IN void *bind_context,
 	/*  __osm_sm_mad_ctrl_update_wire_stats( p_ctrl ); */
 
 	if (osm_madw_get_err_msg(p_madw) != CL_DISP_MSGID_NONE) {
-		if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG)) {
-			OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
-				"Posting Dispatcher message %s\n",
-				osm_get_disp_msg_str(osm_madw_get_err_msg
-						     (p_madw)));
-		}
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
+			"Posting Dispatcher message %s\n",
+			osm_get_disp_msg_str(osm_madw_get_err_msg(p_madw)));
 
 		status = cl_disp_post(p_ctrl->h_disp,
 				      osm_madw_get_err_msg(p_madw),
diff --git a/opensm/opensm/osm_sa_mft_record.c b/opensm/opensm/osm_sa_mft_record.c
index 8e04705..06d2538 100644
--- a/opensm/opensm/osm_sa_mft_record.c
+++ b/opensm/opensm/osm_sa_mft_record.c
@@ -90,12 +90,11 @@ __osm_mftr_rcv_new_mftr(IN osm_sa_t * sa,
 		goto Exit;
 	}
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"New MulticastForwardingTable: sw 0x%016" PRIx64
-			"\n\t\t\t\tblock %u position %u lid 0x%02X\n",
-			cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)),
-			block, position, cl_ntoh16(lid));
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"New MulticastForwardingTable: sw 0x%016" PRIx64
+		"\n\t\t\t\tblock %u position %u lid 0x%02X\n",
+		cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)),
+		block, position, cl_ntoh16(lid));
 
 	position_block_num = ((uint16_t) position << 12) |
 	    (block & IB_MCAST_BLOCK_ID_MASK_HO);
diff --git a/opensm/opensm/osm_sa_multipath_record.c b/opensm/opensm/osm_sa_multipath_record.c
index 86a1d50..2b8e00a 100644
--- a/opensm/opensm/osm_sa_multipath_record.c
+++ b/opensm/opensm/osm_sa_multipath_record.c
@@ -258,9 +258,8 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 				valid_sl_mask &= ~(1 << i);
 		}
 		if (!valid_sl_mask) {
-			if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-					"All the SLs lead to VL15 on this path\n");
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+				"All the SLs lead to VL15 on this path\n");
 			status = IB_NOT_FOUND;
 			goto Exit;
 		}
@@ -372,10 +371,9 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 					valid_sl_mask &= ~(1 << i);
 			}
 			if (!valid_sl_mask) {
-				if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-					OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-						"All the SLs lead to VL15 "
-						"on this path\n");
+				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+					"All the SLs lead to VL15 "
+					"on this path\n");
 				status = IB_NOT_FOUND;
 				goto Exit;
 			}
@@ -393,10 +391,8 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 	if (rate > ib_port_info_compute_rate(p_pi))
 		rate = ib_port_info_compute_rate(p_pi);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Path min MTU = %u, min rate = %u\n", mtu, rate);
-	}
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"Path min MTU = %u, min rate = %u\n", mtu, rate);
 
 	/*
 	 * Get QoS Level object according to the MultiPath request
@@ -409,12 +405,10 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 						 p_mpr, p_src_physp,
 						 p_dest_physp, comp_mask))) {
 
-		if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-				"MultiPathRecord request matches QoS Level '%s' (%s)\n",
-				p_qos_level->name,
-				(p_qos_level->use) ? p_qos_level->
-				use : "no description");
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+			"MultiPathRecord request matches QoS Level '%s' (%s)\n",
+			p_qos_level->name,
+			p_qos_level->use ? p_qos_level->use : "no description");
 
 		if (p_qos_level->mtu_limit_set
 		    && (mtu > p_qos_level->mtu_limit))
@@ -737,11 +731,10 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 	p_parms->sl = required_sl;
 	p_parms->hops = hops;
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "MultiPath params:"
-			" mtu = %u, rate = %u, packet lifetime = %u,"
-			" pkey = 0x%04X, sl = %u, hops = %u\n", mtu, rate,
-			pkt_life, cl_ntoh16(required_pkey), required_sl, hops);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "MultiPath params:"
+		" mtu = %u, rate = %u, packet lifetime = %u,"
+		" pkey = 0x%04X, sl = %u, hops = %u\n", mtu, rate,
+		pkt_life, cl_ntoh16(required_pkey), required_sl, hops);
 
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
@@ -820,10 +813,8 @@ __osm_mpr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
 
 	OSM_LOG_ENTER(sa->p_log);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Src LID %u, Dest LID %u\n",
-			src_lid_ho, dest_lid_ho);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Src LID %u, Dest LID %u\n",
+		src_lid_ho, dest_lid_ho);
 
 	p_pr_item = malloc(sizeof(*p_pr_item));
 	if (p_pr_item == NULL) {
@@ -906,12 +897,10 @@ __osm_mpr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
 
 	OSM_LOG_ENTER(sa->p_log);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Src port 0x%016" PRIx64 ", "
-			"Dst port 0x%016" PRIx64 "\n",
-			cl_ntoh64(osm_port_get_guid(p_src_port)),
-			cl_ntoh64(osm_port_get_guid(p_dest_port)));
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"Src port 0x%016" PRIx64 ", Dst port 0x%016" PRIx64 "\n",
+		cl_ntoh64(osm_port_get_guid(p_src_port)),
+		cl_ntoh64(osm_port_get_guid(p_dest_port)));
 
 	/* Check that the req_port, src_port and dest_port all share a
 	   pkey. The check is done on the default physical port of the ports. */
@@ -972,11 +961,9 @@ __osm_mpr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
 	osm_port_get_lid_range_ho(p_dest_port, &dest_lid_min_ho,
 				  &dest_lid_max_ho);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Src LID [%u-%u], Dest LID [%u-%u]\n",
-			src_lid_min_ho, src_lid_max_ho,
-			dest_lid_min_ho, dest_lid_max_ho);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Src LID [%u-%u], Dest LID [%u-%u]\n",
+		src_lid_min_ho, src_lid_max_ho,
+		dest_lid_min_ho, dest_lid_max_ho);
 
 	src_lid_ho = src_lid_min_ho;
 	dest_lid_ho = dest_lid_min_ho;
@@ -1101,12 +1088,10 @@ __osm_mpr_rcv_get_apm_port_pair_paths(IN osm_sa_t * sa,
 
 	OSM_LOG_ENTER(sa->p_log);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Src port 0x%016" PRIx64 ", "
-			"Dst port 0x%016" PRIx64 ", base offs %d\n",
-			cl_ntoh64(osm_port_get_guid(p_src_port)),
-			cl_ntoh64(osm_port_get_guid(p_dest_port)), base_offs);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Src port 0x%016" PRIx64 ", "
+		"Dst port 0x%016" PRIx64 ", base offs %d\n",
+		cl_ntoh64(osm_port_get_guid(p_src_port)),
+		cl_ntoh64(osm_port_get_guid(p_dest_port)), base_offs);
 
 	osm_port_get_lid_range_ho(p_src_port, &src_lid_min_ho, &src_lid_max_ho);
 	osm_port_get_lid_range_ho(p_dest_port, &dest_lid_min_ho,
diff --git a/opensm/opensm/osm_sa_node_record.c b/opensm/opensm/osm_sa_node_record.c
index 1ba418e..a18d0ef 100644
--- a/opensm/opensm/osm_sa_node_record.c
+++ b/opensm/opensm/osm_sa_node_record.c
@@ -88,13 +88,11 @@ __osm_nr_rcv_new_nr(IN osm_sa_t * sa,
 		goto Exit;
 	}
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"New NodeRecord: node 0x%016" PRIx64
-			"\n\t\t\t\tport 0x%016" PRIx64 ", lid 0x%X\n",
-			cl_ntoh64(osm_node_get_node_guid(p_node)),
-			cl_ntoh64(port_guid), cl_ntoh16(lid)
-		    );
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"New NodeRecord: node 0x%016" PRIx64
+		"\n\t\t\t\tport 0x%016" PRIx64 ", lid 0x%X\n",
+		cl_ntoh64(osm_node_get_node_guid(p_node)),
+		cl_ntoh64(port_guid), cl_ntoh16(lid));
 
 	memset(p_rec_item, 0, sizeof(*p_rec_item));
 
@@ -133,13 +131,10 @@ __osm_nr_rcv_create_nr(IN osm_sa_t * sa,
 
 	OSM_LOG_ENTER(sa->p_log);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Looking for NodeRecord with LID: %u GUID:0x%016"
-			PRIx64 "\n", cl_ntoh16(match_lid),
-			cl_ntoh64(match_port_guid)
-		    );
-	}
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"Looking for NodeRecord with LID: %u GUID:0x%016"
+		PRIx64 "\n", cl_ntoh16(match_lid),
+		cl_ntoh64(match_port_guid));
 
 	/*
 	   For switches, do not return the NodeInfo record
@@ -175,11 +170,9 @@ __osm_nr_rcv_create_nr(IN osm_sa_t * sa,
 			/*
 			   We validate that the lid belongs to this node.
 			 */
-			if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-					"Comparing LID: %u <= %u <= %u\n",
-					base_lid_ho, match_lid_ho, max_lid_ho);
-			}
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+				"Comparing LID: %u <= %u <= %u\n",
+				base_lid_ho, match_lid_ho, max_lid_ho);
 
 			if (match_lid_ho < base_lid_ho
 			    || match_lid_ho > max_lid_ho)
@@ -217,20 +210,12 @@ __osm_nr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item, IN void *context)
 		match_lid = p_rcvd_rec->lid;
 
 	if (comp_mask & IB_NR_COMPMASK_NODEGUID) {
-		/*
-		   DEBUG TOP
-		 */
-		if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-				"Looking for node 0x%016" PRIx64
-				", found 0x%016" PRIx64 "\n",
-				cl_ntoh64(p_rcvd_rec->node_info.node_guid),
-				cl_ntoh64(osm_node_get_node_guid(p_node))
-			    );
-		}
-		/*
-		   DEBUG BOTTOM
-		 */
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+			"Looking for node 0x%016" PRIx64
+			", found 0x%016" PRIx64 "\n",
+			cl_ntoh64(p_rcvd_rec->node_info.node_guid),
+			cl_ntoh64(osm_node_get_node_guid(p_node)));
+
 		if ((p_node->node_info.node_guid !=
 		     p_rcvd_rec->node_info.node_guid))
 			goto Exit;
diff --git a/opensm/opensm/osm_sa_path_record.c b/opensm/opensm/osm_sa_path_record.c
index 2cdce03..d60dc01 100644
--- a/opensm/opensm/osm_sa_path_record.c
+++ b/opensm/opensm/osm_sa_path_record.c
@@ -266,9 +266,8 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 				valid_sl_mask &= ~(1 << i);
 		}
 		if (!valid_sl_mask) {
-			if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-					"All the SLs lead to VL15 on this path\n");
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+				"All the SLs lead to VL15 on this path\n");
 			status = IB_NOT_FOUND;
 			goto Exit;
 		}
@@ -379,10 +378,8 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 					valid_sl_mask &= ~(1 << i);
 			}
 			if (!valid_sl_mask) {
-				if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-					OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-						"All the SLs lead to VL15 "
-						"on this path\n");
+				OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "All the SLs "
+					"lead to VL15 on this path\n");
 				status = IB_NOT_FOUND;
 				goto Exit;
 			}
@@ -400,9 +397,8 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 	if (rate > ib_port_info_compute_rate(p_pi))
 		rate = ib_port_info_compute_rate(p_pi);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Path min MTU = %u, min rate = %u\n", mtu, rate);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"Path min MTU = %u, min rate = %u\n", mtu, rate);
 
 	/*
 	 * Get QoS Level object according to the path request
@@ -414,12 +410,10 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 	     osm_qos_policy_get_qos_level_by_pr(sa->p_subn->p_qos_policy,
 						p_pr, p_src_physp, p_dest_physp,
 						comp_mask))) {
-		if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-				"PathRecord request matches QoS Level '%s' (%s)\n",
-				p_qos_level->name,
-				(p_qos_level->use) ? p_qos_level->
-				use : "no description");
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+			"PathRecord request matches QoS Level '%s' (%s)\n",
+			p_qos_level->name, p_qos_level->use ?
+			p_qos_level->use : "no description");
 
 		if (p_qos_level->mtu_limit_set
 		    && (mtu > p_qos_level->mtu_limit))
@@ -745,11 +739,9 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 	p_parms->pkey = pkey;
 	p_parms->sl = sl;
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Path params:"
-			" mtu = %u, rate = %u, packet lifetime = %u,"
-			" pkey = 0x%04X, sl = %u\n",
-			mtu, rate, pkt_life, cl_ntoh16(pkey), sl);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Path params: mtu = %u, rate = %u,"
+		" packet lifetime = %u, pkey = 0x%04X, sl = %u\n",
+		mtu, rate, pkt_life, cl_ntoh16(pkey), sl);
 Exit:
 	OSM_LOG_EXIT(sa->p_log);
 	return (status);
@@ -846,10 +838,8 @@ __osm_pr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
 
 	OSM_LOG_ENTER(sa->p_log);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Src LID %u, Dest LID %u\n",
-			src_lid_ho, dest_lid_ho);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Src LID %u, Dest LID %u\n",
+		src_lid_ho, dest_lid_ho);
 
 	p_pr_item = malloc(sizeof(*p_pr_item));
 	if (p_pr_item == NULL) {
@@ -931,12 +921,10 @@ __osm_pr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
 
 	OSM_LOG_ENTER(sa->p_log);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Src port 0x%016" PRIx64 ", "
-			"Dst port 0x%016" PRIx64 "\n",
-			cl_ntoh64(osm_port_get_guid(p_src_port)),
-			cl_ntoh64(osm_port_get_guid(p_dest_port)));
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"Src port 0x%016" PRIx64 ", Dst port 0x%016" PRIx64 "\n",
+		cl_ntoh64(osm_port_get_guid(p_src_port)),
+		cl_ntoh64(osm_port_get_guid(p_dest_port)));
 
 	/* Check that the req_port, src_port and dest_port all share a
 	   pkey. The check is done on the default physical port of the ports. */
@@ -1025,11 +1013,10 @@ __osm_pr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
 		goto Exit;
 	}
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Src LIDs [%u-%u], Dest LIDs [%u-%u]\n",
-			src_lid_min_ho, src_lid_max_ho,
-			dest_lid_min_ho, dest_lid_max_ho);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"Src LIDs [%u-%u], Dest LIDs [%u-%u]\n",
+		src_lid_min_ho, src_lid_max_ho,
+		dest_lid_min_ho, dest_lid_max_ho);
 
 	src_lid_ho = src_lid_min_ho;
 	dest_lid_ho = dest_lid_min_ho;
diff --git a/opensm/opensm/osm_sa_pkey_record.c b/opensm/opensm/osm_sa_pkey_record.c
index db341f1..f7f933b 100644
--- a/opensm/opensm/osm_sa_pkey_record.c
+++ b/opensm/opensm/osm_sa_pkey_record.c
@@ -91,13 +91,11 @@ __osm_sa_pkey_create(IN osm_sa_t * sa,
 	else
 		lid = osm_node_get_base_lid(p_physp->p_node, 0);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"New P_Key table for: port 0x%016" PRIx64
-			", lid 0x%X, port 0x%X Block:%u\n",
-			cl_ntoh64(osm_physp_get_port_guid(p_physp)),
-			cl_ntoh16(lid), osm_physp_get_port_num(p_physp), block);
-	}
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"New P_Key table for: port 0x%016" PRIx64
+		", lid 0x%X, port 0x%X Block:%u\n",
+		cl_ntoh64(osm_physp_get_port_guid(p_physp)),
+		cl_ntoh16(lid), osm_physp_get_port_num(p_physp), block);
 
 	memset(p_rec_item, 0, sizeof(*p_rec_item));
 
diff --git a/opensm/opensm/osm_sa_portinfo_record.c b/opensm/opensm/osm_sa_portinfo_record.c
index 267fe4a..afe61e1 100644
--- a/opensm/opensm/osm_sa_portinfo_record.c
+++ b/opensm/opensm/osm_sa_portinfo_record.c
@@ -92,12 +92,11 @@ __osm_pir_rcv_new_pir(IN osm_sa_t * sa,
 		goto Exit;
 	}
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"New PortInfoRecord: port 0x%016" PRIx64
-			", lid 0x%X, port 0x%X\n",
-			cl_ntoh64(osm_physp_get_port_guid(p_physp)),
-			cl_ntoh16(lid), osm_physp_get_port_num(p_physp));
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"New PortInfoRecord: port 0x%016" PRIx64
+		", lid 0x%X, port 0x%X\n",
+		cl_ntoh64(osm_physp_get_port_guid(p_physp)),
+		cl_ntoh16(lid), osm_physp_get_port_num(p_physp));
 
 	memset(p_rec_item, 0, sizeof(*p_rec_item));
 
@@ -147,10 +146,9 @@ __osm_sa_pir_create(IN osm_sa_t * sa,
 		/*
 		   We validate that the lid belongs to this node.
 		 */
-		if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-				"Comparing LID: %u <= %u <= %u\n",
-				base_lid_ho, match_lid_ho, max_lid_ho);
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+			"Comparing LID: %u <= %u <= %u\n",
+			base_lid_ho, match_lid_ho, max_lid_ho);
 
 		if (match_lid_ho < base_lid_ho || match_lid_ho > max_lid_ho)
 			goto Exit;
diff --git a/opensm/opensm/osm_sa_service_record.c b/opensm/opensm/osm_sa_service_record.c
index c9f4ee0..93d86b5 100644
--- a/opensm/opensm/osm_sa_service_record.c
+++ b/opensm/opensm/osm_sa_service_record.c
@@ -487,10 +487,9 @@ osm_sr_rcv_process_get_method(IN osm_sa_t * sa,
 	p_recvd_service_rec =
 	    (ib_service_record_t *) ib_sa_mad_get_payload_ptr(p_sa_mad);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		osm_dump_service_record(sa->p_log,
-					p_recvd_service_rec, OSM_LOG_DEBUG);
-	}
+	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
+		osm_dump_service_record(sa->p_log, p_recvd_service_rec,
+					OSM_LOG_DEBUG);
 
 	cl_qlist_init(&sr_match_item.sr_list);
 	sr_match_item.p_service_rec = p_recvd_service_rec;
@@ -547,10 +546,9 @@ osm_sr_rcv_process_set_method(IN osm_sa_t * sa,
 
 	comp_mask = p_sa_mad->comp_mask;
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		osm_dump_service_record(sa->p_log,
-					p_recvd_service_rec, OSM_LOG_DEBUG);
-	}
+	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
+		osm_dump_service_record(sa->p_log, p_recvd_service_rec,
+					OSM_LOG_DEBUG);
 
 	if ((comp_mask & (IB_SR_COMPMASK_SID | IB_SR_COMPMASK_SGID)) !=
 	    (IB_SR_COMPMASK_SID | IB_SR_COMPMASK_SGID)) {
@@ -657,10 +655,9 @@ osm_sr_rcv_process_delete_method(IN osm_sa_t * sa,
 
 	comp_mask = p_sa_mad->comp_mask;
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		osm_dump_service_record(sa->p_log,
-					p_recvd_service_rec, OSM_LOG_DEBUG);
-	}
+	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
+		osm_dump_service_record(sa->p_log, p_recvd_service_rec,
+					OSM_LOG_DEBUG);
 
 	/* Grab the lock */
 	cl_plock_excl_acquire(sa->p_lock);
diff --git a/opensm/opensm/osm_sa_slvl_record.c b/opensm/opensm/osm_sa_slvl_record.c
index 0b33307..46b66a6 100644
--- a/opensm/opensm/osm_sa_slvl_record.c
+++ b/opensm/opensm/osm_sa_slvl_record.c
@@ -98,13 +98,11 @@ __osm_sa_slvl_create(IN osm_sa_t * sa,
 	else
 		lid = osm_node_get_base_lid(p_physp->p_node, 0);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"New SLtoVL Map for: OUT port 0x%016" PRIx64
-			", lid 0x%X, port 0x%X to In Port:%u\n",
-			cl_ntoh64(osm_physp_get_port_guid(p_physp)),
-			cl_ntoh16(lid), osm_physp_get_port_num(p_physp),
-			in_port_idx);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"New SLtoVL Map for: OUT port 0x%016" PRIx64
+		", lid 0x%X, port 0x%X to In Port:%u\n",
+		cl_ntoh64(osm_physp_get_port_guid(p_physp)),
+		cl_ntoh16(lid), osm_physp_get_port_num(p_physp), in_port_idx);
 
 	memset(p_rec_item, 0, sizeof(*p_rec_item));
 
diff --git a/opensm/opensm/osm_sa_sminfo_record.c b/opensm/opensm/osm_sa_sminfo_record.c
index f23c3e0..e736c0c 100644
--- a/opensm/opensm/osm_sa_sminfo_record.c
+++ b/opensm/opensm/osm_sa_sminfo_record.c
@@ -98,9 +98,8 @@ __osm_smir_rcv_new_smir(IN osm_sa_t * sa,
 		goto Exit;
 	}
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"New SMInfo: GUID 0x%016" PRIx64 "\n", cl_ntoh64(guid));
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"New SMInfo: GUID 0x%016" PRIx64 "\n", cl_ntoh64(guid));
 
 	memset(p_rec_item, 0, sizeof(*p_rec_item));
 
diff --git a/opensm/opensm/osm_sa_sw_info_record.c b/opensm/opensm/osm_sa_sw_info_record.c
index 9a3c112..7dd3de7 100644
--- a/opensm/opensm/osm_sa_sw_info_record.c
+++ b/opensm/opensm/osm_sa_sw_info_record.c
@@ -87,9 +87,8 @@ __osm_sir_rcv_new_sir(IN osm_sa_t * sa,
 		goto Exit;
 	}
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"New SwitchInfoRecord: lid 0x%X\n", cl_ntoh16(lid));
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"New SwitchInfoRecord: lid 0x%X\n", cl_ntoh16(lid));
 
 	memset(p_rec_item, 0, sizeof(*p_rec_item));
 
@@ -120,10 +119,9 @@ __osm_sir_rcv_create_sir(IN osm_sa_t * sa,
 
 	OSM_LOG_ENTER(sa->p_log);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"Looking for SwitchInfoRecord with LID: %u\n",
-			cl_ntoh16(match_lid));
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"Looking for SwitchInfoRecord with LID: %u\n",
+		cl_ntoh16(match_lid));
 
 	/* In switches, the port guid is the node guid. */
 	p_port =
@@ -156,10 +154,9 @@ __osm_sir_rcv_create_sir(IN osm_sa_t * sa,
 		/*
 		   We validate that the lid belongs to this switch.
 		 */
-		if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-				"Comparing LID: %u <= %u <= %u\n",
-				min_lid_ho, match_lid_ho, max_lid_ho);
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+			"Comparing LID: %u <= %u <= %u\n",
+			min_lid_ho, match_lid_ho, max_lid_ho);
 
 		if (match_lid_ho < min_lid_ho || match_lid_ho > max_lid_ho)
 			goto Exit;
diff --git a/opensm/opensm/osm_sa_vlarb_record.c b/opensm/opensm/osm_sa_vlarb_record.c
index eb4dd81..2787fc5 100644
--- a/opensm/opensm/osm_sa_vlarb_record.c
+++ b/opensm/opensm/osm_sa_vlarb_record.c
@@ -98,12 +98,11 @@ __osm_sa_vl_arb_create(IN osm_sa_t * sa,
 	else
 		lid = osm_node_get_base_lid(p_physp->p_node, 0);
 
-	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
-			"New VLArbitration for: port 0x%016" PRIx64
-			", lid 0x%X, port 0x%X Block:%u\n",
-			cl_ntoh64(osm_physp_get_port_guid(p_physp)),
-			cl_ntoh16(lid), osm_physp_get_port_num(p_physp), block);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+		"New VLArbitration for: port 0x%016" PRIx64
+		", lid 0x%X, port 0x%X Block:%u\n",
+		cl_ntoh64(osm_physp_get_port_guid(p_physp)),
+		cl_ntoh16(lid), osm_physp_get_port_num(p_physp), block);
 
 	memset(p_rec_item, 0, sizeof(*p_rec_item));
 
diff --git a/opensm/opensm/osm_slvl_map_rcv.c b/opensm/opensm/osm_slvl_map_rcv.c
index 9899625..000c2a6 100644
--- a/opensm/opensm/osm_slvl_map_rcv.c
+++ b/opensm/opensm/osm_slvl_map_rcv.c
@@ -123,14 +123,11 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 	   We do not mind if this is a result of a set or get - all we want is to update
 	   the subnet.
 	 */
-	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE)) {
-		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-			"Got SLtoVL get response in_port_num %u out_port_num %u with GUID 0x%"
-			PRIx64 " for parent node GUID 0x%" PRIx64 ", TID 0x%"
-			PRIx64 "\n", in_port_num, out_port_num,
-			cl_ntoh64(port_guid), cl_ntoh64(node_guid),
-			cl_ntoh64(p_smp->trans_id));
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+		"Got SLtoVL get response in_port_num %u out_port_num %u with "
+		"GUID 0x%" PRIx64 " for parent node GUID 0x%" PRIx64 ", TID 0x%"
+		PRIx64 "\n", in_port_num, out_port_num, cl_ntoh64(port_guid),
+		cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
 
 	/*
 	   Determine if we encountered a new Physical Port.
diff --git a/opensm/opensm/osm_sm_mad_ctrl.c b/opensm/opensm/osm_sm_mad_ctrl.c
index aa91c21..2815aa2 100644
--- a/opensm/opensm/osm_sm_mad_ctrl.c
+++ b/opensm/opensm/osm_sm_mad_ctrl.c
@@ -76,19 +76,16 @@ __osm_sm_mad_ctrl_retire_trans_mad(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	/*
 	   Return the MAD & wrapper to the pool.
 	 */
-	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"Retiring MAD with TID 0x%" PRIx64 "\n",
-			cl_ntoh64(osm_madw_get_smp_ptr(p_madw)->trans_id));
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
+		"Retiring MAD with TID 0x%" PRIx64 "\n",
+		cl_ntoh64(osm_madw_get_smp_ptr(p_madw)->trans_id));
 
 	osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw);
 
 	outstanding = cl_atomic_dec(&p_ctrl->p_stats->qp0_mads_outstanding);
 
-	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"%u QP0 MADs outstanding\n",
-			p_ctrl->p_stats->qp0_mads_outstanding);
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG, "%u QP0 MADs outstanding\n",
+		p_ctrl->p_stats->qp0_mads_outstanding);
 
 	if (outstanding == 0) {
 		/*
@@ -170,10 +167,9 @@ __osm_sm_mad_ctrl_update_wire_stats(IN osm_sm_mad_ctrl_t * const p_ctrl)
 	mads_on_wire =
 	    cl_atomic_dec(&p_ctrl->p_stats->qp0_mads_outstanding_on_wire);
 
-	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"%u SMPs on the wire, %u outstanding\n", mads_on_wire,
-			p_ctrl->p_stats->qp0_mads_outstanding);
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
+		"%u SMPs on the wire, %u outstanding\n", mads_on_wire,
+		p_ctrl->p_stats->qp0_mads_outstanding);
 
 	/*
 	   We can signal the VL15 controller to send another MAD
@@ -287,10 +283,8 @@ __osm_sm_mad_ctrl_process_get_resp(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	   processing by the appropriate controller.
 	 */
 
-	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"Posting Dispatcher message %s\n",
-			osm_get_disp_msg_str(msg_id));
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG, "Posting Dispatcher message %s\n",
+		osm_get_disp_msg_str(msg_id));
 
 	status = cl_disp_post(p_ctrl->h_disp, msg_id, p_madw,
 			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
@@ -358,10 +352,8 @@ __osm_sm_mad_ctrl_process_get(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	   processing by the appropriate controller.
 	 */
 
-	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"Posting Dispatcher message %s\n",
-			osm_get_disp_msg_str(msg_id));
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG, "Posting Dispatcher message %s\n",
+		osm_get_disp_msg_str(msg_id));
 
 	status = cl_disp_post(p_ctrl->h_disp, msg_id, p_madw,
 			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
@@ -440,10 +432,8 @@ __osm_sm_mad_ctrl_process_set(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	   processing by the appropriate controller.
 	 */
 
-	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"Posting Dispatcher message %s\n",
-			osm_get_disp_msg_str(msg_id));
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG, "Posting Dispatcher message %s\n",
+		osm_get_disp_msg_str(msg_id));
 
 	status = cl_disp_post(p_ctrl->h_disp, msg_id, p_madw,
 			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
@@ -531,10 +521,8 @@ __osm_sm_mad_ctrl_process_trap(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	   processing by the appropriate controller.
 	 */
 
-	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"Posting Dispatcher message %s\n",
-			osm_get_disp_msg_str(msg_id));
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG, "Posting Dispatcher message %s\n",
+		osm_get_disp_msg_str(msg_id));
 
 	status = cl_disp_post(p_ctrl->h_disp, msg_id, p_madw,
 			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
@@ -587,10 +575,8 @@ __osm_sm_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 	 */
 	cl_atomic_inc(&p_ctrl->p_stats->qp0_mads_rcvd);
 
-	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"%u QP0 MADs received\n",
-			p_ctrl->p_stats->qp0_mads_rcvd);
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG, "%u QP0 MADs received\n",
+		p_ctrl->p_stats->qp0_mads_rcvd);
 
 	p_smp = osm_madw_get_smp_ptr(p_madw);
 
@@ -755,11 +741,9 @@ __osm_sm_mad_ctrl_send_err_cb(IN void *bind_context, IN osm_madw_t * p_madw)
 	__osm_sm_mad_ctrl_update_wire_stats(p_ctrl);
 
 	if (osm_madw_get_err_msg(p_madw) != CL_DISP_MSGID_NONE) {
-		if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
-				"Posting Dispatcher message %s\n",
-				osm_get_disp_msg_str(osm_madw_get_err_msg
-						     (p_madw)));
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
+			"Posting Dispatcher message %s\n",
+			osm_get_disp_msg_str(osm_madw_get_err_msg(p_madw)));
 
 		status = cl_disp_post(p_ctrl->h_disp,
 				      osm_madw_get_err_msg(p_madw),
diff --git a/opensm/opensm/osm_sm_state_mgr.c b/opensm/opensm/osm_sm_state_mgr.c
index 6edba50..5736b8c 100644
--- a/opensm/opensm/osm_sm_state_mgr.c
+++ b/opensm/opensm/osm_sm_state_mgr.c
@@ -257,11 +257,10 @@ ib_api_status_t osm_sm_state_mgr_process(osm_sm_t * sm,
 	 */
 	cl_spinlock_acquire(&sm->state_lock);
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Received signal %s in state %s\n",
-			osm_get_sm_mgr_signal_str(signal),
-			osm_get_sm_mgr_state_str(sm->p_subn->sm_state));
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Received signal %s in state %s\n",
+		osm_get_sm_mgr_signal_str(signal),
+		osm_get_sm_mgr_state_str(sm->p_subn->sm_state));
 
 	switch (sm->p_subn->sm_state) {
 	case IB_SMINFO_STATE_DISCOVERING:
@@ -476,11 +475,10 @@ ib_api_status_t osm_sm_state_mgr_check_legality(osm_sm_t * sm,
 	 */
 	cl_spinlock_acquire(&sm->state_lock);
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Received signal %s in state %s\n",
-			osm_get_sm_mgr_signal_str(signal),
-			osm_get_sm_mgr_state_str(sm->p_subn->sm_state));
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Received signal %s in state %s\n",
+		osm_get_sm_mgr_signal_str(signal),
+		osm_get_sm_mgr_state_str(sm->p_subn->sm_state));
 
 	switch (sm->p_subn->sm_state) {
 	case IB_SMINFO_STATE_DISCOVERING:
diff --git a/opensm/opensm/osm_sminfo_rcv.c b/opensm/opensm/osm_sminfo_rcv.c
index 9a262d2..22a9566 100644
--- a/opensm/opensm/osm_sminfo_rcv.c
+++ b/opensm/opensm/osm_sminfo_rcv.c
@@ -326,10 +326,9 @@ __osm_sminfo_rcv_process_get_sm(IN osm_sm_t * sm,
 
 	p_smi = &p_sm->smi;
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE))
-		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-			"Detected SM 0x%016" PRIx64 " in state %u\n",
-			cl_ntoh64(p_smi->guid), ib_sminfo_get_state(p_smi));
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+		"Detected SM 0x%016" PRIx64 " in state %u\n",
+		cl_ntoh64(p_smi->guid), ib_sminfo_get_state(p_smi));
 
 	/*
 	   Check the state of this SM vs. our own.
diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
index b9fd7f7..62b3914 100644
--- a/opensm/opensm/osm_state_mgr.c
+++ b/opensm/opensm/osm_state_mgr.c
@@ -93,14 +93,6 @@ static void __osm_state_mgr_reset_node_count(IN cl_map_item_t *
 					     const p_map_item, IN void *context)
 {
 	osm_node_t *p_node = (osm_node_t *) p_map_item;
-	osm_sm_t *sm = context;
-
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Resetting discovery count for node 0x%" PRIx64
-			"(%s)\n", cl_ntoh64(osm_node_get_node_guid(p_node)),
-			p_node->print_desc);
-	}
 
 	p_node->discovery_count = 0;
 }
@@ -111,15 +103,6 @@ static void __osm_state_mgr_reset_port_count(IN cl_map_item_t *
 					     const p_map_item, IN void *context)
 {
 	osm_port_t *p_port = (osm_port_t *) p_map_item;
-	osm_sm_t *sm = context;
-
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Resetting discovery count for port 0x%" PRIx64
-			"(node %s)\n", cl_ntoh64(osm_port_get_guid(p_port)),
-			p_port->p_node ? p_port->p_node->
-			print_desc : "UNKNOWN");
-	}
 
 	p_port->discovery_count = 0;
 }
@@ -131,15 +114,6 @@ __osm_state_mgr_reset_switch_count(IN cl_map_item_t * const p_map_item,
 				   IN void *context)
 {
 	osm_switch_t *p_sw = (osm_switch_t *) p_map_item;
-	osm_sm_t *sm = context;
-
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Resetting discovery count for switch 0x%" PRIx64
-			" (%s)\n",
-			cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)),
-			p_sw->p_node->print_desc);
-	}
 
 	p_sw->discovery_count = 0;
 	p_sw->need_update = 1;
@@ -1302,11 +1276,10 @@ void osm_state_mgr_process(IN osm_sm_t * sm, IN osm_signal_t signal)
 
 	OSM_LOG_ENTER(sm->p_log);
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Received signal %s in state %s\n",
-			osm_get_sm_signal_str(signal),
-			osm_get_sm_mgr_state_str(sm->p_subn->sm_state));
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Received signal %s in state %s\n",
+		osm_get_sm_signal_str(signal),
+		osm_get_sm_mgr_state_str(sm->p_subn->sm_state));
 
 	switch (signal) {
 	case OSM_SIGNAL_SWEEP:
diff --git a/opensm/opensm/osm_sw_info_rcv.c b/opensm/opensm/osm_sw_info_rcv.c
index 362d54f..f75be65 100644
--- a/opensm/opensm/osm_sw_info_rcv.c
+++ b/opensm/opensm/osm_sw_info_rcv.c
@@ -149,9 +149,8 @@ __osm_si_rcv_get_fwd_tbl(IN osm_sm_t * sm, IN osm_switch_t * const p_sw)
 	p_dr_path = osm_physp_get_dr_path_ptr(p_physp);
 
 	for (block_id_ho = 0; block_id_ho <= max_block_id_ho; block_id_ho++) {
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Retrieving FT block %u\n", block_id_ho);
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"Retrieving FT block %u\n", block_id_ho);
 
 		status = osm_req_get(sm, p_dr_path, IB_MAD_ATTR_LIN_FWD_TBL,
 				     cl_hton32(block_id_ho),
@@ -226,15 +225,12 @@ __osm_si_rcv_get_mcast_fwd_tbl(IN osm_sm_t * sm, IN osm_switch_t * const p_sw)
 	p_dr_path = osm_physp_get_dr_path_ptr(p_physp);
 
 	for (block_id_ho = 0; block_id_ho <= max_block_id_ho; block_id_ho++) {
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Retrieving MFT block %u\n", block_id_ho);
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"Retrieving MFT block %u\n", block_id_ho);
 
 		for (position = 0; position <= max_position; position++) {
-			if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-				OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-					"Retrieving MFT position %u\n",
-					position);
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+				"Retrieving MFT position %u\n", position);
 
 			attr_mod_ho =
 			    block_id_ho | position << IB_MCAST_POSITION_SHIFT;
@@ -384,15 +380,13 @@ __osm_si_rcv_process_existing(IN osm_sm_t * sm,
 	p_si_context = osm_madw_get_si_context_ptr(p_madw);
 
 	if (p_si_context->set_method) {
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Received logical SetResp()\n");
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"Received logical SetResp()\n");
 
 		osm_switch_set_switch_info(p_sw, p_si);
 	} else {
-		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-				"Received logical GetResp()\n");
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+			"Received logical GetResp()\n");
 
 		osm_switch_set_switch_info(p_sw, p_si);
 
@@ -474,10 +468,9 @@ void osm_si_rcv_process(IN void *context, IN void *data)
 
 	node_guid = p_context->node_guid;
 
-	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
-			"Switch GUID 0x%016" PRIx64 ", TID 0x%" PRIx64 "\n",
-			cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Switch GUID 0x%016" PRIx64 ", TID 0x%" PRIx64 "\n",
+		cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
 
 	CL_PLOCK_EXCL_ACQUIRE(sm->p_lock);
 
diff --git a/opensm/opensm/osm_ucast_mgr.c b/opensm/opensm/osm_ucast_mgr.c
index 82d1f4b..a686dc9 100644
--- a/opensm/opensm/osm_ucast_mgr.c
+++ b/opensm/opensm/osm_ucast_mgr.c
@@ -150,14 +150,12 @@ __osm_ucast_mgr_process_neighbor(IN osm_ucast_mgr_t * const p_mgr,
 
 	OSM_LOG_ENTER(p_mgr->p_log);
 
-	if (osm_log_is_active(p_mgr->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
-			"Node 0x%" PRIx64 ", remote node 0x%" PRIx64
-			", port 0x%X, remote port 0x%X\n",
-			cl_ntoh64(osm_node_get_node_guid(p_this_sw->p_node)),
-			cl_ntoh64(osm_node_get_node_guid(p_remote_sw->p_node)),
-			port_num, remote_port_num);
-	}
+	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
+		"Node 0x%" PRIx64 ", remote node 0x%" PRIx64
+		", port 0x%X, remote port 0x%X\n",
+		cl_ntoh64(osm_node_get_node_guid(p_this_sw->p_node)),
+		cl_ntoh64(osm_node_get_node_guid(p_remote_sw->p_node)),
+		port_num, remote_port_num);
 
 	p_next_sw = (osm_switch_t *) cl_qmap_head(&p_mgr->p_subn->sw_guid_tbl);
 	while (p_next_sw !=
@@ -244,12 +242,11 @@ __osm_ucast_mgr_process_port(IN osm_ucast_mgr_t * const p_mgr,
 		/* ignore potential overflow - it is handled in osm_switch.c */
 		start_from = osm_switch_get_port_by_lid(p_sw, lid_ho - 1) + 1;
 
-	if (osm_log_is_active(p_mgr->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
-			"Processing port 0x%" PRIx64 " (\'%s\' port %u), LID %u [%u,%u]\n",
-			cl_ntoh64(osm_port_get_guid(p_port)),
-			p_port->p_node->print_desc, p_port->p_physp->port_num,
-			lid_ho, min_lid_ho, max_lid_ho);
+	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
+		"Processing port 0x%" PRIx64 " (\'%s\' port %u), LID %u [%u,%u]\n",
+		cl_ntoh64(osm_port_get_guid(p_port)),
+		p_port->p_node->print_desc, p_port->p_physp->port_num,
+		lid_ho, min_lid_ho, max_lid_ho);
 
 	/* TODO - This should be runtime error, not a CL_ASSERT() */
 	CL_ASSERT(max_lid_ho < osm_switch_get_fwd_tbl_size(p_sw));
@@ -382,11 +379,8 @@ osm_ucast_mgr_set_fwd_table(IN osm_ucast_mgr_t * const p_mgr,
 	}
 
 	if (set_swinfo_require) {
-		if (osm_log_is_active(p_mgr->p_log, OSM_LOG_DEBUG)) {
-			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
-				"Setting switch FT top to LID %u\n",
-				p_sw->max_lid_ho);
-		}
+		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
+			"Setting switch FT top to LID %u\n", p_sw->max_lid_ho);
 
 		context.si_context.light_sweep = FALSE;
 		context.si_context.node_guid = osm_node_get_node_guid(p_node);
@@ -421,10 +415,8 @@ osm_ucast_mgr_set_fwd_table(IN osm_ucast_mgr_t * const p_mgr,
 		    !memcmp(block, p_mgr->lft_buf + block_id_ho * 64, 64))
 			continue;
 
-		if (osm_log_is_active(p_mgr->p_log, OSM_LOG_DEBUG)) {
-			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
-				"Writing FT block %u\n", block_id_ho);
-		}
+		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
+			"Writing FT block %u\n", block_id_ho);
 
 		status = osm_req_set(p_mgr->sm, p_path,
 				     p_mgr->lft_buf + block_id_ho * 64,
@@ -501,11 +493,9 @@ __osm_ucast_mgr_process_tbl(IN cl_map_item_t * const p_map_item,
 
 	CL_ASSERT(p_sw && p_sw->p_node);
 
-	if (osm_log_is_active(p_mgr->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
-			"Processing switch 0x%" PRIx64 "\n",
-			cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)));
-	}
+	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
+		"Processing switch 0x%" PRIx64 "\n",
+		cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)));
 
 	/* Initialize LIDs in buffer to invalid port number. */
 	memset(p_mgr->lft_buf, OSM_NO_PATH, IB_LID_UCAST_END_HO + 1);
@@ -558,11 +548,9 @@ __osm_ucast_mgr_process_neighbors(IN cl_map_item_t * const p_map_item,
 	CL_ASSERT(p_node);
 	CL_ASSERT(osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH);
 
-	if (osm_log_is_active(p_mgr->p_log, OSM_LOG_DEBUG)) {
-		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
-			"Processing switch with GUID 0x%" PRIx64 "\n",
-			cl_ntoh64(osm_node_get_node_guid(p_node)));
-	}
+	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
+		"Processing switch with GUID 0x%" PRIx64 "\n",
+		cl_ntoh64(osm_node_get_node_guid(p_node)));
 
 	num_ports = osm_node_get_num_physp(p_node);
 
diff --git a/opensm/opensm/osm_vl15intf.c b/opensm/opensm/osm_vl15intf.c
index a47f9ba..7f14e73 100644
--- a/opensm/opensm/osm_vl15intf.c
+++ b/opensm/opensm/osm_vl15intf.c
@@ -83,14 +83,13 @@ static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)
 				 p_madw, p_madw->resp_expected);
 
 	if (status == IB_SUCCESS) {
-		if (osm_log_is_active(p_vl->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
-				"%u QP0 MADs on wire, %u outstanding, "
-				"%u unicasts sent, %u total sent\n",
-				p_vl->p_stats->qp0_mads_outstanding_on_wire,
-				p_vl->p_stats->qp0_mads_outstanding,
-				p_vl->p_stats->qp0_unicasts_sent,
-				p_vl->p_stats->qp0_mads_sent);
+		OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
+			"%u QP0 MADs on wire, %u outstanding, "
+			"%u unicasts sent, %u total sent\n",
+			p_vl->p_stats->qp0_mads_outstanding_on_wire,
+			p_vl->p_stats->qp0_mads_outstanding,
+			p_vl->p_stats->qp0_unicasts_sent,
+			p_vl->p_stats->qp0_mads_sent);
 		return;
 	}
 
@@ -143,10 +142,8 @@ static void __osm_vl15_poller(IN void *p_ptr)
 		cl_spinlock_release(&p_vl->lock);
 
 		if (p_madw != (osm_madw_t *) cl_qlist_end(p_fifo)) {
-			if (osm_log_is_active(p_vl->p_log, OSM_LOG_DEBUG))
-				OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
-					"Servicing p_madw = %p\n", p_madw);
-
+			OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
+				"Servicing p_madw = %p\n", p_madw);
 			if (osm_log_is_active(p_vl->p_log, OSM_LOG_FRAMES))
 				osm_dump_dr_smp(p_vl->p_log,
 						osm_madw_get_smp_ptr(p_madw),
@@ -304,10 +301,8 @@ void osm_vl15_poll(IN osm_vl15_t * const p_vl)
 	 */
 	if (p_vl->p_stats->qp0_mads_outstanding_on_wire <
 	    (int32_t) p_vl->max_wire_smps) {
-		if (osm_log_is_active(p_vl->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
-				"Signalling poller thread\n");
-
+		OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
+			"Signalling poller thread\n");
 		cl_event_signal(&p_vl->signal);
 	}
 
@@ -322,9 +317,7 @@ void osm_vl15_post(IN osm_vl15_t * const p_vl, IN osm_madw_t * const p_madw)
 
 	CL_ASSERT(p_vl->state == OSM_VL15_STATE_READY);
 
-	if (osm_log_is_active(p_vl->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
-			"Posting p_madw = 0x%p\n", p_madw);
+	OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG, "Posting p_madw = 0x%p\n", p_madw);
 
 	/*
 	   Determine in which fifo to place the pending madw.
@@ -337,11 +330,10 @@ void osm_vl15_post(IN osm_vl15_t * const p_vl, IN osm_madw_t * const p_madw)
 		cl_qlist_insert_tail(&p_vl->ufifo, &p_madw->list_item);
 	cl_spinlock_release(&p_vl->lock);
 
-	if (osm_log_is_active(p_vl->p_log, OSM_LOG_DEBUG))
-		OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
-			"%u QP0 MADs on wire, %u QP0 MADs outstanding\n",
-			p_vl->p_stats->qp0_mads_outstanding_on_wire,
-			p_vl->p_stats->qp0_mads_outstanding);
+	OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
+		"%u QP0 MADs on wire, %u QP0 MADs outstanding\n",
+		p_vl->p_stats->qp0_mads_outstanding_on_wire,
+		p_vl->p_stats->qp0_mads_outstanding);
 
 	osm_vl15_poll(p_vl);
 
@@ -367,9 +359,8 @@ osm_vl15_shutdown(IN osm_vl15_t * const p_vl,
 	/* first we handle the list of response MADs */
 	p_madw = (osm_madw_t *) cl_qlist_remove_head(&p_vl->ufifo);
 	while (p_madw != (osm_madw_t *) cl_qlist_end(&p_vl->ufifo)) {
-		if (osm_log_is_active(p_vl->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
-				"Releasing Response p_madw = %p\n", p_madw);
+		OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
+			"Releasing Response p_madw = %p\n", p_madw);
 
 		osm_mad_pool_put(p_mad_pool, p_madw);
 
@@ -379,9 +370,8 @@ osm_vl15_shutdown(IN osm_vl15_t * const p_vl,
 	/* Request MADs we send out */
 	p_madw = (osm_madw_t *) cl_qlist_remove_head(&p_vl->rfifo);
 	while (p_madw != (osm_madw_t *) cl_qlist_end(&p_vl->rfifo)) {
-		if (osm_log_is_active(p_vl->p_log, OSM_LOG_DEBUG))
-			OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
-				"Releasing Request p_madw = %p\n", p_madw);
+		OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
+			"Releasing Request p_madw = %p\n", p_madw);
 
 		osm_mad_pool_put(p_mad_pool, p_madw);
 		cl_atomic_dec(&p_vl->p_stats->qp0_mads_outstanding);
diff --git a/opensm/opensm/osm_vl_arb_rcv.c b/opensm/opensm/osm_vl_arb_rcv.c
index 05d54e2..725cc3b 100644
--- a/opensm/opensm/osm_vl_arb_rcv.c
+++ b/opensm/opensm/osm_vl_arb_rcv.c
@@ -120,13 +120,11 @@ void osm_vla_rcv_process(IN void *context, IN void *data)
 	   We do not mind if this is a result of a set or get - all we want is to update
 	   the subnet.
 	 */
-	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE)) {
-		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
-			"Got GetResp(VLArb) block:%u port_num %u with GUID 0x%"
-			PRIx64 " for parent node GUID 0x%" PRIx64 ", TID 0x%"
-			PRIx64 "\n", block_num, port_num, cl_ntoh64(port_guid),
-			cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
-	}
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+		"Got GetResp(VLArb) block:%u port_num %u with GUID 0x%"
+		PRIx64 " for parent node GUID 0x%" PRIx64 ", TID 0x%"
+		PRIx64 "\n", block_num, port_num, cl_ntoh64(port_guid),
+		cl_ntoh64(node_guid), cl_ntoh64(p_smp->trans_id));
 
 	/*
 	   Determine if we encountered a new Physical Port.
-- 
1.5.5.1.178.g1f811




More information about the general mailing list