[ofa-general] [PATCH] opensm: convert to OSM_LOG() macro

Sasha Khapyorsky sashak at voltaire.com
Sat Feb 16 14:03:51 PST 2008


Convert osm_log() calls where caller function name is used to OSM_LOG()
macro call which has caller function name as builtin.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/opensm/main.c                    |   13 +-
 opensm/opensm/osm_console.c             |   37 ++---
 opensm/opensm/osm_db_files.c            |   71 ++++-----
 opensm/opensm/osm_drop_mgr.c            |   69 +++------
 opensm/opensm/osm_dump.c                |    5 +-
 opensm/opensm/osm_event_plugin.c        |    8 +-
 opensm/opensm/osm_helper.c              |    2 +-
 opensm/opensm/osm_inform.c              |  122 +++++----------
 opensm/opensm/osm_lid_mgr.c             |  118 +++++---------
 opensm/opensm/osm_lin_fwd_rcv.c         |    6 +-
 opensm/opensm/osm_link_mgr.c            |   12 +-
 opensm/opensm/osm_mad_pool.c            |   30 ++--
 opensm/opensm/osm_mcast_fwd_rcv.c       |    9 +-
 opensm/opensm/osm_mcast_mgr.c           |  120 +++++----------
 opensm/opensm/osm_multicast.c           |    6 +-
 opensm/opensm/osm_node_desc_rcv.c       |    6 +-
 opensm/opensm/osm_node_info_rcv.c       |   92 ++++-------
 opensm/opensm/osm_opensm.c              |   24 ++--
 opensm/opensm/osm_perfmgr.c             |  147 ++++++++----------
 opensm/opensm/osm_pkey.c                |   12 +-
 opensm/opensm/osm_pkey_mgr.c            |   56 +++-----
 opensm/opensm/osm_pkey_rcv.c            |    9 +-
 opensm/opensm/osm_port.c                |   37 ++---
 opensm/opensm/osm_port_info_rcv.c       |   68 +++------
 opensm/opensm/osm_prtn.c                |   18 +--
 opensm/opensm/osm_prtn_config.c         |   32 ++--
 opensm/opensm/osm_qos.c                 |    6 +-
 opensm/opensm/osm_qos_parser.y          |   30 ++---
 opensm/opensm/osm_qos_policy.c          |   28 +---
 opensm/opensm/osm_req.c                 |   14 +-
 opensm/opensm/osm_resp.c                |   11 +-
 opensm/opensm/osm_sa.c                  |   70 ++++-----
 opensm/opensm/osm_sa_class_port_info.c  |    9 +-
 opensm/opensm/osm_sa_guidinfo_record.c  |   33 ++---
 opensm/opensm/osm_sa_informinfo.c       |   91 ++++-------
 opensm/opensm/osm_sa_lft_record.c       |   39 ++---
 opensm/opensm/osm_sa_link_record.c      |   43 ++----
 opensm/opensm/osm_sa_mad_ctrl.c         |   54 ++-----
 opensm/opensm/osm_sa_mcmember_record.c  |  229 +++++++++------------------
 opensm/opensm/osm_sa_mft_record.c       |   39 ++---
 opensm/opensm/osm_sa_multipath_record.c |  123 +++++----------
 opensm/opensm/osm_sa_node_record.c      |   36 ++---
 opensm/opensm/osm_sa_path_record.c      |  151 ++++++------------
 opensm/opensm/osm_sa_pkey_record.c      |   42 ++----
 opensm/opensm/osm_sa_portinfo_record.c  |   36 ++---
 opensm/opensm/osm_sa_response.c         |    9 +-
 opensm/opensm/osm_sa_service_record.c   |   70 +++------
 opensm/opensm/osm_sa_slvl_record.c      |   36 ++---
 opensm/opensm/osm_sa_sminfo_record.c    |   42 ++----
 opensm/opensm/osm_sa_sw_info_record.c   |   42 ++----
 opensm/opensm/osm_sa_vlarb_record.c     |   40 ++----
 opensm/opensm/osm_service.c             |    6 +-
 opensm/opensm/osm_slvl_map_rcv.c        |    9 +-
 opensm/opensm/osm_sm.c                  |   39 ++---
 opensm/opensm/osm_sm_mad_ctrl.c         |   93 ++++--------
 opensm/opensm/osm_sm_state_mgr.c        |   39 ++---
 opensm/opensm/osm_sminfo_rcv.c          |   81 ++++-------
 opensm/opensm/osm_state_mgr.c           |  107 +++++--------
 opensm/opensm/osm_subnet.c              |   49 +++----
 opensm/opensm/osm_sw_info_rcv.c         |   66 +++------
 opensm/opensm/osm_sweep_fail_ctrl.c     |    3 +-
 opensm/opensm/osm_trap_rcv.c            |   78 ++++------
 opensm/opensm/osm_ucast_file.c          |   57 +++----
 opensm/opensm/osm_ucast_ftree.c         |  259 +++++++++++--------------------
 opensm/opensm/osm_ucast_lash.c          |   42 ++---
 opensm/opensm/osm_ucast_mgr.c           |   75 +++------
 opensm/opensm/osm_ucast_updn.c          |   96 ++++--------
 opensm/opensm/osm_vl15intf.c            |   29 ++--
 opensm/opensm/osm_vl_arb_rcv.c          |   12 +-
 69 files changed, 1271 insertions(+), 2321 deletions(-)

diff --git a/opensm/opensm/main.c b/opensm/opensm/main.c
index 38608be..fcc7a44 100644
--- a/opensm/opensm/main.c
+++ b/opensm/opensm/main.c
@@ -457,8 +457,7 @@ parse_ignore_guids_file(IN char *guids_file_name, IN osm_opensm_t * p_osm)
 
 	fh = fopen(guids_file_name, "r");
 	if (fh == NULL) {
-		osm_log(&p_osm->log, OSM_LOG_ERROR,
-			"parse_ignore_guids_file: ERR 0601: "
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR, "ERR 0601: "
 			"Unable to open ignore guids file (%s)\n",
 			guids_file_name);
 		status = IB_ERROR;
@@ -475,8 +474,7 @@ parse_ignore_guids_file(IN char *guids_file_name, IN osm_opensm_t * p_osm)
 			p_c++;
 		port_guid = strtoull(p_c, &p_ec, 16);
 		if (p_ec == p_c) {
-			osm_log(&p_osm->log, OSM_LOG_ERROR,
-				"parse_ignore_guids_file: ERR 0602: "
+			OSM_LOG(&p_osm->log, OSM_LOG_ERROR, "ERR 0602: "
 				"Error in line (%u): %s\n", line_num, line);
 			status = IB_ERROR;
 			goto Exit;
@@ -485,8 +483,7 @@ parse_ignore_guids_file(IN char *guids_file_name, IN osm_opensm_t * p_osm)
 		while ((*p_ec == ' ') && (*p_ec != '\0'))
 			p_ec++;
 		if (!sscanf(p_ec, "%d", &port_num)) {
-			osm_log(&p_osm->log, OSM_LOG_ERROR,
-				"parse_ignore_guids_file: ERR 0603: "
+			OSM_LOG(&p_osm->log, OSM_LOG_ERROR, "ERR 0603: "
 				"Error in line (%u): %s\n", line_num, p_ec);
 			status = IB_ERROR;
 			goto Exit;
@@ -495,8 +492,8 @@ parse_ignore_guids_file(IN char *guids_file_name, IN osm_opensm_t * p_osm)
 		/* ok insert it */
 		osm_port_prof_set_ignored_port(&p_osm->subn,
 					       cl_hton64(port_guid), port_num);
-		osm_log(&p_osm->log, OSM_LOG_DEBUG,
-			"parse_ignore_guids_file: " "Inserted Port: 0x%" PRIx64
+		OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
+			"Inserted Port: 0x%" PRIx64
 			" PortNum: 0x%X into ignored guids list\n", port_guid,
 			port_num);
 
diff --git a/opensm/opensm/osm_console.c b/opensm/opensm/osm_console.c
index 7ffe9bb..7b1f87c 100644
--- a/opensm/opensm/osm_console.c
+++ b/opensm/opensm/osm_console.c
@@ -815,8 +815,8 @@ static void osm_console_close(osm_opensm_t * p_osm)
 {
 #ifdef ENABLE_OSM_CONSOLE_SOCKET
 	if ((p_osm->console.socket > 0) && (p_osm->console.in_fd != -1)) {
-		osm_log(&(p_osm->log), OSM_LOG_INFO,
-			"cio_close: Console connection closed: %s (%s)\n",
+		OSM_LOG(&(p_osm->log), OSM_LOG_INFO,
+			"Console connection closed: %s (%s)\n",
 			p_osm->console.client_hn, p_osm->console.client_ip);
 		cio_close(&p_osm->console);
 	}
@@ -942,8 +942,8 @@ void osm_console_init(osm_subn_opt_t * opt, osm_opensm_t * p_osm)
 		int optval = 1;
 
 		if ((p_oct->socket = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
-			osm_log(&(p_osm->log), OSM_LOG_ERROR,
-				"osm_console_init: ERR 4B01: Failed to open console socket: %s\n",
+			OSM_LOG(&(p_osm->log), OSM_LOG_ERROR,
+				"ERR 4B01: Failed to open console socket: %s\n",
 				strerror(errno));
 			return;
 		}
@@ -956,14 +956,14 @@ void osm_console_init(osm_subn_opt_t * opt, osm_opensm_t * p_osm)
 		else
 			sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
 		if (bind(p_oct->socket, &sin, sizeof(sin)) < 0) {
-			osm_log(&(p_osm->log), OSM_LOG_ERROR,
-				"osm_console_init: ERR 4B02: Failed to bind console socket: %s\n",
+			OSM_LOG(&(p_osm->log), OSM_LOG_ERROR,
+				"ERR 4B02: Failed to bind console socket: %s\n",
 				strerror(errno));
 			return;
 		}
 		if (listen(p_oct->socket, 1) < 0) {
-			osm_log(&(p_osm->log), OSM_LOG_ERROR,
-				"osm_console_init: ERR 4B03: Failed to listen on socket: %s\n",
+			OSM_LOG(&(p_osm->log), OSM_LOG_ERROR,
+				"ERR 4B03: Failed to listen on socket: %s\n",
 				strerror(errno));
 			return;
 		}
@@ -973,9 +973,8 @@ void osm_console_init(osm_subn_opt_t * opt, osm_opensm_t * p_osm)
 		p_oct->out = NULL;
 		p_oct->in_fd = -1;
 		p_oct->out_fd = -1;
-		osm_log(&(p_osm->log), OSM_LOG_INFO,
-			"osm_console_init: Console listening on port %d\n",
-			opt->console_port);
+		OSM_LOG(&(p_osm->log), OSM_LOG_INFO,
+			"Console listening on port %d\n", opt->console_port);
 #endif
 	}
 }
@@ -1007,8 +1006,8 @@ static int cio_open(osm_opensm_t * p_osm, int new_fd)
 		if (n > 0 && (p_line[0] == 'y' || p_line[0] == 'Y')) {
 			osm_console_close(p_osm);
 		} else {
-			osm_log(&(p_osm->log), OSM_LOG_INFO,
-				"cio_open: Console connection aborted: %s (%s)\n",
+			OSM_LOG(&(p_osm->log), OSM_LOG_INFO,
+				"Console connection aborted: %s (%s)\n",
 				p_oct->client_hn, p_oct->client_ip);
 			close(new_fd);
 			return -1;
@@ -1019,8 +1018,8 @@ static int cio_open(osm_opensm_t * p_osm, int new_fd)
 	p_oct->in = fdopen(p_oct->in_fd, "w+");
 	p_oct->out = p_oct->in;
 	osm_console_prompt(p_oct->out);
-	osm_log(&(p_osm->log), OSM_LOG_INFO,
-		"cio_open: Console connection accepted: %s (%s)\n",
+	OSM_LOG(&(p_osm->log), OSM_LOG_INFO,
+		"Console connection accepted: %s (%s)\n",
 		p_oct->client_hn, p_oct->client_ip);
 
 	return (p_oct->in == NULL) ? -1 : 0;
@@ -1068,8 +1067,8 @@ void osm_console(osm_opensm_t * p_osm)
 		socklen_t len = sizeof(sin);
 		struct hostent *hent;
 		if ((new_fd = accept(p_oct->socket, &sin, &len)) < 0) {
-			osm_log(&(p_osm->log), OSM_LOG_ERROR,
-				"osm_console: ERR 4B04: Failed to accept console socket: %s\n",
+			OSM_LOG(&(p_osm->log), OSM_LOG_ERROR,
+				"ERR 4B04: Failed to accept console socket: %s\n",
 				strerror(errno));
 			p_oct->in_fd = -1;
 			return;
@@ -1089,8 +1088,8 @@ void osm_console(osm_opensm_t * p_osm)
 		if (is_authorized(&p_osm->console)) {
 			cio_open(p_osm, new_fd);
 		} else {
-			osm_log(&(p_osm->log), OSM_LOG_ERROR,
-				"osm_console: ERR 4B05: Console connection denied: %s (%s)\n",
+			OSM_LOG(&(p_osm->log), OSM_LOG_ERROR,
+				"ERR 4B05: Console connection denied: %s (%s)\n",
 				p_oct->client_hn, p_oct->client_ip);
 			close(new_fd);
 		}
diff --git a/opensm/opensm/osm_db_files.c b/opensm/opensm/osm_db_files.c
index e4a1d72..ce61980 100644
--- a/opensm/opensm/osm_db_files.c
+++ b/opensm/opensm/osm_db_files.c
@@ -182,9 +182,8 @@ int osm_db_init(IN osm_db_t * const p_db, IN osm_log_t * p_log)
 	/* make sure the directory exists */
 	if (lstat(p_db_imp->db_dir_name, &dstat)) {
 		if (mkdir(p_db_imp->db_dir_name, 0755)) {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osm_db_init: ERR 6101: "
-				" Failed to create the db directory:%s\n",
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6101: "
+				"Failed to create the db directory:%s\n",
 				p_db_imp->db_dir_name);
 			OSM_LOG_EXIT(p_log);
 			return 1;
@@ -237,9 +236,8 @@ osm_db_domain_t *osm_db_domain_init(IN osm_db_t * const p_db,
 	/* make sure the file exists - or exit if not writable */
 	p_file = fopen(p_domain_imp->file_name, "a+");
 	if (!p_file) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_db_domain_init: ERR 6102: "
-			" Failed to open the db file:%s\n",
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6102: "
+			"Failed to open the db file:%s\n",
 			p_domain_imp->file_name);
 		free(p_domain_imp);
 		free(p_domain);
@@ -290,9 +288,8 @@ int osm_db_restore(IN osm_db_domain_t * p_domain)
 	p_file = fopen(p_domain_imp->file_name, "r");
 
 	if (!p_file) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_db_restore: ERR 6103: "
-			" Failed to open the db file:%s\n",
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6103: "
+			"Failed to open the db file:%s\n",
 			p_domain_imp->file_name);
 		status = 1;
 		goto Exit;
@@ -326,18 +323,16 @@ int osm_db_restore(IN osm_db_domain_t * p_domain)
 				p_first_word =
 				    strtok_r(sLine, " \t\n", &p_last);
 				if (!p_first_word) {
-					osm_log(p_log, OSM_LOG_ERROR,
-						"osm_db_restore: ERR 6104: "
-						" Failed to get key from line:%u : %s (file:%s)\n",
+					OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6104: "
+						"Failed to get key from line:%u : %s (file:%s)\n",
 						line_num, sLine,
 						p_domain_imp->file_name);
 					status = 1;
 					goto EndParsing;
 				}
 				if (strlen(p_first_word) > OSM_DB_MAX_GUID_LEN) {
-					osm_log(p_log, OSM_LOG_ERROR,
-						"osm_db_restore: ERR 610A: "
-						" Illegal key from line:%u : %s (file:%s)\n",
+					OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 610A: "
+						"Illegal key from line:%u : %s (file:%s)\n",
 						line_num, sLine,
 						p_domain_imp->file_name);
 					status = 1;
@@ -362,9 +357,8 @@ int osm_db_restore(IN osm_db_domain_t * p_domain)
 					strcpy(p_accum_val, "\0");
 				}
 			} else if (sLine[0] != '\n') {
-				osm_log(p_log, OSM_LOG_ERROR,
-					"osm_db_restore: ERR 6105: "
-					" How did we get here? line:%u : %s (file:%s)\n",
+				OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6105: "
+					"How did we get here? line:%u : %s (file:%s)\n",
 					line_num, sLine,
 					p_domain_imp->file_name);
 				status = 1;
@@ -382,9 +376,8 @@ int osm_db_restore(IN osm_db_domain_t * p_domain)
 				if (st_lookup(p_domain_imp->p_hash,
 					      (st_data_t) p_key,
 					      (st_data_t *) & p_prev_val)) {
-					osm_log(p_log, OSM_LOG_ERROR,
-						"osm_db_restore: ERR 6106: "
-						" Key:%s already exists in:%s with value:%s."
+					OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6106: "
+						"Key:%s already exists in:%s with value:%s."
 						" Removing it\n",
 						p_key,
 						p_domain_imp->file_name,
@@ -393,16 +386,14 @@ int osm_db_restore(IN osm_db_domain_t * p_domain)
 					p_prev_val = NULL;
 				}
 
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"osm_db_restore: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Got key:%s value:%s\n", p_key,
 					p_accum_val);
 
 				/* check that the key is a number */
 				if (!strtouq(p_key, &endptr, 0)
 				    && *endptr != '\0') {
-					osm_log(p_log, OSM_LOG_ERROR,
-						"osm_db_restore: ERR 610B: "
+					OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 610B: "
 						"Key:%s is invalid\n", p_key);
 				} else {
 					/* store our key and value */
@@ -466,9 +457,8 @@ int osm_db_store(IN osm_db_domain_t * p_domain)
 	/* open up the output file */
 	p_file = fopen(p_tmp_file_name, "w");
 	if (!p_file) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_db_store: ERR 6107: "
-			" Failed to open the db file:%s for writing\n",
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6107: "
+			"Failed to open the db file:%s for writing\n",
 			p_domain_imp->file_name);
 		status = 1;
 		goto Exit;
@@ -481,17 +471,15 @@ int osm_db_store(IN osm_db_domain_t * p_domain)
 	/* move the domain file */
 	status = remove(p_domain_imp->file_name);
 	if (status) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_db_store: ERR 6109: "
-			" Failed to remove file:%s (err:%u)\n",
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6109: "
+			"Failed to remove file:%s (err:%u)\n",
 			p_domain_imp->file_name, status);
 	}
 
 	status = rename(p_tmp_file_name, p_domain_imp->file_name);
 	if (status) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_db_store: ERR 6108: "
-			" Failed to rename the db file to:%s (err:%u)\n",
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6108: "
+			"Failed to rename the db file to:%s (err:%u)\n",
 			p_domain_imp->file_name, status);
 	}
 Exit:
@@ -586,9 +574,8 @@ osm_db_update(IN osm_db_domain_t * p_domain,
 
 	if (st_lookup(p_domain_imp->p_hash,
 		      (st_data_t) p_key, (st_data_t *) & p_prev_val)) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"osm_db_update: "
-			" Key:%s previously exists in:%s with value:%s\n",
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
+			"Key:%s previously exists in:%s with value:%s\n",
 			p_key, p_domain_imp->file_name, p_prev_val);
 		p_new_key = p_key;
 	} else {
@@ -629,9 +616,8 @@ int osm_db_delete(IN osm_db_domain_t * p_domain, IN char *const p_key)
 		      (st_data_t *) & p_key, (st_data_t *) & p_prev_val)) {
 		if (st_lookup(p_domain_imp->p_hash,
 			      (st_data_t) p_key, (st_data_t *) & p_prev_val)) {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osm_db_delete: "
-				" key:%s still exists in:%s with value:%s\n",
+			OSM_LOG(p_log, OSM_LOG_ERROR,
+				"key:%s still exists in:%s with value:%s\n",
 				p_key, p_domain_imp->file_name, p_prev_val);
 			res = 1;
 		} else {
@@ -640,9 +626,8 @@ int osm_db_delete(IN osm_db_domain_t * p_domain, IN char *const p_key)
 			res = 0;
 		}
 	} else {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"osm_db_update: "
-			" fail to find key:%s. delete failed\n", p_key);
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
+			"fail to find key:%s. delete failed\n", p_key);
 		res = 1;
 	}
 	cl_spinlock_release(&p_domain_imp->lock);
diff --git a/opensm/opensm/osm_drop_mgr.c b/opensm/opensm/osm_drop_mgr.c
index 785e9ec..f9b0b00 100644
--- a/opensm/opensm/osm_drop_mgr.c
+++ b/opensm/opensm/osm_drop_mgr.c
@@ -77,8 +77,7 @@ __osm_drop_mgr_remove_router(osm_sm_t * sm, IN const ib_net64_t portguid)
 	p_rtr_guid_tbl = &sm->p_subn->rtr_guid_tbl;
 	p_rtr = (osm_router_t *) cl_qmap_remove(p_rtr_guid_tbl, portguid);
 	if (p_rtr != (osm_router_t *) cl_qmap_end(p_rtr_guid_tbl)) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_drop_mgr_remove_router: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Cleaned router for port guid 0x%016" PRIx64 "\n",
 			cl_ntoh64(portguid));
 		osm_router_delete(&p_rtr);
@@ -106,8 +105,7 @@ static void drop_mgr_clean_physp(osm_sm_t * sm, IN osm_physp_t * p_physp)
 			if (p_remote_port->discovery_count &&
 			    osm_physp_get_port_state(p_remote_physp) ==
 			    IB_LINK_ACTIVE) {
-				osm_log(sm->p_log, OSM_LOG_VERBOSE,
-					"drop_mgr_clean_physp: "
+				OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 					"Forcing new heavy sweep. Remote "
 					"port 0x%016" PRIx64 " port num: 0x%X "
 					"was recognized in ACTIVE state\n",
@@ -121,8 +119,8 @@ static void drop_mgr_clean_physp(osm_sm_t * sm, IN osm_physp_t * p_physp)
 			   discovery count of the remote port. */
 			if (!p_remote_physp->p_node->sw) {
 				p_remote_port->discovery_count = 0;
-				osm_log(sm->p_log, OSM_LOG_DEBUG,
-					"drop_mgr_clean_physp: Resetting discovery count of node: "
+				OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+					"Resetting discovery count of node: "
 					"0x%016" PRIx64 " port num:0x%X\n",
 					cl_ntoh64(osm_node_get_node_guid
 						  (p_remote_physp->p_node)),
@@ -130,8 +128,7 @@ static void drop_mgr_clean_physp(osm_sm_t * sm, IN osm_physp_t * p_physp)
 			}
 		}
 
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"drop_mgr_clean_physp: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Unlinking local node 0x%016" PRIx64 ", port 0x%X"
 			"\n\t\t\t\tand remote node 0x%016" PRIx64
 			", port 0x%X\n",
@@ -145,9 +142,8 @@ static void drop_mgr_clean_physp(osm_sm_t * sm, IN osm_physp_t * p_physp)
 
 	}
 
-	osm_log(sm->p_log, OSM_LOG_DEBUG,
-		"drop_mgr_clean_physp: Clearing node 0x%016" PRIx64
-		" physical port number 0x%X\n",
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Clearing node 0x%016" PRIx64 " physical port number 0x%X\n",
 		cl_ntoh64(osm_node_get_node_guid(p_physp->p_node)),
 		p_physp->port_num);
 
@@ -176,16 +172,14 @@ static void __osm_drop_mgr_remove_port(osm_sm_t * sm, IN osm_port_t * p_port)
 	OSM_LOG_ENTER(sm->p_log);
 
 	port_guid = osm_port_get_guid(p_port);
-	osm_log(sm->p_log, OSM_LOG_VERBOSE,
-		"__osm_drop_mgr_remove_port: "
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 		"Unreachable port 0x%016" PRIx64 "\n", cl_ntoh64(port_guid));
 
 	p_port_check =
 	    (osm_port_t *) cl_qmap_remove(&sm->p_subn->port_guid_tbl,
 					  port_guid);
 	if (p_port_check != p_port) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_drop_mgr_remove_port: ERR 0101: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0101: "
 			"Port 0x%016" PRIx64 " not in guid table\n",
 			cl_ntoh64(port_guid));
 		goto Exit;
@@ -195,8 +189,7 @@ static void __osm_drop_mgr_remove_port(osm_sm_t * sm, IN osm_port_t * p_port)
 	p_sm = (osm_remote_sm_t *) cl_qmap_remove(p_sm_guid_tbl, port_guid);
 	if (p_sm != (osm_remote_sm_t *) cl_qmap_end(p_sm_guid_tbl)) {
 		/* need to remove this item */
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_drop_mgr_remove_port: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Cleaned SM for port guid\n");
 
 		free(p_sm);
@@ -206,8 +199,7 @@ static void __osm_drop_mgr_remove_port(osm_sm_t * sm, IN osm_port_t * p_port)
 
 	osm_port_get_lid_range_ho(p_port, &min_lid_ho, &max_lid_ho);
 
-	osm_log(sm->p_log, OSM_LOG_VERBOSE,
-		"__osm_drop_mgr_remove_port: "
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 		"Clearing abandoned LID range [0x%X,0x%X]\n",
 		min_lid_ho, max_lid_ho);
 
@@ -260,16 +252,14 @@ static void __osm_drop_mgr_remove_port(osm_sm_t * sm, IN osm_port_t * p_port)
 
 	status = osm_report_notice(sm->p_log, sm->p_subn, &notice);
 	if (status != IB_SUCCESS) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_drop_mgr_remove_port: ERR 0103: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0103: "
 			"Error sending trap reports (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
 	}
 
 	if (osm_log_is_active(sm->p_log, OSM_LOG_INFO)) {
-		osm_log(sm->p_log, OSM_LOG_INFO,
-			"__osm_drop_mgr_remove_port: "
+		OSM_LOG(sm->p_log, OSM_LOG_INFO,
 			"Removed port with GUID:0x%016" PRIx64
 			" LID range [0x%X,0x%X] of node:%s\n",
 			cl_ntoh64(port_gid.unicast.interface_id),
@@ -296,8 +286,7 @@ static void __osm_drop_mgr_remove_switch(osm_sm_t * sm, IN osm_node_t * p_node)
 
 	p_sw = (osm_switch_t *) cl_qmap_remove(p_sw_guid_tbl, node_guid);
 	if (p_sw == (osm_switch_t *) cl_qmap_end(p_sw_guid_tbl)) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_drop_mgr_remove_switch: ERR 0102: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0102: "
 			"Node 0x%016" PRIx64 " not in switch table\n",
 			cl_ntoh64(osm_node_get_node_guid(p_node)));
 	} else {
@@ -323,8 +312,7 @@ __osm_drop_mgr_process_node(osm_sm_t * sm, IN osm_node_t * p_node)
 
 	OSM_LOG_ENTER(sm->p_log);
 
-	osm_log(sm->p_log, OSM_LOG_VERBOSE,
-		"__osm_drop_mgr_process_node: "
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 		"Unreachable node 0x%016" PRIx64 "\n",
 		cl_ntoh64(osm_node_get_node_guid(p_node)));
 
@@ -356,8 +344,7 @@ __osm_drop_mgr_process_node(osm_sm_t * sm, IN osm_node_t * p_node)
 	    (osm_node_t *) cl_qmap_remove(&sm->p_subn->node_guid_tbl,
 					  osm_node_get_node_guid(p_node));
 	if (p_node_check != p_node) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_drop_mgr_process_node: ERR 0105: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0105: "
 			"Node 0x%016" PRIx64 " not in guid table\n",
 			cl_ntoh64(osm_node_get_node_guid(p_node)));
 	}
@@ -383,8 +370,7 @@ static void __osm_drop_mgr_check_node(osm_sm_t * sm, IN osm_node_t * p_node)
 	node_guid = osm_node_get_node_guid(p_node);
 
 	if (osm_node_get_type(p_node) != IB_NODE_TYPE_SWITCH) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_drop_mgr_check_node: ERR 0107: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0107: "
 			"Node 0x%016" PRIx64 " is not a switch node\n",
 			cl_ntoh64(node_guid));
 		goto Exit;
@@ -393,8 +379,7 @@ static void __osm_drop_mgr_check_node(osm_sm_t * sm, IN osm_node_t * p_node)
 	/* Make sure we have a switch object for this node */
 	if (!p_node->sw) {
 		/* We do not have switch info for this node */
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_drop_mgr_check_node: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Node 0x%016" PRIx64 " no switch in table\n",
 			cl_ntoh64(node_guid));
 
@@ -405,8 +390,7 @@ static void __osm_drop_mgr_check_node(osm_sm_t * sm, IN osm_node_t * p_node)
 	/* Make sure we have a port object for port zero */
 	p_physp = osm_node_get_physp_ptr(p_node, 0);
 	if (!p_physp) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_drop_mgr_check_node: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Node 0x%016" PRIx64 " no valid physical port 0\n",
 			cl_ntoh64(node_guid));
 
@@ -419,8 +403,7 @@ static void __osm_drop_mgr_check_node(osm_sm_t * sm, IN osm_node_t * p_node)
 	p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 
 	if (!p_port) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_drop_mgr_check_node: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Node 0x%016" PRIx64 " has no port object\n",
 			cl_ntoh64(node_guid));
 
@@ -429,8 +412,7 @@ static void __osm_drop_mgr_check_node(osm_sm_t * sm, IN osm_node_t * p_node)
 	}
 
 	if (p_port->discovery_count == 0) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_drop_mgr_check_node: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Node 0x%016" PRIx64 " port has discovery count zero\n",
 			cl_ntoh64(node_guid));
 
@@ -476,8 +458,7 @@ void osm_drop_mgr_process(osm_sm_t * sm)
 
 		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,
-				"osm_drop_mgr_process: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Checking node 0x%016" PRIx64 "\n",
 				cl_ntoh64(node_guid));
 		}
@@ -506,8 +487,7 @@ void osm_drop_mgr_process(osm_sm_t * sm)
 
 		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,
-				"osm_drop_mgr_process: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Checking full discovery of node 0x%016" PRIx64
 				"\n", cl_ntoh64(node_guid));
 		}
@@ -530,8 +510,7 @@ void osm_drop_mgr_process(osm_sm_t * sm)
 
 		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,
-				"osm_drop_mgr_process: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Checking port 0x%016" PRIx64 "\n",
 				cl_ntoh64(port_guid));
 		}
diff --git a/opensm/opensm/osm_dump.c b/opensm/opensm/osm_dump.c
index f47c992..9f638b3 100644
--- a/opensm/opensm/osm_dump.c
+++ b/opensm/opensm/osm_dump.c
@@ -493,7 +493,7 @@ static void print_node_report(cl_map_item_t * p_map_item, void *cxt)
 	uint8_t node_type;
 
 	if (osm_log_is_active(log, OSM_LOG_DEBUG))
-		osm_log(log, OSM_LOG_DEBUG, "__osm_state_mgr_report: "
+		OSM_LOG(log, OSM_LOG_DEBUG,
 			"Processing node 0x%016" PRIx64 "\n",
 			cl_ntoh64(osm_node_get_node_guid(p_node)));
 
@@ -609,8 +609,7 @@ static void dump_qmap_to_file(osm_opensm_t * p_osm, const char *file_name,
 
 	file = fopen(path, "w");
 	if (!file) {
-		osm_log(&p_osm->log, OSM_LOG_ERROR,
-			"dump_qmap_to_file: "
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
 			"cannot create file \'%s\': %s\n",
 			path, strerror(errno));
 		return;
diff --git a/opensm/opensm/osm_event_plugin.c b/opensm/opensm/osm_event_plugin.c
index a49cea4..42282c6 100644
--- a/opensm/opensm/osm_event_plugin.c
+++ b/opensm/opensm/osm_event_plugin.c
@@ -76,7 +76,7 @@ osm_epi_plugin_t *osm_epi_construct(osm_log_t * p_log, char *plugin_name)
 
 	rc->handle = dlopen(lib_name, RTLD_LAZY);
 	if (!rc->handle) {
-		osm_log(p_log, OSM_LOG_ERROR,
+		OSM_LOG(p_log, OSM_LOG_ERROR,
 			"Failed to open event plugin \"%s\" : \"%s\"\n",
 			lib_name, dlerror());
 		goto DLOPENFAIL;
@@ -86,7 +86,7 @@ osm_epi_plugin_t *osm_epi_construct(osm_log_t * p_log, char *plugin_name)
 	    (osm_event_plugin_t *) dlsym(rc->handle,
 					 OSM_EVENT_PLUGIN_IMPL_NAME);
 	if (!rc->impl) {
-		osm_log(p_log, OSM_LOG_ERROR,
+		OSM_LOG(p_log, OSM_LOG_ERROR,
 			"Failed to find \"%s\" symbol in \"%s\" : \"%s\"\n",
 			OSM_EVENT_PLUGIN_IMPL_NAME, lib_name, dlerror());
 		goto Exit;
@@ -94,7 +94,7 @@ osm_epi_plugin_t *osm_epi_construct(osm_log_t * p_log, char *plugin_name)
 
 	/* Check the version to make sure this module will work with us */
 	if (rc->impl->interface_version != OSM_EVENT_PLUGIN_INTERFACE_VER) {
-		osm_log(p_log, OSM_LOG_ERROR,
+		OSM_LOG(p_log, OSM_LOG_ERROR,
 			"Error opening %s: "
 			"%s symbol is the wrong version %d != %d\n",
 			plugin_name,
@@ -105,7 +105,7 @@ osm_epi_plugin_t *osm_epi_construct(osm_log_t * p_log, char *plugin_name)
 	}
 
 	if (!rc->impl->construct) {
-		osm_log(p_log, OSM_LOG_ERROR,
+		OSM_LOG(p_log, OSM_LOG_ERROR,
 			"%s symbol has no construct function\n",
 			OSM_EVENT_PLUGIN_IMPL_NAME);
 		goto Exit;
diff --git a/opensm/opensm/osm_helper.c b/opensm/opensm/osm_helper.c
index b4718cf..aa0a9ea 100644
--- a/opensm/opensm/osm_helper.c
+++ b/opensm/opensm/osm_helper.c
@@ -1942,7 +1942,7 @@ osm_dump_sa_mad(IN osm_log_t * const p_log,
 
 	/* make sure the mad is valid */
 	if (p_mad == NULL) {
-		osm_log(p_log, log_level, "NULL MAD POINTER\n");
+		OSM_LOG(p_log, log_level, "NULL MAD POINTER\n");
 		return;
 	}
 
diff --git a/opensm/opensm/osm_inform.c b/opensm/opensm/osm_inform.c
index 655cf5c..9409a04 100644
--- a/opensm/opensm/osm_inform.c
+++ b/opensm/opensm/osm_inform.c
@@ -122,8 +122,7 @@ __match_inf_rec(IN const cl_list_item_t * const p_list_item, IN void *context)
 
 	if (memcmp(&p_infr->report_addr,
 		   &p_infr_rec->report_addr, sizeof(p_infr_rec->report_addr))) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"__match_inf_rec: " "Differ by Address\n");
+		OSM_LOG(p_log, OSM_LOG_DEBUG, "Differ by Address\n");
 		goto Exit;
 	}
 
@@ -136,8 +135,7 @@ __match_inf_rec(IN const cl_list_item_t * const p_list_item, IN void *context)
 		if (memcmp(&p_infr->inform_record.inform_info.gid,
 			   &p_infr_rec->inform_record.inform_info.gid,
 			   sizeof(p_infr->inform_record.inform_info.gid))) {
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Differ by InformInfo.gid\n");
 			goto Exit;
 		}
@@ -146,8 +144,7 @@ __match_inf_rec(IN const cl_list_item_t * const p_list_item, IN void *context)
 		     p_infr_rec->inform_record.inform_info.lid_range_begin) ||
 		    (p_infr->inform_record.inform_info.lid_range_end !=
 		     p_infr_rec->inform_record.inform_info.lid_range_end)) {
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Differ by InformInfo.LIDRange\n");
 			goto Exit;
 		}
@@ -155,15 +152,15 @@ __match_inf_rec(IN const cl_list_item_t * const p_list_item, IN void *context)
 
 	if (p_infr->inform_record.inform_info.trap_type !=
 	    p_infr_rec->inform_record.inform_info.trap_type) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"__match_inf_rec: " "Differ by InformInfo.TrapType\n");
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
+			"Differ by InformInfo.TrapType\n");
 		goto Exit;
 	}
 
 	if (p_infr->inform_record.inform_info.is_generic !=
 	    p_infr_rec->inform_record.inform_info.is_generic) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"__match_inf_rec: " "Differ by InformInfo.IsGeneric\n");
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
+			"Differ by InformInfo.IsGeneric\n");
 		goto Exit;
 	}
 
@@ -171,58 +168,50 @@ __match_inf_rec(IN const cl_list_item_t * const p_list_item, IN void *context)
 		if (p_infr->inform_record.inform_info.g_or_v.generic.trap_num !=
 		    p_infr_rec->inform_record.inform_info.g_or_v.generic.
 		    trap_num)
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Differ by InformInfo.Generic.TrapNumber\n");
 		else if (p_infr->inform_record.inform_info.g_or_v.generic.
 			 qpn_resp_time_val !=
 			 p_infr_rec->inform_record.inform_info.g_or_v.generic.
 			 qpn_resp_time_val)
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Differ by InformInfo.Generic.QPNRespTimeVal\n");
 		else if (p_infr->inform_record.inform_info.g_or_v.generic.
 			 node_type_msb !=
 			 p_infr_rec->inform_record.inform_info.g_or_v.generic.
 			 node_type_msb)
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Differ by InformInfo.Generic.NodeTypeMSB\n");
 		else if (p_infr->inform_record.inform_info.g_or_v.generic.
 			 node_type_lsb !=
 			 p_infr_rec->inform_record.inform_info.g_or_v.generic.
 			 node_type_lsb)
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Differ by InformInfo.Generic.NodeTypeLSB\n");
 		else
 			status = CL_SUCCESS;
 	} else {
 		if (p_infr->inform_record.inform_info.g_or_v.vend.dev_id !=
 		    p_infr_rec->inform_record.inform_info.g_or_v.vend.dev_id)
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Differ by InformInfo.Vendor.DeviceID\n");
 		else if (p_infr->inform_record.inform_info.g_or_v.vend.
 			 qpn_resp_time_val !=
 			 p_infr_rec->inform_record.inform_info.g_or_v.vend.
 			 qpn_resp_time_val)
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Differ by InformInfo.Vendor.QPNRespTimeVal\n");
 		else if (p_infr->inform_record.inform_info.g_or_v.vend.
 			 vendor_id_msb !=
 			 p_infr_rec->inform_record.inform_info.g_or_v.vend.
 			 vendor_id_msb)
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Differ by InformInfo.Vendor.VendorIdMSB\n");
 		else if (p_infr->inform_record.inform_info.g_or_v.vend.
 			 vendor_id_lsb !=
 			 p_infr_rec->inform_record.inform_info.g_or_v.vend.
 			 vendor_id_lsb)
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Differ by InformInfo.Vendor.VendorIdLSB\n");
 		else
 			status = CL_SUCCESS;
@@ -245,13 +234,10 @@ osm_infr_t *osm_infr_get_by_rec(IN osm_subn_t const *p_subn,
 
 	dump_all_informs(p_subn, p_log);
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osm_infr_get_by_rec: " "Looking for Inform Record\n");
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "Looking for Inform Record\n");
 	osm_dump_inform_info(p_log, &(p_infr_rec->inform_record.inform_info),
 			     OSM_LOG_DEBUG);
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osm_infr_get_by_rec: "
-		"InformInfo list size %d\n",
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "InformInfo list size %d\n",
 		cl_qlist_count(&p_subn->sa_infr_list));
 
 	p_list_item = cl_qlist_find_from_head(&p_subn->sa_infr_list,
@@ -272,11 +258,9 @@ osm_infr_insert_to_db(IN osm_subn_t * p_subn,
 {
 	OSM_LOG_ENTER(p_log);
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osm_infr_insert_to_db: "
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
 		"Inserting new InformInfo Record into Database\n");
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osm_infr_insert_to_db: "
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
 		"Dump before insertion (size %d)\n",
 		cl_qlist_count(&p_subn->sa_infr_list));
 	dump_all_informs(p_subn, p_log);
@@ -289,8 +273,7 @@ osm_infr_insert_to_db(IN osm_subn_t * p_subn,
 
 	cl_qlist_insert_head(&p_subn->sa_infr_list, &p_infr->list_item);
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osm_infr_insert_to_db: "
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
 		"Dump after insertion (size %d)\n",
 		cl_qlist_count(&p_subn->sa_infr_list));
 	dump_all_informs(p_subn, p_log);
@@ -305,8 +288,7 @@ osm_infr_remove_from_db(IN osm_subn_t * p_subn,
 {
 	OSM_LOG_ENTER(p_log);
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osm_infr_remove_from_db: "
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
 		"Removing InformInfo Subscribing GID:0x%016" PRIx64 " : 0x%016"
 		PRIx64 " Enum:0x%X from Database\n",
 		cl_ntoh64(p_infr->inform_record.subscriber_gid.unicast.prefix),
@@ -345,8 +327,7 @@ static ib_api_status_t __osm_send_report(IN osm_infr_t * p_infr_rec,	/* the info
 	/* HACK: who switches or uses the src and dest GIDs in the grh_info ?? */
 
 	/* it is better to use LIDs since the GIDs might not be there for SMI traps */
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"__osm_send_report: "
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
 		"Forwarding Notice Event from LID:0x%X"
 		" to InformInfo LID: 0x%X TID:0x%X\n",
 		cl_ntoh16(p_ntc->issuer_lid),
@@ -361,8 +342,7 @@ static ib_api_status_t __osm_send_report(IN osm_infr_t * p_infr_rec,	/* the info
 	p_report_madw->resp_expected = TRUE;
 
 	if (!p_report_madw) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"__osm_send_report: ERR 0203: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0203"
 			"osm_mad_pool_get failed\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -388,8 +368,7 @@ static ib_api_status_t __osm_send_report(IN osm_infr_t * p_infr_rec,	/* the info
 	status = osm_sa_vendor_send(p_report_madw->h_bind, p_report_madw, TRUE,
 				    p_infr_rec->sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"__osm_send_report: ERR 0204: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0204: "
 			"osm_sa_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -442,9 +421,7 @@ __match_notice_to_inf_rec(IN cl_list_item_t * const p_list_item,
 		/* match by GID */
 		if (memcmp
 		    (&(p_ii->gid), &(p_ntc->issuer_gid), sizeof(ib_gid_t))) {
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_notice_to_inf_rec: "
-				"Mismatch by GID\n");
+			OSM_LOG(p_log, OSM_LOG_DEBUG, "Mismatch by GID\n");
 			goto Exit;
 		}
 	} else {
@@ -456,8 +433,7 @@ __match_notice_to_inf_rec(IN cl_list_item_t * const p_list_item,
 			     cl_hton16(p_ntc->issuer_lid))
 			    || (cl_hton16(p_ntc->issuer_lid) >
 				cl_hton16(p_ii->lid_range_end))) {
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"__match_notice_to_inf_rec: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Mismatch by LID Range. Needed: 0x%X <= 0x%X <= 0x%X\n",
 					cl_hton16(p_ii->lid_range_begin),
 					cl_hton16(p_ntc->issuer_lid),
@@ -471,17 +447,14 @@ __match_notice_to_inf_rec(IN cl_list_item_t * const p_list_item,
 	/* IsGeneric    IsGeneric    is compulsory and must match the trap  */
 	if ((p_ii->is_generic && !ib_notice_is_generic(p_ntc)) ||
 	    (!p_ii->is_generic && ib_notice_is_generic(p_ntc))) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"__match_notice_to_inf_rec: "
-			"Mismatch by Generic/Vendor\n");
+		OSM_LOG(p_log, OSM_LOG_DEBUG, "Mismatch by Generic/Vendor\n");
 		goto Exit;
 	}
 
 	/* Type         Type         if not 0xFFFF must match */
 	if ((p_ii->trap_type != 0xFFFF) &&
 	    (cl_ntoh16(p_ii->trap_type) != ib_notice_get_type(p_ntc))) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"__match_notice_to_inf_rec: " "Mismatch by Type\n");
+		OSM_LOG(p_log, OSM_LOG_DEBUG, "Mismatch by Type\n");
 		goto Exit;
 	}
 
@@ -491,9 +464,7 @@ __match_notice_to_inf_rec(IN cl_list_item_t * const p_list_item,
 		if ((p_ii->g_or_v.generic.trap_num != 0xFFFF) &&
 		    (p_ii->g_or_v.generic.trap_num !=
 		     p_ntc->g_or_v.generic.trap_num)) {
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_notice_to_inf_rec: "
-				"Mismatch by Trap Num\n");
+			OSM_LOG(p_log, OSM_LOG_DEBUG, "Mismatch by Trap Num\n");
 			goto Exit;
 		}
 
@@ -501,8 +472,7 @@ __match_notice_to_inf_rec(IN cl_list_item_t * const p_list_item,
 		if ((cl_ntoh32(ib_inform_info_get_prod_type(p_ii)) != 0xFFFFFF)
 		    && (ib_inform_info_get_prod_type(p_ii) !=
 			ib_notice_get_prod_type(p_ntc))) {
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_notice_to_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Mismatch by Node Type: II=0x%06X (%s) Trap=0x%06X (%s)\n",
 				cl_ntoh32(ib_inform_info_get_prod_type(p_ii)),
 				ib_get_producer_type_str
@@ -517,9 +487,7 @@ __match_notice_to_inf_rec(IN cl_list_item_t * const p_list_item,
 		/* DeviceId     DeviceID     if not 0xFFFF must match */
 		if ((p_ii->g_or_v.vend.dev_id != 0xFFFF) &&
 		    (p_ii->g_or_v.vend.dev_id != p_ntc->g_or_v.vend.dev_id)) {
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_notice_to_inf_rec: "
-				"Mismatch by Dev Id\n");
+			OSM_LOG(p_log, OSM_LOG_DEBUG, "Mismatch by Dev Id\n");
 			goto Exit;
 		}
 
@@ -527,9 +495,7 @@ __match_notice_to_inf_rec(IN cl_list_item_t * const p_list_item,
 		if ((ib_inform_info_get_vend_id(p_ii) != CL_HTON32(0xFFFFFF)) &&
 		    (ib_inform_info_get_vend_id(p_ii) !=
 		     ib_notice_get_vend_id(p_ntc))) {
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__match_notice_to_inf_rec: "
-				"Mismatch by Vendor ID\n");
+			OSM_LOG(p_log, OSM_LOG_DEBUG, "Mismatch by Vendor ID\n");
 			goto Exit;
 		}
 	}
@@ -554,8 +520,7 @@ __match_notice_to_inf_rec(IN cl_list_item_t * const p_list_item,
 	p_src_port =
 	    osm_get_port_by_guid(p_subn, source_gid.unicast.interface_id);
 	if (!p_src_port) {
-		osm_log(p_log, OSM_LOG_INFO,
-			"__match_notice_to_inf_rec: "
+		OSM_LOG(p_log, OSM_LOG_INFO,
 			"Cannot find source port with GUID:0x%016" PRIx64 "\n",
 			cl_ntoh64(source_gid.unicast.interface_id));
 		goto Exit;
@@ -565,22 +530,19 @@ __match_notice_to_inf_rec(IN cl_list_item_t * const p_list_item,
 	    cl_ptr_vector_get(&p_subn->port_lid_tbl,
 			      cl_ntoh16(p_infr_rec->report_addr.dest_lid));
 	if (!p_dest_port) {
-		osm_log(p_log, OSM_LOG_INFO,
-			"__match_notice_to_inf_rec: "
+		OSM_LOG(p_log, OSM_LOG_INFO,
 			"Cannot find destination port with LID:0x%04x\n",
 			cl_ntoh16(p_infr_rec->report_addr.dest_lid));
 		goto Exit;
 	}
 
 	if (osm_port_share_pkey(p_log, p_src_port, p_dest_port) == FALSE) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"__match_notice_to_inf_rec: " "Mismatch by Pkey\n");
+		OSM_LOG(p_log, OSM_LOG_DEBUG, "Mismatch by Pkey\n");
 		/* According to o13-17.1.2 - If this informInfo does not have
 		   lid_range_begin of 0xFFFF, then this informInfo request
 		   should be removed from database */
 		if (p_ii->lid_range_begin != 0xFFFF) {
-			osm_log(p_log, OSM_LOG_VERBOSE,
-				"__match_notice_to_inf_rec: "
+			OSM_LOG(p_log, OSM_LOG_VERBOSE,
 				"Pkey mismatch on lid_range_begin != 0xFFFF. "
 				"Need to remove this informInfo from db\n");
 			/* add the informInfo record to the remove_infr list */
@@ -590,8 +552,7 @@ __match_notice_to_inf_rec(IN cl_list_item_t * const p_list_item,
 	}
 
 	/* send the report to the address provided in the inform record */
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"__match_notice_to_inf_rec: " "MATCH! Sending Report...\n");
+	OSM_LOG(p_log, OSM_LOG_DEBUG, "MATCH! Sending Report...\n");
 	__osm_send_report(p_infr_rec, p_ntc);
 	status = CL_SUCCESS;
 
@@ -624,16 +585,14 @@ osm_report_notice(IN osm_log_t * const p_log,
 	 * the osm_infr_init call is performed.
 	 */
 	if (p_subn->sa_infr_list.state != CL_INITIALIZED) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"osm_report_notice: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"Ignoring Notice Reports since Inform List is not initialized yet!\n");
 		return (IB_ERROR);
 	}
 
 	/* an official Event information log */
 	if (ib_notice_is_generic(p_ntc)) {
-		osm_log(p_log, OSM_LOG_INFO,
-			"osm_report_notice: "
+		OSM_LOG(p_log, OSM_LOG_INFO,
 			"Reporting Generic Notice type:%u num:%u"
 			" from LID:0x%04X GID:0x%016" PRIx64
 			",0x%016" PRIx64 "\n",
@@ -644,8 +603,7 @@ osm_report_notice(IN osm_log_t * const p_log,
 			cl_ntoh64(p_ntc->issuer_gid.unicast.interface_id)
 		    );
 	} else {
-		osm_log(p_log, OSM_LOG_INFO,
-			"osm_report_notice: "
+		OSM_LOG(p_log, OSM_LOG_INFO,
 			"Reporting Vendor Notice type:%u vend:%u dev:%u"
 			" from LID:0x%04X GID:0x%016" PRIx64
 			",0x%016" PRIx64 "\n",
diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c
index 8da89a7..ab23929 100644
--- a/opensm/opensm/osm_lid_mgr.c
+++ b/opensm/opensm/osm_lid_mgr.c
@@ -159,8 +159,7 @@ static void __osm_lid_mgr_validate_db(IN osm_lid_mgr_t * p_mgr)
 	cl_qlist_init(&guids);
 
 	if (osm_db_guid2lid_guids(p_mgr->p_g2l, &guids)) {
-		osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-			"__osm_lid_mgr_validate_db: ERR 0310: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 0310: "
 			"could not get guid list\n");
 		goto Exit;
 	}
@@ -169,8 +168,7 @@ static void __osm_lid_mgr_validate_db(IN osm_lid_mgr_t * p_mgr)
 	while ((cl_list_item_t *) p_item != cl_qlist_end(&guids)) {
 		if (osm_db_guid2lid_get
 		    (p_mgr->p_g2l, p_item->guid, &min_lid, &max_lid))
-			osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-				"__osm_lid_mgr_validate_db: ERR 0311: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 0311: "
 				"could not get lid for guid:0x%016" PRIx64 "\n",
 				p_item->guid);
 		else {
@@ -179,8 +177,7 @@ static void __osm_lid_mgr_validate_db(IN osm_lid_mgr_t * p_mgr)
 			if ((min_lid > max_lid) || (min_lid == 0)
 			    || (p_item->guid == 0)
 			    || (max_lid > p_mgr->p_subn->max_unicast_lid_ho)) {
-				osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-					"__osm_lid_mgr_validate_db: ERR 0312: "
+				OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 0312: "
 					"Illegal LID range [0x%x:0x%x] for guid:0x%016"
 					PRIx64 "\n", min_lid, max_lid,
 					p_item->guid);
@@ -189,8 +186,7 @@ static void __osm_lid_mgr_validate_db(IN osm_lid_mgr_t * p_mgr)
 				   && ((min_lid & lmc_mask) != min_lid)) {
 				/* 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,
-					"__osm_lid_mgr_validate_db: ERR 0313: "
+				OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 0313: "
 					"LID range [0x%x:0x%x] for guid:0x%016"
 					PRIx64
 					" is not aligned according to mask:0x%04x\n",
@@ -205,9 +201,8 @@ static void __osm_lid_mgr_validate_db(IN osm_lid_mgr_t * p_mgr)
 					    &&
 					    (cl_ptr_vector_get
 					     (&p_mgr->used_lids, lid))) {
-						osm_log(p_mgr->p_log,
-							OSM_LOG_ERROR,
-							"__osm_lid_mgr_validate_db: ERR 0314: "
+						OSM_LOG(p_mgr->p_log,
+							OSM_LOG_ERROR, "ERR 0314: "
 							"0x%04x for guid:0x%016"
 							PRIx64
 							" was previously used\n",
@@ -220,8 +215,8 @@ static void __osm_lid_mgr_validate_db(IN osm_lid_mgr_t * p_mgr)
 			if (!lids_ok) {
 				if (osm_db_guid2lid_delete
 				    (p_mgr->p_g2l, p_item->guid))
-					osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-						"__osm_lid_mgr_validate_db: ERR 0315: "
+					OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR,
+						"ERR 0315: "
 						"failed to delete entry for guid:0x%016"
 						PRIx64 "\n", p_item->guid);
 			} else {
@@ -258,8 +253,7 @@ osm_lid_mgr_init(IN osm_lid_mgr_t * const p_mgr, IN osm_sm_t *sm)
 	/* we initialize and restore the db domain of guid to lid map */
 	p_mgr->p_g2l = osm_db_domain_init(p_mgr->p_db, "/guid2lid");
 	if (!p_mgr->p_g2l) {
-		osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-			"osm_lid_mgr_init: ERR 0316: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 0316: "
 			"Error initializing Guid-to-Lid persistent database\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -277,8 +271,7 @@ osm_lid_mgr_init(IN osm_lid_mgr_t * const p_mgr, IN osm_sm_t *sm)
 				status = IB_ERROR;
 				goto Exit;
 			} else
-				osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-					"osm_lid_mgr_init: ERR 0317: "
+				OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 0317: "
 					"Error restoring Guid-to-Lid persistent database\n");
 		}
 
@@ -340,8 +333,7 @@ static int __osm_lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
 	   need to honor this file. */
 	if (p_mgr->p_subn->coming_out_of_standby == TRUE) {
 		if (p_mgr->p_subn->opt.honor_guid2lid_file == FALSE) {
-			osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-				"__osm_lid_mgr_init_sweep: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 				"Ignore guid2lid file when coming out of standby\n");
 			osm_db_clear(p_mgr->p_g2l);
 			for (lid = 0;
@@ -349,13 +341,11 @@ static int __osm_lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
 			     lid++)
 				cl_ptr_vector_set(p_persistent_vec, lid, NULL);
 		} else {
-			osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-				"__osm_lid_mgr_init_sweep: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 				"Honor current guid2lid file when coming out of standby\n");
 			osm_db_clear(p_mgr->p_g2l);
 			if (osm_db_restore(p_mgr->p_g2l))
-				osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-					"osm_lid_mgr_init_sweep: ERR 0306: "
+				OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 0306: "
 					"Error restoring Guid-to-Lid persistent database. Ignoring it\n");
 		}
 	}
@@ -376,8 +366,7 @@ static int __osm_lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
 	   huge empty range */
 	if ((p_mgr->p_subn->first_time_master_sweep == TRUE) &&
 	    (p_mgr->p_subn->opt.reassign_lids == TRUE)) {
-		osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-			"__osm_lid_mgr_init_sweep: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 			"Skipping all lids as we are reassigning them\n");
 		p_range =
 		    (osm_lid_mgr_range_t *) malloc(sizeof(osm_lid_mgr_range_t));
@@ -411,8 +400,7 @@ static int __osm_lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
 			    (((db_min_lid & lmc_mask) != db_min_lid) ||
 			     (db_max_lid - db_min_lid + 1 < num_lids))) {
 				/* Not aligned, or not wide enough, then remove the entry */
-				osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-					"__osm_lid_mgr_init_sweep: "
+				OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 					"Cleaning persistent entry for guid:0x%016"
 					PRIx64 " illegal range:[0x%x:0x%x]\n",
 					cl_ntoh64(osm_port_get_guid(p_port)),
@@ -467,8 +455,7 @@ static int __osm_lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
 		/* first check to see if the lid is used by a persistent assignment */
 		if ((lid <= max_persistent_lid)
 		    && cl_ptr_vector_get(p_persistent_vec, lid)) {
-			osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-				"__osm_lid_mgr_init_sweep: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 				"0x%04x is not free as its mapped by the persistent db\n",
 				lid);
 			is_free = FALSE;
@@ -494,8 +481,7 @@ static int __osm_lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
 							  (p_port)),
 							 &db_min_lid,
 							 &db_max_lid)) {
-					osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-						"__osm_lid_mgr_init_sweep: "
+					OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 						"0x%04x is free as it was discovered "
 						"but mapped by the persistent db to [0x%04x:0x%04x]\n",
 						lid, db_min_lid, db_max_lid);
@@ -523,9 +509,8 @@ static int __osm_lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
 					    && ((disc_min_lid & lmc_mask) !=
 						disc_min_lid)) {
 						/* The lid cannot be used */
-						osm_log(p_mgr->p_log,
+						OSM_LOG(p_mgr->p_log,
 							OSM_LOG_DEBUG,
-							"__osm_lid_mgr_init_sweep: "
 							"0x%04x is free as it was discovered "
 							"but not aligned\n",
 							lid);
@@ -541,10 +526,9 @@ static int __osm_lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
 							    cl_ptr_vector_get
 							    (p_persistent_vec,
 							     req_lid)) {
-								osm_log(p_mgr->
+								OSM_LOG(p_mgr->
 									p_log,
 									OSM_LOG_DEBUG,
-									"__osm_lid_mgr_init_sweep: "
 									"0x%04x is free as it was discovered "
 									"but mapped\n",
 									lid);
@@ -581,8 +565,7 @@ static int __osm_lid_mgr_init_sweep(IN osm_lid_mgr_t * const p_mgr)
 			if (p_range) {
 				cl_qlist_insert_tail(&p_mgr->free_ranges,
 						     &p_range->item);
-				osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-					"__osm_lid_mgr_init_sweep: "
+				OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 					"new free lid range [0x%x:0x%x]\n",
 					p_range->min_lid, p_range->max_lid);
 				p_range = NULL;
@@ -607,8 +590,7 @@ AfterScanningLids:
 	}
 	p_range->max_lid = p_mgr->p_subn->max_unicast_lid_ho - 1;
 	cl_qlist_insert_tail(&p_mgr->free_ranges, &p_range->item);
-	osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-		"__osm_lid_mgr_init_sweep: "
+	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 		"final free lid range [0x%x:0x%x]\n",
 		p_range->min_lid, p_range->max_lid);
 
@@ -665,8 +647,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,
-		"__osm_lid_mgr_find_free_lid_range: "
+	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 		"LMC = %u, number LIDs = %u\n",
 		p_mgr->p_subn->opt.lmc, num_lids);
 
@@ -715,8 +696,7 @@ __osm_lid_mgr_find_free_lid_range(IN osm_lid_mgr_t * const p_mgr,
 	 */
 	*p_min_lid = *p_max_lid = 0;
 	/* if we run out of lids, give an error and abort! */
-	osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-		"__osm_lid_mgr_find_free_lid_range: ERR 0307: "
+	OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 0307: "
 		"OPENSM RAN OUT OF LIDS!!!\n");
 	CL_ASSERT(0);
 }
@@ -783,15 +763,13 @@ __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,
-				"__osm_lid_mgr_get_port_lid: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 				"0x%016" PRIx64
 				" matches its known lid:0x%04x\n", guid,
 				min_lid);
 			goto Exit;
 		} else {
-			osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-				"__osm_lid_mgr_get_port_lid: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 				"0x%016" PRIx64
 				" with lid:0x%04x does not match its known lid:0x%04x\n",
 				guid, cl_ntoh16(osm_port_get_base_lid(p_port)),
@@ -803,8 +781,7 @@ __osm_lid_mgr_get_port_lid(IN osm_lid_mgr_t * const p_mgr,
 			goto Exit;
 		}
 	} else
-		osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-			"__osm_lid_mgr_get_port_lid: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 			"0x%016" PRIx64 " has no persistent lid assigned\n",
 			guid);
 
@@ -824,21 +801,18 @@ __osm_lid_mgr_get_port_lid(IN osm_lid_mgr_t * const p_mgr,
 			    (p_mgr, min_lid, num_lids)) {
 				*p_min_lid = min_lid;
 				*p_max_lid = min_lid + num_lids - 1;
-				osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-					"__osm_lid_mgr_get_port_lid: "
+				OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 					"0x%016" PRIx64
 					" lid range:[0x%x-0x%x] is free\n",
 					guid, *p_min_lid, *p_max_lid);
 				goto NewLidSet;
 			} else
-				osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-					"__osm_lid_mgr_get_port_lid: "
+				OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 					"0x%016" PRIx64
 					" existing lid range:[0x%x:0x%x] is not free\n",
 					guid, min_lid, min_lid + num_lids - 1);
 		} else
-			osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-				"__osm_lid_mgr_get_port_lid: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 				"0x%016" PRIx64
 				" existing lid range:[0x%x:0x%x] is not lmc aligned\n",
 				guid, min_lid, min_lid + num_lids - 1);
@@ -850,10 +824,9 @@ __osm_lid_mgr_get_port_lid(IN osm_lid_mgr_t * const p_mgr,
 	/* find an empty space */
 	__osm_lid_mgr_find_free_lid_range(p_mgr, num_lids, p_min_lid,
 					  p_max_lid);
-	osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-		"__osm_lid_mgr_get_port_lid: " "0x%016" PRIx64
-		" assigned a new lid range:[0x%x-0x%x]\n", guid, *p_min_lid,
-		*p_max_lid);
+	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
+		"0x%016" PRIx64 " assigned a new lid range:[0x%x-0x%x]\n",
+		guid, *p_min_lid, *p_max_lid);
 	lid_changed = 1;
 
 NewLidSet:
@@ -926,8 +899,7 @@ __osm_lid_mgr_set_physp_pi(IN osm_lid_mgr_t * const p_mgr,
 		   (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,
-				"__osm_lid_mgr_set_physp_pi: "
+			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)));
@@ -1059,8 +1031,7 @@ __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,
-					"__osm_lid_mgr_set_physp_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",
@@ -1095,8 +1066,7 @@ __osm_lid_mgr_set_physp_pi(IN osm_lid_mgr_t * const p_mgr,
 		    ib_port_info_get_neighbor_mtu(p_old_pi))
 			send_set = TRUE;
 
-		osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-			"__osm_lid_mgr_set_physp_pi: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 			"Updating neighbor_mtu on switch GUID 0x%016" PRIx64
 			" port 0 to:%u\n",
 			cl_ntoh64(osm_physp_get_port_guid(p_physp)),
@@ -1180,8 +1150,7 @@ __osm_lid_mgr_process_our_sm_node(IN osm_lid_mgr_t * const p_mgr)
 	p_port =
 	    osm_get_port_by_guid(p_mgr->p_subn, p_mgr->p_subn->sm_port_guid);
 	if (!p_port) {
-		osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-			"__osm_lid_mgr_process_our_sm_node: ERR 0308: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 0308: "
 			"Can't acquire SM's port object, GUID 0x%016" PRIx64
 			"\n", cl_ntoh64(p_mgr->p_subn->sm_port_guid));
 		res = FALSE;
@@ -1197,8 +1166,7 @@ __osm_lid_mgr_process_our_sm_node(IN osm_lid_mgr_t * const p_mgr)
 	   LMC masking by hardware.
 	 */
 	__osm_lid_mgr_get_port_lid(p_mgr, p_port, &min_lid_ho, &max_lid_ho);
-	osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-		"__osm_lid_mgr_process_our_sm_node: "
+	OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 		"Current base LID is 0x%X\n", min_lid_ho);
 	/*
 	   Update subnet object.
@@ -1207,8 +1175,7 @@ __osm_lid_mgr_process_our_sm_node(IN osm_lid_mgr_t * const p_mgr)
 	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,
-			"__osm_lid_mgr_process_our_sm_node: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_VERBOSE,
 			"Assigning SM's port 0x%016" PRIx64
 			"\n\t\t\t\tto LID range [0x%X,0x%X]\n",
 			cl_ntoh64(osm_port_get_guid(p_port)),
@@ -1242,8 +1209,7 @@ osm_signal_t osm_lid_mgr_process_sm(IN osm_lid_mgr_t * const p_mgr)
 	__osm_lid_mgr_init_sweep(p_mgr);
 
 	if (p_mgr->p_subn->opt.pfn_ui_pre_lid_assign) {
-		osm_log(p_mgr->p_log, OSM_LOG_VERBOSE,
-			"osm_lid_mgr_process_sm: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_VERBOSE,
 			"Invoking UI function pfn_ui_pre_lid_assign\n");
 		p_mgr->p_subn->opt.pfn_ui_pre_lid_assign(p_mgr->p_subn->opt.
 							 ui_pre_lid_assign_ctx);
@@ -1310,8 +1276,7 @@ osm_signal_t osm_lid_mgr_process_subnet(IN osm_lid_mgr_t * const p_mgr)
 		   we will not add it to any of these lists.
 		 */
 		if (port_guid == p_mgr->p_subn->sm_port_guid) {
-			osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-				"osm_lid_mgr_process_subnet: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 				"Skipping our own port 0x%016" PRIx64 "\n",
 				cl_ntoh64(port_guid));
 			continue;
@@ -1327,8 +1292,7 @@ osm_signal_t osm_lid_mgr_process_subnet(IN osm_lid_mgr_t * const p_mgr)
 
 		/* we can call the function to update the port info as it known to
 		   look for any field change and will only send an updated if required */
-		osm_log(p_mgr->p_log, OSM_LOG_VERBOSE,
-			"osm_lid_mgr_process_subnet: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_VERBOSE,
 			"Assigned port 0x%016" PRIx64
 			", LID [0x%X,0x%X]\n", cl_ntoh64(port_guid),
 			min_lid_ho, max_lid_ho);
diff --git a/opensm/opensm/osm_lin_fwd_rcv.c b/opensm/opensm/osm_lin_fwd_rcv.c
index 09edd1a..18be6a3 100644
--- a/opensm/opensm/osm_lin_fwd_rcv.c
+++ b/opensm/opensm/osm_lin_fwd_rcv.c
@@ -88,15 +88,13 @@ void osm_lft_rcv_process(IN void *context, IN void *data)
 	p_sw = osm_get_switch_by_guid(sm->p_subn, node_guid);
 
 	if (!p_sw) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_lft_rcv_process: ERR 0401: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0401: "
 			"LFT received for nonexistent node "
 			"0x%" PRIx64 "\n", cl_ntoh64(node_guid));
 	} else {
 		status = osm_switch_set_ft_block(p_sw, p_block, block_num);
 		if (status != IB_SUCCESS) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"osm_lft_rcv_process: ERR 0402: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0402: "
 				"Setting forwarding table block failed (%s)"
 				"\n\t\t\t\tSwitch 0x%" PRIx64 "\n",
 				ib_get_err_str(status), cl_ntoh64(node_guid));
diff --git a/opensm/opensm/osm_link_mgr.c b/opensm/opensm/osm_link_mgr.c
index 8ca5786..e4ba93e 100644
--- a/opensm/opensm/osm_link_mgr.c
+++ b/opensm/opensm/osm_link_mgr.c
@@ -90,8 +90,7 @@ __osm_link_mgr_set_physp_pi(osm_sm_t * sm,
 		   For base port 0 the following parameters are not valid (p822, table 145).
 		 */
 		if (!p_node->sw) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_link_mgr_set_physp_pi: ERR 4201: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 4201: "
 				"Cannot find switch by guid: 0x%" PRIx64 "\n",
 				cl_ntoh64(p_node->node_info.node_guid));
 			goto Exit;
@@ -102,8 +101,7 @@ __osm_link_mgr_set_physp_pi(osm_sm_t * sm,
 			/* 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,
-					"__osm_link_mgr_set_physp_pi: "
+				OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 					"Skipping port 0, GUID 0x%016" PRIx64
 					"\n",
 					cl_ntoh64(osm_physp_get_port_guid
@@ -355,8 +353,7 @@ __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,
-			"__osm_link_mgr_process_node: "
+		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));
@@ -388,8 +385,7 @@ __osm_link_mgr_process_node(osm_sm_t * sm,
 		 */
 		if (link_state != IB_LINK_NO_CHANGE &&
 		    link_state <= current_state)
-			osm_log(sm->p_log, OSM_LOG_DEBUG,
-				"__osm_link_mgr_process_node: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Physical port 0x%X already %s. Skipping\n",
 				p_physp->port_num,
 				ib_get_port_state_str(current_state));
diff --git a/opensm/opensm/osm_mad_pool.c b/opensm/opensm/osm_mad_pool.c
index 62b998a..9b3812f 100644
--- a/opensm/opensm/osm_mad_pool.c
+++ b/opensm/opensm/osm_mad_pool.c
@@ -105,8 +105,7 @@ osm_madw_t *osm_mad_pool_get(IN osm_mad_pool_t * const p_pool,
 	 */
 	p_madw = malloc(sizeof(*p_madw));
 	if (p_madw == NULL) {
-		osm_log(p_pool->p_log, OSM_LOG_ERROR,
-			"osm_mad_pool_get: ERR 0703: "
+		OSM_LOG(p_pool->p_log, OSM_LOG_ERROR, "ERR 0703: "
 			"Unable to acquire MAD wrapper object\n");
 		goto Exit;
 	}
@@ -118,8 +117,7 @@ osm_madw_t *osm_mad_pool_get(IN osm_mad_pool_t * const p_pool,
 	 */
 	p_mad = osm_vendor_get(h_bind, total_size, &p_madw->vend_wrap);
 	if (p_mad == NULL) {
-		osm_log(p_pool->p_log, OSM_LOG_ERROR,
-			"osm_mad_pool_get: ERR 0704: "
+		OSM_LOG(p_pool->p_log, OSM_LOG_ERROR, "ERR 0704: "
 			"Unable to acquire wire MAD\n");
 
 		/* Don't leak wrappers! */
@@ -134,9 +132,9 @@ osm_madw_t *osm_mad_pool_get(IN osm_mad_pool_t * const p_pool,
 	 */
 	osm_madw_set_mad(p_madw, p_mad);
 
-	osm_log(p_pool->p_log, OSM_LOG_DEBUG,
-		"osm_mad_pool_get: Acquired p_madw = %p, p_mad = %p, "
-		"size = %u\n", p_madw, p_madw->p_mad, total_size);
+	OSM_LOG(p_pool->p_log, OSM_LOG_DEBUG,
+		"Acquired p_madw = %p, p_mad = %p, size = %u\n",
+		p_madw, p_madw->p_mad, total_size);
 
 Exit:
 	OSM_LOG_EXIT(p_pool->p_log);
@@ -164,8 +162,7 @@ osm_madw_t *osm_mad_pool_get_wrapper(IN osm_mad_pool_t * const p_pool,
 	 */
 	p_madw = malloc(sizeof(*p_madw));
 	if (p_madw == NULL) {
-		osm_log(p_pool->p_log, OSM_LOG_ERROR,
-			"osm_mad_pool_get_wrapper: ERR 0705: "
+		OSM_LOG(p_pool->p_log, OSM_LOG_ERROR, "ERR 0705: "
 			"Unable to acquire MAD wrapper object\n");
 		goto Exit;
 	}
@@ -177,9 +174,9 @@ osm_madw_t *osm_mad_pool_get_wrapper(IN osm_mad_pool_t * const p_pool,
 	osm_madw_init(p_madw, h_bind, total_size, p_mad_addr);
 	osm_madw_set_mad(p_madw, p_mad);
 
-	osm_log(p_pool->p_log, OSM_LOG_DEBUG,
-		"osm_mad_pool_get_wrapper: Acquired p_madw = %p, p_mad = %p "
-		"size = %u\n", p_madw, p_madw->p_mad, total_size);
+	OSM_LOG(p_pool->p_log, OSM_LOG_DEBUG,
+		"Acquired p_madw = %p, p_mad = %p size = %u\n",
+		p_madw, p_madw->p_mad, total_size);
 
 Exit:
 	OSM_LOG_EXIT(p_pool->p_log);
@@ -198,9 +195,7 @@ osm_madw_t *osm_mad_pool_get_wrapper_raw(IN osm_mad_pool_t * const p_pool)
 	if (!p_madw)
 		return NULL;
 
-	osm_log(p_pool->p_log, OSM_LOG_DEBUG,
-		"osm_mad_pool_get_wrapper_raw: "
-		"Getting p_madw = %p\n", p_madw);
+	OSM_LOG(p_pool->p_log, OSM_LOG_DEBUG, "Getting p_madw = %p\n", p_madw);
 
 	osm_madw_init(p_madw, 0, 0, 0);
 	osm_madw_set_mad(p_madw, 0);
@@ -219,9 +214,8 @@ osm_mad_pool_put(IN osm_mad_pool_t * const p_pool, IN osm_madw_t * const p_madw)
 
 	CL_ASSERT(p_madw);
 
-	osm_log(p_pool->p_log, OSM_LOG_DEBUG,
-		"osm_mad_pool_put: Releasing p_madw = %p, p_mad = %p\n",
-		p_madw, p_madw->p_mad);
+	OSM_LOG(p_pool->p_log, OSM_LOG_DEBUG,
+		"Releasing p_madw = %p, p_mad = %p\n", p_madw, p_madw->p_mad);
 
 	/*
 	   First, return the wire mad to the pool
diff --git a/opensm/opensm/osm_mcast_fwd_rcv.c b/opensm/opensm/osm_mcast_fwd_rcv.c
index 2c97945..8c75254 100644
--- a/opensm/opensm/osm_mcast_fwd_rcv.c
+++ b/opensm/opensm/osm_mcast_fwd_rcv.c
@@ -95,8 +95,7 @@ void osm_mft_rcv_process(IN void *context, IN void *data)
 	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,
-			"osm_mft_rcv_process: "
+		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),
@@ -107,8 +106,7 @@ void osm_mft_rcv_process(IN void *context, IN void *data)
 	p_sw = osm_get_switch_by_guid(sm->p_subn, node_guid);
 
 	if (!p_sw) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_mft_rcv_process: ERR 0801: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0801: "
 			"MFT received for nonexistent node "
 			"0x%016" PRIx64 "\n", cl_ntoh64(node_guid));
 	} else {
@@ -116,8 +114,7 @@ void osm_mft_rcv_process(IN void *context, IN void *data)
 						  (uint16_t) block_num,
 						  position);
 		if (status != IB_SUCCESS) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"osm_mft_rcv_process: ERR 0802: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0802: "
 				"Setting MFT block failed (%s)"
 				"\n\t\t\t\tSwitch 0x%016" PRIx64
 				", block %u, position %u\n",
diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c
index 1a62ce5..fe4cfbf 100644
--- a/opensm/opensm/osm_mcast_mgr.c
+++ b/opensm/opensm/osm_mcast_mgr.c
@@ -167,8 +167,7 @@ osm_mcast_mgr_compute_avg_hops(osm_sm_t * sm,
 							      port_gid));
 
 		if (!p_port) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"osm_mcast_mgr_compute_avg_hops: ERR 0A18: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A18: "
 				"No port object for port 0x%016" PRIx64 "\n",
 				cl_ntoh64(ib_gid_get_guid
 					  (&p_mcm_port->port_gid)));
@@ -227,8 +226,7 @@ osm_mcast_mgr_compute_max_hops(osm_sm_t * sm,
 							      port_gid));
 
 		if (!p_port) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"osm_mcast_mgr_compute_max_hops: ERR 0A1A: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A1A: "
 				"No port object for port 0x%016" PRIx64 "\n",
 				cl_ntoh64(ib_gid_get_guid
 					  (&p_mcm_port->port_gid)));
@@ -293,8 +291,7 @@ static osm_switch_t *__osm_mcast_mgr_find_optimal_switch(osm_sm_t * sm,
 		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,
-				"__osm_mcast_mgr_find_optimal_switch: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Switch 0x%016" PRIx64 ", hops = %f\n",
 				sw_guid_ho, hops);
 		}
@@ -310,13 +307,11 @@ static osm_switch_t *__osm_mcast_mgr_find_optimal_switch(osm_sm_t * sm,
 			sw_guid_ho =
 			    cl_ntoh64(osm_node_get_node_guid
 				      (p_best_sw->p_node));
-			osm_log(sm->p_log, OSM_LOG_VERBOSE,
-				"__osm_mcast_mgr_find_optimal_switch: "
+			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,
-				"__osm_mcast_mgr_find_optimal_switch: "
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 				"No multicast capable switches detected\n");
 		}
 	}
@@ -394,8 +389,7 @@ __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,
-				"__osm_mcast_mgr_set_tbl: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Writing MFT block 0x%X\n", block_id_ho);
 		}
 
@@ -407,8 +401,7 @@ __osm_mcast_mgr_set_tbl(osm_sm_t * sm, IN osm_switch_t * const p_sw)
 				     CL_DISP_MSGID_NONE, &mad_context);
 
 		if (status != IB_SUCCESS) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_mcast_mgr_set_tbl: ERR 0A02: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A02: "
 				"Sending multicast fwd. tbl. block failed (%s)\n",
 				ib_get_err_str(status));
 		}
@@ -473,8 +466,7 @@ __osm_mcast_mgr_subdivide(osm_sm_t * sm,
 			 */
 			uint64_t node_guid_ho =
 			    cl_ntoh64(osm_node_get_node_guid(p_sw->p_node));
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_mcast_mgr_subdivide: ERR 0A03: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A03: "
 				"Error routing MLID 0x%X through switch 0x%"
 				PRIx64 "\n"
 				"\t\t\t\tNo multicast paths from this switch for port "
@@ -489,8 +481,7 @@ __osm_mcast_mgr_subdivide(osm_sm_t * sm,
 		if (port_num > array_size) {
 			uint64_t node_guid_ho =
 			    cl_ntoh64(osm_node_get_node_guid(p_sw->p_node));
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_mcast_mgr_subdivide: ERR 0A04: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A04: "
 				"Error routing MLID 0x%X through switch 0x%"
 				PRIx64 "\n"
 				"\t\t\t\tNo multicast paths from this switch to port "
@@ -521,8 +512,7 @@ static void __osm_mcast_mgr_purge_list(osm_sm_t * sm, cl_qlist_t * const p_list)
 
 	while ((p_wobj = (osm_mcast_work_obj_t *) cl_qlist_remove_head(p_list))
 	       != (osm_mcast_work_obj_t *) cl_qlist_end(p_list)) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_mcast_mgr_purge_list: ERR 0A06: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A06: "
 			"Unable to route for port 0x%" PRIx64 "\n",
 			osm_port_get_guid(p_wobj->p_port));
 		__osm_mcast_work_obj_delete(p_wobj);
@@ -569,8 +559,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 	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,
-			"__osm_mcast_mgr_branch: "
+		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);
@@ -589,8 +578,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 		/*
 		   This switch doesn't do multicast.  Clean-up.
 		 */
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_mcast_mgr_branch: ERR 0A14: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A14: "
 			"Switch 0x%" PRIx64 " does not support multicast\n",
 			node_guid_ho);
 
@@ -607,8 +595,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 		   We are unable to continue routing down this
 		   leg of the tree.  Clean-up.
 		 */
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_mcast_mgr_branch: ERR 0A15: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A15: "
 			"Insufficient memory to build multicast tree\n");
 
 		/*
@@ -629,8 +616,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 	 */
 	list_array = malloc(sizeof(cl_qlist_t) * max_children);
 	if (list_array == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_mcast_mgr_branch: ERR 0A16: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A16: "
 			"Unable to allocate list array\n");
 		__osm_mcast_mgr_purge_list(sm, p_list);
 		goto Exit;
@@ -652,8 +638,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 	 */
 	if (depth > 1) {
 		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			osm_log(sm->p_log, OSM_LOG_DEBUG,
-				"__osm_mcast_mgr_branch: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Adding upstream port 0x%X\n", upstream_port);
 		}
 
@@ -689,8 +674,7 @@ static osm_mtree_node_t *__osm_mcast_mgr_branch(osm_sm_t * sm,
 			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,
-				"__osm_mcast_mgr_branch: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Routing %zu destinations via switch port 0x%X\n",
 				count, i);
 		}
@@ -745,8 +729,7 @@ 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,
-					"__osm_mcast_mgr_branch: "
+				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
@@ -795,8 +778,7 @@ __osm_mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
 	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,
-				"__osm_mcast_mgr_build_spanning_tree: "
+			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)));
 		}
@@ -821,8 +803,7 @@ __osm_mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
 	 */
 	p_sw = __osm_mcast_mgr_find_root_switch(sm, p_mgrp);
 	if (p_sw == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_mcast_mgr_build_spanning_tree: ERR 0A08: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A08: "
 			"Unable to locate a suitable switch for group 0x%X\n",
 			cl_ntoh16(osm_mgrp_get_mlid(p_mgrp)));
 		status = IB_ERROR;
@@ -844,8 +825,7 @@ __osm_mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
 					      ib_gid_get_guid(&p_mcm_port->
 							      port_gid));
 		if (!p_port) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_mcast_mgr_build_spanning_tree: ERR 0A09: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A09: "
 				"No port object for port 0x%016" PRIx64 "\n",
 				cl_ntoh64(ib_gid_get_guid
 					  (&p_mcm_port->port_gid)));
@@ -854,8 +834,7 @@ __osm_mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
 
 		p_wobj = __osm_mcast_work_obj_new(p_port);
 		if (p_wobj == NULL) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_mcast_mgr_build_spanning_tree: ERR 0A10: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A10: "
 				"Insufficient memory to route port 0x%016"
 				PRIx64 "\n",
 				cl_ntoh64(osm_port_get_guid(p_port)));
@@ -869,8 +848,7 @@ __osm_mcast_mgr_build_spanning_tree(osm_sm_t * sm, osm_mgrp_t * const p_mgrp)
 	p_mgrp->p_root = __osm_mcast_mgr_branch(sm, p_mgrp, p_sw,
 						&port_list, 0, 0, &max_depth);
 
-	osm_log(sm->p_log, OSM_LOG_VERBOSE,
-		"__osm_mcast_mgr_build_spanning_tree: "
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 		"Configured MLID 0x%X for %u ports, max tree depth = %u\n",
 		cl_ntoh16(osm_mgrp_get_mlid(p_mgrp)), count, max_depth);
 
@@ -903,8 +881,7 @@ 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,
-			"osm_mcast_mgr_set_table: "
+		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));
 	}
@@ -986,8 +963,7 @@ 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,
-			"osm_mcast_mgr_process_single: "
+		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);
@@ -998,8 +974,7 @@ osm_mcast_mgr_process_single(osm_sm_t * sm,
 	 */
 	p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 	if (!p_port) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_mcast_mgr_process_single: ERR 0A01: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A01: "
 			"Unable to acquire port object for 0x%" PRIx64 "\n",
 			cl_ntoh64(port_guid));
 		status = IB_ERROR;
@@ -1008,8 +983,7 @@ osm_mcast_mgr_process_single(osm_sm_t * sm,
 
 	p_physp = p_port->p_physp;
 	if (p_physp == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_mcast_mgr_process_single: ERR 0A05: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A05: "
 			"Unable to acquire phsyical port object for 0x%" PRIx64
 			"\n", cl_ntoh64(port_guid));
 		status = IB_ERROR;
@@ -1018,8 +992,7 @@ osm_mcast_mgr_process_single(osm_sm_t * sm,
 
 	p_remote_physp = osm_physp_get_remote(p_physp);
 	if (p_remote_physp == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_mcast_mgr_process_single: ERR 0A11: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A11: "
 			"Unable to acquire remote phsyical port object "
 			"for 0x%" PRIx64 "\n", cl_ntoh64(port_guid));
 		status = IB_ERROR;
@@ -1033,8 +1006,7 @@ osm_mcast_mgr_process_single(osm_sm_t * sm,
 	sw_guid = osm_node_get_node_guid(p_remote_node);
 
 	if (osm_node_get_type(p_remote_node) != IB_NODE_TYPE_SWITCH) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_mcast_mgr_process_single: ERR 0A22: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A22: "
 			"Remote node not a switch node 0x%" PRIx64 "\n",
 			cl_ntoh64(sw_guid));
 		status = IB_ERROR;
@@ -1042,8 +1014,7 @@ osm_mcast_mgr_process_single(osm_sm_t * sm,
 	}
 
 	if (!p_remote_node->sw) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_mcast_mgr_process_single: ERR 0A12: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A12: "
 			"No switch object 0x%" PRIx64 "\n", cl_ntoh64(sw_guid));
 		status = IB_ERROR;
 		goto Exit;
@@ -1070,14 +1041,12 @@ osm_mcast_mgr_process_single(osm_sm_t * sm,
 		} 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,
-						"osm_mcast_mgr_process_single: "
+					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,
-					"osm_mcast_mgr_process_single: ERR 0A13: "
+				OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A13: "
 					"Unknown join state 0x%X\n",
 					join_state);
 				status = IB_ERROR;
@@ -1086,8 +1055,7 @@ osm_mcast_mgr_process_single(osm_sm_t * sm,
 		}
 	} else {
 		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			osm_log(sm->p_log, OSM_LOG_DEBUG,
-				"osm_mcast_mgr_process_single: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Unable to add port\n");
 		}
 	}
@@ -1116,8 +1084,7 @@ 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,
-			"osm_mcast_mgr_process_tree: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Processing multicast group 0x%X\n", cl_ntoh16(mlid));
 	}
 
@@ -1126,8 +1093,7 @@ osm_mcast_mgr_process_tree(osm_sm_t * sm,
 	 */
 	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,
-				"osm_mcast_mgr_process_tree: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"No switches in subnet. Nothing to do\n");
 		}
 		goto Exit;
@@ -1156,16 +1122,14 @@ osm_mcast_mgr_process_tree(osm_sm_t * sm,
 	if (ui_mcast_fdb_assign_func_defined == FALSE) {
 		status = __osm_mcast_mgr_build_spanning_tree(sm, p_mgrp);
 		if (status != IB_SUCCESS) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"osm_mcast_mgr_process_tree: ERR 0A17: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A17: "
 				"Unable to create spanning tree (%s)\n",
 				ib_get_err_str(status));
 			goto Exit;
 		}
 	} else {
 		if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-			osm_log(sm->p_log, OSM_LOG_DEBUG,
-				"osm_mcast_mgr_process_tree: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Invoking UI function pfn_ui_mcast_fdb_assign\n");
 		}
 
@@ -1196,8 +1160,7 @@ mcast_mgr_process_mgrp(osm_sm_t * sm,
 
 	status = osm_mcast_mgr_process_tree(sm, p_mgrp, req_type, port_guid);
 	if (status != IB_SUCCESS) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"mcast_mgr_process_mgrp: ERR 0A19: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A19: "
 			"Unable to create spanning tree (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -1208,8 +1171,7 @@ mcast_mgr_process_mgrp(osm_sm_t * sm,
 	 * Not a well known group
 	 */
 	if (cl_qmap_count(&p_mgrp->mcm_port_tbl) == 0 && !p_mgrp->well_known) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"mcast_mgr_process_mgrp: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Destroying mgrp with lid:0x%X\n",
 			cl_ntoh16(p_mgrp->mlid));
 		/* Send a Report to any InformInfo registered for
@@ -1343,15 +1305,13 @@ osm_signal_t osm_mcast_mgr_process_mgroups(osm_sm_t * sm)
 		 * we processed the group we can skip doing anything
 		 */
 		if (p_mgrp->last_change_id == p_mgrp->last_tree_id) {
-			osm_log(sm->p_log, OSM_LOG_DEBUG,
-				"osm_mcast_mgr_process_mgroups: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Skip processing mgrp with lid:0x%X change id:%u\n",
 				cl_ntoh16(mlid), p_mgrp->last_change_id);
 			continue;
 		}
 
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"osm_mcast_mgr_process_mgroups: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Processing mgrp with lid:0x%X change id:%u\n",
 			cl_ntoh16(mlid), p_mgrp->last_change_id);
 		mcast_mgr_process_mgrp(sm, p_mgrp, req_type, port_guid);
diff --git a/opensm/opensm/osm_multicast.c b/opensm/opensm/osm_multicast.c
index 628d966..a07e5da 100644
--- a/opensm/opensm/osm_multicast.c
+++ b/opensm/opensm/osm_multicast.c
@@ -310,8 +310,7 @@ osm_mgrp_send_delete_notice(IN osm_subn_t * const p_subn,
 
 	status = osm_report_notice(p_log, p_subn, &notice);
 	if (status != IB_SUCCESS) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_mgrp_send_delete_notice: ERR 7601: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 7601: "
 			"Error sending trap reports (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -352,8 +351,7 @@ osm_mgrp_send_create_notice(IN osm_subn_t * const p_subn,
 
 	status = osm_report_notice(p_log, p_subn, &notice);
 	if (status != IB_SUCCESS) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_mgrp_send_create_notice: ERR 7602: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 7602: "
 			"Error sending trap reports (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
diff --git a/opensm/opensm/osm_node_desc_rcv.c b/opensm/opensm/osm_node_desc_rcv.c
index 4268526..4a22aab 100644
--- a/opensm/opensm/osm_node_desc_rcv.c
+++ b/opensm/opensm/osm_node_desc_rcv.c
@@ -87,8 +87,7 @@ __osm_nd_rcv_process_nd(IN osm_sm_t * sm,
 	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,
-			"__osm_nd_rcv_process_nd: "
+		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);
@@ -125,8 +124,7 @@ void osm_nd_rcv_process(IN void *context, IN void *data)
 	CL_PLOCK_EXCL_ACQUIRE(sm->p_lock);
 	p_node = osm_get_node_by_guid(sm->p_subn, node_guid);
 	if (!p_node) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_nd_rcv_process: ERR 0B01: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0B01: "
 			"NodeDescription received for nonexistent node "
 			"0x%" PRIx64 "\n", cl_ntoh64(node_guid));
 	} else {
diff --git a/opensm/opensm/osm_node_info_rcv.c b/opensm/opensm/osm_node_info_rcv.c
index 68d55b9..9b2c74c 100644
--- a/opensm/opensm/osm_node_info_rcv.c
+++ b/opensm/opensm/osm_node_info_rcv.c
@@ -76,8 +76,7 @@ report_duplicated_guid(IN osm_sm_t * sm,
 	p_old = p_physp->p_remote_physp;
 	p_new = osm_node_get_physp_ptr(p_neighbor_node, port_num);
 
-	osm_log(sm->p_log, OSM_LOG_ERROR,
-		"report_duplicated_guid: ERR 0D01: "
+	OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D01: "
 		"Found duplicated node.\n"
 		"Node 0x%" PRIx64 " port %u is reachable from remote node "
 		"0x%" PRIx64 " port %u and remote node 0x%" PRIx64 " port %u.\n"
@@ -119,8 +118,7 @@ static void requery_dup_node_info(IN osm_sm_t * sm,
 			     0, CL_DISP_MSGID_NONE, &context);
 
 	if (status != IB_SUCCESS)
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"requery_dup_node_info: ERR 0D02: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D02: "
 			"Failure initiating NodeInfo request (%s)\n",
 			ib_get_err_str(status));
 }
@@ -145,8 +143,7 @@ __osm_ni_rcv_set_links(IN osm_sm_t * sm,
 	   the ni_context will be zero.
 	 */
 	if (p_ni_context->node_guid == 0) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_ni_rcv_set_links: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Nothing to link for our own node 0x%" PRIx64 "\n",
 			cl_ntoh64(osm_node_get_node_guid(p_node)));
 		goto _exit;
@@ -155,8 +152,7 @@ __osm_ni_rcv_set_links(IN osm_sm_t * sm,
 	p_neighbor_node = osm_get_node_by_guid(sm->p_subn,
 					       p_ni_context->node_guid);
 	if (!p_neighbor_node) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_ni_rcv_set_links: ERR 0D10: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D10: "
 			"Unexpected removal of neighbor node "
 			"0x%" PRIx64 "\n", cl_ntoh64(p_ni_context->node_guid));
 		goto _exit;
@@ -177,8 +173,7 @@ __osm_ni_rcv_set_links(IN osm_sm_t * sm,
 
 	if (osm_node_link_exists(p_node, port_num,
 				 p_neighbor_node, p_ni_context->port_num)) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_ni_rcv_set_links: " "Link already exists\n");
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG, "Link already exists\n");
 		goto _exit;
 	}
 
@@ -225,8 +220,7 @@ __osm_ni_rcv_set_links(IN osm_sm_t * sm,
 	if ((osm_node_get_node_guid(p_node) == p_ni_context->node_guid) &&
 	    (port_num == p_ni_context->port_num) &&
 	    port_num != 0 && cl_qmap_count(&sm->p_subn->sw_guid_tbl) == 0) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_ni_rcv_set_links: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Duplicate GUID found by link from a port to itself:"
 			"node 0x%" PRIx64 ", port number 0x%X\n",
 			cl_ntoh64(osm_node_get_node_guid(p_node)), port_num);
@@ -245,15 +239,11 @@ __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,
-			"__osm_ni_rcv_set_links: "
-			"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,
+		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);
 
@@ -306,8 +296,7 @@ __osm_ni_rcv_process_new_node(IN osm_sm_t * sm,
 			     IB_MAD_ATTR_PORT_INFO,
 			     cl_hton32(port_num), CL_DISP_MSGID_NONE, &context);
 	if (status != IB_SUCCESS)
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_ni_rcv_process_new_node: ERR 0D02: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D02: "
 			"Failure initiating PortInfo request (%s)\n",
 			ib_get_err_str(status));
 
@@ -351,8 +340,7 @@ __osm_ni_rcv_get_node_desc(IN osm_sm_t * sm,
 			     IB_MAD_ATTR_NODE_DESC,
 			     0, CL_DISP_MSGID_NONE, &context);
 	if (status != IB_SUCCESS)
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_ni_rcv_get_node_desc: ERR 0D03: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D03: "
 			"Failure initiating NodeDescription request (%s)\n",
 			ib_get_err_str(status));
 
@@ -415,8 +403,7 @@ __osm_ni_rcv_process_existing_ca_or_router(IN osm_sm_t * sm,
 	 */
 	p_port = osm_get_port_by_guid(sm->p_subn, p_ni->port_guid);
 	if (!p_port) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_ni_rcv_process_existing_ca_or_router: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Creating new port object with GUID 0x%" PRIx64 "\n",
 			cl_ntoh64(p_ni->port_guid));
 
@@ -424,8 +411,7 @@ __osm_ni_rcv_process_existing_ca_or_router(IN osm_sm_t * sm,
 
 		p_port = osm_port_new(p_ni, p_node);
 		if (p_port == NULL) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_ni_rcv_process_existing_ca_or_router: ERR 0D04: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D04: "
 				"Unable to create new port object\n");
 			goto Exit;
 		}
@@ -442,8 +428,7 @@ __osm_ni_rcv_process_existing_ca_or_router(IN osm_sm_t * sm,
 			   We should never be here!
 			   Somehow, this port GUID already exists in the table.
 			 */
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_ni_rcv_process_existing_ca_or_router: ERR 0D12: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D12: "
 				"Port 0x%" PRIx64 " already in the database!\n",
 				cl_ntoh64(p_ni->port_guid));
 
@@ -485,8 +470,7 @@ __osm_ni_rcv_process_existing_ca_or_router(IN osm_sm_t * sm,
 			     cl_hton32(port_num), CL_DISP_MSGID_NONE, &context);
 
 	if (status != IB_SUCCESS)
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_ni_rcv_process_existing_ca_or_router: ERR 0D13: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D13: "
 			"Failure initiating PortInfo request (%s)\n",
 			ib_get_err_str(status));
 
@@ -523,8 +507,7 @@ __osm_ni_rcv_process_switch(IN osm_sm_t * sm,
 			     0, CL_DISP_MSGID_NONE, &context);
 	if (status != IB_SUCCESS)
 		/* continue despite error */
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_ni_rcv_process_switch: ERR 0D06: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D06: "
 			"Failure initiating SwitchInfo request (%s)\n",
 			ib_get_err_str(status));
 
@@ -553,8 +536,7 @@ __osm_ni_rcv_process_existing_switch(IN osm_sm_t * sm,
 		__osm_ni_rcv_process_switch(sm, p_node, p_madw);
 	else if (!p_node->sw || p_node->sw->discovery_count == 0) {
 		/* we don't have the SwitchInfo - retry to get it */
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_ni_rcv_process_existing_switch: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Retry to get SwitchInfo on node GUID:0x%"
 			PRIx64 "\n", cl_ntoh64(osm_node_get_node_guid(p_node)));
 		__osm_ni_rcv_process_switch(sm, p_node, p_madw);
@@ -614,8 +596,7 @@ __osm_ni_rcv_process_new(IN osm_sm_t * sm,
 
 	osm_dump_smp_dr_path(sm->p_log, p_smp, OSM_LOG_VERBOSE);
 
-	osm_log(sm->p_log, OSM_LOG_VERBOSE,
-		"__osm_ni_rcv_process_new: "
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 		"Discovered new %s node,"
 		"\n\t\t\t\tGUID 0x%" PRIx64 ", TID 0x%" PRIx64 "\n",
 		ib_get_node_type_str(p_ni->node_type),
@@ -623,8 +604,7 @@ __osm_ni_rcv_process_new(IN osm_sm_t * sm,
 
 	p_node = osm_node_new(p_madw);
 	if (p_node == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_ni_rcv_process_new: ERR 0D07: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D07: "
 			"Unable to create new node object\n");
 		goto Exit;
 	}
@@ -635,8 +615,7 @@ __osm_ni_rcv_process_new(IN osm_sm_t * sm,
 	 */
 	p_port = osm_port_new(p_ni, p_node);
 	if (p_port == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_ni_rcv_process_new: ERR 0D14: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D14: "
 			"Unable to create new port object\n");
 		osm_node_delete(&p_node);
 		goto Exit;
@@ -653,8 +632,7 @@ __osm_ni_rcv_process_new(IN osm_sm_t * sm,
 		   We should never be here!
 		   Somehow, this port GUID already exists in the table.
 		 */
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_ni_rcv_process_new: ERR 0D15: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D15: "
 			"Duplicate Port GUID 0x%" PRIx64
 			"! Found by the two directed routes:\n",
 			cl_ntoh64(p_ni->port_guid));
@@ -684,8 +662,7 @@ __osm_ni_rcv_process_new(IN osm_sm_t * sm,
 	   this would be elsewhere */
 	if (p_ni->node_type == IB_NODE_TYPE_ROUTER) {
 		if ((p_rtr = osm_router_new(p_port)) == NULL)
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_ni_rcv_process_new: ERR 0D1A: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D1A: "
 				"Unable to create new router object\n");
 		else {
 			p_rtr_guid_tbl = &sm->p_subn->rtr_guid_tbl;
@@ -694,8 +671,7 @@ __osm_ni_rcv_process_new(IN osm_sm_t * sm,
 							    p_ni->port_guid,
 							    &p_rtr->map_item);
 			if (p_rtr_check != p_rtr)
-				osm_log(sm->p_log, OSM_LOG_ERROR,
-					"__osm_ni_rcv_process_new: ERR 0D1B: "
+				OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D1B: "
 					"Unable to add port GUID:0x%016" PRIx64
 					" to router table\n",
 					cl_ntoh64(p_ni->port_guid));
@@ -712,8 +688,7 @@ __osm_ni_rcv_process_new(IN osm_sm_t * sm,
 		   We can simply clean-up, since the other thread will
 		   see this processing through to completion.
 		 */
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_ni_rcv_process_new: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Discovery race detected at node 0x%" PRIx64 "\n",
 			cl_ntoh64(p_ni->node_guid));
 		osm_node_delete(&p_node);
@@ -735,8 +710,7 @@ __osm_ni_rcv_process_new(IN osm_sm_t * sm,
 		__osm_ni_rcv_process_new_switch(sm, p_node, p_madw);
 		break;
 	default:
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_ni_rcv_process_new: ERR 0D16: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D16: "
 			"Unknown node type %u with GUID 0x%" PRIx64 "\n",
 			p_ni->node_type, cl_ntoh64(p_ni->node_guid));
 		break;
@@ -767,8 +741,7 @@ __osm_ni_rcv_process_existing(IN osm_sm_t * sm,
 	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,
-			"__osm_ni_rcv_process_existing: "
+		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),
@@ -793,8 +766,7 @@ __osm_ni_rcv_process_existing(IN osm_sm_t * sm,
 		break;
 
 	default:
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_ni_rcv_process_existing: ERR 0D09: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D09: "
 			"Unknown node type %u with GUID 0x%" PRIx64 "\n",
 			p_ni->node_type, cl_ntoh64(p_ni->node_guid));
 		break;
@@ -827,16 +799,14 @@ void osm_ni_rcv_process(IN void *context, IN void *data)
 	CL_ASSERT(p_smp->attr_id == IB_MAD_ATTR_NODE_INFO);
 
 	if (p_ni->node_guid == 0) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_ni_rcv_process: ERR 0D16: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D16: "
 			"Got Zero Node GUID! Found on the directed route:\n");
 		osm_dump_smp_dr_path(sm->p_log, p_smp, OSM_LOG_ERROR);
 		goto Exit;
 	}
 
 	if (p_ni->port_guid == 0) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_ni_rcv_process: ERR 0D17: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0D17: "
 			"Got Zero Port GUID! Found on the directed route:\n");
 		osm_dump_smp_dr_path(sm->p_log, p_smp, OSM_LOG_ERROR);
 		goto Exit;
diff --git a/opensm/opensm/osm_opensm.c b/opensm/opensm/osm_opensm.c
index 1760f22..aa7ded3 100644
--- a/opensm/opensm/osm_opensm.c
+++ b/opensm/opensm/osm_opensm.c
@@ -147,13 +147,12 @@ static int setup_routing_engine(osm_opensm_t * p_osm, const char *name)
 		if (!strcmp(r->name, name)) {
 			p_osm->routing_engine.name = r->name;
 			if (r->setup(p_osm)) {
-				osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-					"setup_routing_engine: setup of routing"
+				OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
+					"setup of routing"
 					" engine \'%s\' failed\n", name);
 				return -2;
 			}
-			osm_log(&p_osm->log, OSM_LOG_DEBUG,
-				"setup_routing_engine: "
+			OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
 				"\'%s\' routing engine set up\n",
 				p_osm->routing_engine.name);
 			return 0;
@@ -164,9 +163,8 @@ static int setup_routing_engine(osm_opensm_t * p_osm, const char *name)
 
 static int osm_ucast_null_setup(osm_opensm_t * p_osm)
 {
-	osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-		"osm_ucast_null_setup: nothing yet - "
-		"using default (minhop) routing engine\n");
+	OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
+		"nothing yet - using default (minhop) routing engine\n");
 	return 0;
 }
 
@@ -276,7 +274,7 @@ osm_opensm_init(IN osm_opensm_t * const p_osm,
 	/* Write the OSM_VERSION to the SYS_LOG */
 	osm_log(&p_osm->log, OSM_LOG_SYS, "%s\n", OSM_VERSION);	/* Format Waived */
 
-	osm_log(&p_osm->log, OSM_LOG_FUNCS, "osm_opensm_init: [\n");	/* Format Waived */
+	OSM_LOG(&p_osm->log, OSM_LOG_FUNCS, "[\n");	/* Format Waived */
 
 	status = cl_plock_init(&p_osm->lock);
 	if (status != IB_SUCCESS)
@@ -292,8 +290,8 @@ osm_opensm_init(IN osm_opensm_t * const p_osm,
 #endif
 
 	if (p_opt->single_thread) {
-		osm_log(&p_osm->log, OSM_LOG_INFO,
-			"osm_opensm_init: Forcing single threaded dispatcher\n");
+		OSM_LOG(&p_osm->log, OSM_LOG_INFO,
+			"Forcing single threaded dispatcher\n");
 		status = cl_disp_init(&p_osm->disp, 1, "opensm");
 	} else {
 		/*
@@ -373,8 +371,8 @@ osm_opensm_init(IN osm_opensm_t * const p_osm,
 
 	if (p_opt->routing_engine_name &&
 	    setup_routing_engine(p_osm, p_opt->routing_engine_name))
-		osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-			"osm_opensm_init: cannot find or setup routing engine"
+		OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
+			"cannot find or setup routing engine"
 			" \'%s\'. Default will be used instead\n",
 			p_opt->routing_engine_name);
 
@@ -383,7 +381,7 @@ osm_opensm_init(IN osm_opensm_t * const p_osm,
 	p_osm->node_name_map = open_node_name_map(p_opt->node_name_map_name);
 
 Exit:
-	osm_log(&p_osm->log, OSM_LOG_FUNCS, "osm_opensm_init: ]\n");	/* Format Waived */
+	OSM_LOG(&p_osm->log, OSM_LOG_FUNCS, "]\n");	/* Format Waived */
 	return (status);
 }
 
diff --git a/opensm/opensm/osm_perfmgr.c b/opensm/opensm/osm_perfmgr.c
index 74fc2e8..c1c620c 100644
--- a/opensm/opensm/osm_perfmgr.c
+++ b/opensm/opensm/osm_perfmgr.c
@@ -183,8 +183,7 @@ osm_perfmgr_mad_recv_callback(osm_madw_t * p_madw, void *bind_context,
 	/* post this message for later processing. */
 	if (cl_disp_post(pm->pc_disp_h, OSM_MSG_MAD_PORT_COUNTERS,
 			 (void *)p_madw, NULL, NULL) != CL_SUCCESS) {
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"osm_perfmgr_mad_recv_callback: ERR 4C01: "
+		OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C01: "
 			"PerfMgr Dispatcher post failed\n");
 		osm_mad_pool_put(pm->mad_pool, p_madw);
 	}
@@ -211,16 +210,14 @@ osm_perfmgr_mad_send_err_callback(void *bind_context, osm_madw_t * p_madw)
 	 */
 	if ((p_node = cl_qmap_get(&(pm->monitored_map), node_guid)) ==
 	    cl_qmap_end(&(pm->monitored_map))) {
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"osm_pc_rcv_process: ERR 4C15: GUID 0x%016"
+		OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C15: GUID 0x%016"
 			PRIx64 " not found in monitored map\n",
 			node_guid);
 		goto Exit;
 	}
 	p_mon_node = (__monitored_node_t *) p_node;
 
-	osm_log(pm->log, OSM_LOG_ERROR,
-		"osm_perfmgr_mad_send_err_callback: ERR 4C02: %s (0x%" PRIx64
+	OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C02: %s (0x%" PRIx64
 		") port %d\n", p_mon_node->name, p_mon_node->guid, port);
 
 	if (pm->subn->opt.perfmgr_redir && p_madw->status == IB_TIMEOUT) {
@@ -229,8 +226,8 @@ osm_perfmgr_mad_send_err_callback(void *bind_context, osm_madw_t * p_madw)
 		/* Now, validate port number */
 		if (port > p_mon_node->redir_tbl_size) {
 			cl_plock_release(pm->lock);
-			osm_log(pm->log, OSM_LOG_ERROR,
-				"osm_perfmgr_mad_send_err_callback: ERR 4C16: Invalid port num %d for %s (GUID 0x%016"
+			OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C16: "
+				"Invalid port num %d for %s (GUID 0x%016"
 				PRIx64 ") num ports %d\n", port, p_mon_node->name,
 				p_mon_node->guid, p_mon_node->redir_tbl_size);
 			goto Exit;
@@ -261,8 +258,8 @@ osm_perfmgr_bind(osm_perfmgr_t * const pm, const ib_net64_t port_guid)
 	OSM_LOG_ENTER(pm->log);
 
 	if (pm->bind_handle != OSM_BIND_INVALID_HANDLE) {
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"osm_perfmgr_bind: ERR 4C03: Multiple binds not allowed\n");
+		OSM_LOG(pm->log, OSM_LOG_ERROR,
+			"ERR 4C03: Multiple binds not allowed\n");
 		status = IB_ERROR;
 		goto Exit;
 	}
@@ -276,8 +273,7 @@ osm_perfmgr_bind(osm_perfmgr_t * const pm, const ib_net64_t port_guid)
 	bind_info.recv_q_size = OSM_PM_DEFAULT_QP1_RCV_SIZE;
 	bind_info.send_q_size = OSM_PM_DEFAULT_QP1_SEND_SIZE;
 
-	osm_log(pm->log, OSM_LOG_VERBOSE,
-		"osm_perfmgr_bind: "
+	OSM_LOG(pm->log, OSM_LOG_VERBOSE,
 		"Binding to port GUID 0x%" PRIx64 "\n", cl_ntoh64(port_guid));
 
 	pm->bind_handle = osm_vendor_bind(pm->vendor,
@@ -289,8 +285,8 @@ osm_perfmgr_bind(osm_perfmgr_t * const pm, const ib_net64_t port_guid)
 
 	if (pm->bind_handle == OSM_BIND_INVALID_HANDLE) {
 		status = IB_ERROR;
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"osm_perfmgr_bind: ERR 4C04: Vendor specific bind failed (%s)\n",
+		OSM_LOG(pm->log, OSM_LOG_ERROR,
+			"ERR 4C04: Vendor specific bind failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
 	}
@@ -307,8 +303,7 @@ static void osm_perfmgr_mad_unbind(osm_perfmgr_t * const pm)
 {
 	OSM_LOG_ENTER(pm->log);
 	if (pm->bind_handle == OSM_BIND_INVALID_HANDLE) {
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"osm_perfmgr_mad_unbind: ERR 4C05: No previous bind\n");
+		OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C05: No previous bind\n");
 		goto Exit;
 	}
 	osm_vendor_unbind(pm->bind_handle);
@@ -446,8 +441,8 @@ static void __collect_guids(cl_map_item_t * const p_map_item, void *context)
 		size = node->node_info.num_ports;
 		mon_node = malloc(sizeof(*mon_node) + sizeof(redir_t) * size);
 		if (!mon_node) {
-			osm_log(pm->log, OSM_LOG_ERROR,
-				"PerfMgr: __collect_guids ERR 4C06: malloc failed: not handling node %s"
+			OSM_LOG(pm->log, OSM_LOG_ERROR, "PerfMgr: ERR 4C06: "
+				"malloc failed: not handling node %s"
 				"(GUID 0x%" PRIx64 ")\n", node->print_desc, node_guid);
 			goto Exit;
 		}
@@ -484,9 +479,8 @@ __osm_perfmgr_query_counters(cl_map_item_t * const p_map_item, void *context)
 	cl_plock_acquire(pm->lock);
 	node = osm_get_node_by_guid(pm->subn, cl_hton64(mon_node->guid));
 	if (!node) {
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"__osm_perfmgr_query_counters: ERR 4C07: Node \"%s\" (guid 0x%"
-			PRIx64
+		OSM_LOG(pm->log, OSM_LOG_ERROR,
+			"ERR 4C07: Node \"%s\" (guid 0x%" PRIx64
 			") no longer exists so removing from PerfMgr monitoring\n",
 			mon_node->name, mon_node->guid);
 		__mark_for_removal(pm, mon_node);
@@ -500,8 +494,8 @@ __osm_perfmgr_query_counters(cl_map_item_t * const p_map_item, void *context)
 	if (perfmgr_db_create_entry(pm->db, node_guid, num_ports,
 				    node->print_desc) !=
 	    PERFMGR_EVENT_DB_SUCCESS) {
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"__osm_perfmgr_query_counters: ERR 4C08: DB create entry failed for 0x%"
+		OSM_LOG(pm->log, OSM_LOG_ERROR,
+			"ERR 4C08: DB create entry failed for 0x%"
 			PRIx64 " (%s) : %s\n", node_guid, node->print_desc,
 			strerror(errno));
 		goto Exit;
@@ -522,8 +516,7 @@ __osm_perfmgr_query_counters(cl_map_item_t * const p_map_item, void *context)
 
 		lid = get_lid(node, port, mon_node);
 		if (lid == 0) {
-			osm_log(pm->log, OSM_LOG_DEBUG,
-				"__osm_perfmgr_query_counters: WARN: node 0x%" PRIx64
+			OSM_LOG(pm->log, OSM_LOG_DEBUG, "WARN: node 0x%" PRIx64
 				" port %d (%s): port out of range, skipping\n",
 				cl_ntoh64(node->node_info.node_guid), port,
 				node->print_desc);
@@ -538,16 +531,15 @@ __osm_perfmgr_query_counters(cl_map_item_t * const p_map_item, void *context)
 #if ENABLE_OSM_PERF_MGR_PROFILE
 		gettimeofday(&(mad_context.perfmgr_context.query_start), NULL);
 #endif
-		osm_log(pm->log, OSM_LOG_VERBOSE,
-			"__osm_perfmgr_query_counters: Getting stats for node 0x%"
+		OSM_LOG(pm->log, OSM_LOG_VERBOSE, "Getting stats for node 0x%"
 			PRIx64 " port %d (lid %X) (%s)\n", node_guid, port,
 			cl_ntoh16(lid), node->print_desc);
 		status =
 		    osm_perfmgr_send_pc_mad(pm, lid, remote_qp, port,
 					    IB_MAD_METHOD_GET, &mad_context);
 		if (status != IB_SUCCESS)
-			osm_log(pm->log, OSM_LOG_ERROR,
-				"__osm_perfmgr_query_counters: ERR 4C09: Failed to issue port counter query for node 0x%"
+			OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C09: "
+				"Failed to issue port counter query for node 0x%"
 				PRIx64 " port %d (%s)\n",
 				node->node_info.node_guid, port,
 				node->print_desc);
@@ -583,16 +575,16 @@ static int sweep_hop_1(osm_sm_t * sm)
 
 	p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 	if (!p_port) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"sweep_hop_1: ERR 4C81: No SM port object\n");
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+			"ERR 4C81: No SM port object\n");
 		return -1;
 	}
 
 	p_node = p_port->p_node;
 	port_num = ib_node_info_get_local_port_num(&p_node->node_info);
 
-	osm_log(sm->p_log, OSM_LOG_DEBUG,
-		"sweep_hop_1: Probing hop 1 on local port %u\n", port_num);
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
+		"Probing hop 1 on local port %u\n", port_num);
 
 	p_physp = osm_node_get_physp_ptr(p_node, port_num);
 
@@ -621,8 +613,7 @@ static int sweep_hop_1(osm_sm_t * sm)
 				     CL_DISP_MSGID_NONE, &context);
 
 		if (status != IB_SUCCESS)
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"sweep_hop_1: ERR 4C82: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 4C82: "
 				"Request for NodeInfo failed\n");
 		break;
 
@@ -655,15 +646,14 @@ static int sweep_hop_1(osm_sm_t * sm)
 					     CL_DISP_MSGID_NONE, &context);
 
 			if (status != IB_SUCCESS)
-				osm_log(sm->p_log, OSM_LOG_ERROR,
-					"sweep_hop_1: ERR 4C82: "
+				OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 4C82: "
 					"Request for NodeInfo failed\n");
 		}
 		break;
 
 	default:
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"sweep_hop_1: ERR 4C83: Unknown node type %d\n",
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+			"ERR 4C83: Unknown node type %d\n",
 			osm_node_get_type(p_node));
 	}
 
@@ -683,8 +673,7 @@ static unsigned is_sm_port_down(osm_sm_t * const sm)
 	p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 	if (!p_port) {
 		CL_PLOCK_RELEASE(sm->p_lock);
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"is_sm_port_down: ERR 4C85: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 4C85: "
 			"SM port with GUID:%016" PRIx64 " is unknown\n",
 			cl_ntoh64(port_guid));
 		return 1;
@@ -705,8 +694,7 @@ static int sweep_hop_0(osm_sm_t * const sm)
 
 	h_bind = osm_sm_mad_ctrl_get_bind_handle(&sm->mad_ctrl);
 	if (h_bind == OSM_BIND_INVALID_HANDLE) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"sweep_hop_0: No bound ports.\n");
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG, "No bound ports.\n");
 		return -1;
 	}
 
@@ -715,8 +703,8 @@ static int sweep_hop_0(osm_sm_t * const sm)
 			     CL_DISP_MSGID_NONE, NULL);
 
 	if (status != IB_SUCCESS)
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"sweep_hop_0: ERR 4C86: Request for NodeInfo failed\n");
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+			"ERR 4C86: Request for NodeInfo failed\n");
 
 	return (status);
 }
@@ -760,7 +748,7 @@ static int perfmgr_discovery(osm_opensm_t * osm)
 		goto _exit;
 
 	if (is_sm_port_down(&osm->sm)) {
-		osm_log(&osm->log, OSM_LOG_VERBOSE, "SM port is down\n");
+		OSM_LOG(&osm->log, OSM_LOG_VERBOSE, "SM port is down\n");
 		goto _drop;
 	}
 
@@ -804,7 +792,7 @@ void osm_perfmgr_process(osm_perfmgr_t * pm)
 	/* FIXME we should be able to track SA notices
 	 * and not have to sweep the node_guid_tbl each pass
 	 */
-	osm_log(pm->log, OSM_LOG_VERBOSE, "Gathering PerfMgr stats\n");
+	OSM_LOG(pm->log, OSM_LOG_VERBOSE, "Gathering PerfMgr stats\n");
 	cl_plock_acquire(pm->lock);
 	cl_qmap_apply_func(&(pm->subn->node_guid_tbl),
 			   __collect_guids, (void *)pm);
@@ -893,8 +881,7 @@ osm_perfmgr_check_oob_clear(osm_perfmgr_t * pm, __monitored_node_t *mon_node,
 
 	if (perfmgr_db_get_prev_err(pm->db, mon_node->guid, port, &prev_err)
 	    != PERFMGR_EVENT_DB_SUCCESS) {
-		osm_log(pm->log, OSM_LOG_VERBOSE,
-			"osm_perfmgr_check_oob_clear: Failed to find previous "
+		OSM_LOG(pm->log, OSM_LOG_VERBOSE, "Failed to find previous "
 			"error reading for %s (guid 0x%" PRIx64 ") port %u\n",
 			mon_node->name, mon_node->guid, port);
 		return;
@@ -912,8 +899,8 @@ osm_perfmgr_check_oob_clear(osm_perfmgr_t * pm, __monitored_node_t *mon_node,
 	    cr->link_integrity < prev_err.link_integrity ||
 	    cr->buffer_overrun < prev_err.buffer_overrun ||
 	    cr->vl15_dropped < prev_err.vl15_dropped) {
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"PerfMgr: ERR 4C0A: Detected an out of band error clear "
+		OSM_LOG(pm->log, OSM_LOG_ERROR, "PerfMgr: ERR 4C0A: "
+			"Detected an out of band error clear "
 			"on %s (0x%" PRIx64 ") port %u\n",
 			mon_node->name, mon_node->guid, port);
 		perfmgr_db_clear_prev_err(pm->db, mon_node->guid, port);
@@ -922,8 +909,8 @@ osm_perfmgr_check_oob_clear(osm_perfmgr_t * pm, __monitored_node_t *mon_node,
 	/* FIXME handle extended counters */
 	if (perfmgr_db_get_prev_dc(pm->db, mon_node->guid, port, &prev_dc)
 	    != PERFMGR_EVENT_DB_SUCCESS) {
-		osm_log(pm->log, OSM_LOG_VERBOSE,
-			"osm_perfmgr_check_oob_clear: Failed to find previous data count "
+		OSM_LOG(pm->log, OSM_LOG_VERBOSE,
+			"Failed to find previous data count "
 			"reading for %s (0x%" PRIx64 ") port %u\n",
 			mon_node->name, mon_node->guid, port);
 		return;
@@ -933,7 +920,7 @@ osm_perfmgr_check_oob_clear(osm_perfmgr_t * pm, __monitored_node_t *mon_node,
 	    dc->rcv_data < prev_dc.rcv_data ||
 	    dc->xmit_pkts < prev_dc.xmit_pkts ||
 	    dc->rcv_pkts < prev_dc.rcv_pkts) {
-		osm_log(pm->log, OSM_LOG_ERROR,
+		OSM_LOG(pm->log, OSM_LOG_ERROR,
 			"PerfMgr: ERR 4C0B: Detected an out of band data counter "
 			"clear on node %s (0x%" PRIx64 ") port %u\n",
 			mon_node->name, mon_node->guid, port);
@@ -1007,8 +994,8 @@ osm_perfmgr_check_overflow(osm_perfmgr_t * pm, __monitored_node_t *mon_node,
 		lid = get_lid(p_node, port, mon_node);
 		cl_plock_release(pm->lock);
 		if (lid == 0) {
-			osm_log(pm->log, OSM_LOG_ERROR,
-				"PerfMgr: ERR 4C0C: Failed to clear counters for %s (0x%"
+			OSM_LOG(pm->log, OSM_LOG_ERROR, "PerfMgr: ERR 4C0C: "
+				"Failed to clear counters for %s (0x%"
 				PRIx64 ") port %d; failed to get lid\n",
 				mon_node->name, mon_node->guid, port);
 			goto Exit;
@@ -1024,8 +1011,8 @@ osm_perfmgr_check_overflow(osm_perfmgr_t * pm, __monitored_node_t *mon_node,
 		    osm_perfmgr_send_pc_mad(pm, lid, remote_qp, port,
 					    IB_MAD_METHOD_SET, &mad_context);
 		if (status != IB_SUCCESS)
-			osm_log(pm->log, OSM_LOG_ERROR,
-				"PerfMgr: ERR 4C11: Failed to send clear counters MAD for %s (0x%"
+			OSM_LOG(pm->log, OSM_LOG_ERROR, "PerfMgr: ERR 4C11: "
+				"Failed to send clear counters MAD for %s (0x%"
 				PRIx64 ") port %d\n",
 				mon_node->name, mon_node->guid, port);
 
@@ -1049,8 +1036,7 @@ osm_perfmgr_log_events(osm_perfmgr_t * pm, __monitored_node_t *mon_node, uint8_t
 	    perfmgr_db_get_prev_err(pm->db, mon_node->guid, port, &prev_read);
 
 	if (err != PERFMGR_EVENT_DB_SUCCESS) {
-		osm_log(pm->log, OSM_LOG_VERBOSE,
-			"osm_perfmgr_log_events: Failed to find previous "
+		OSM_LOG(pm->log, OSM_LOG_VERBOSE, "Failed to find previous "
 			"reading for %s (0x%" PRIx64 ") port %u\n",
 			mon_node->name, mon_node->guid, port);
 		return;
@@ -1060,24 +1046,21 @@ osm_perfmgr_log_events(osm_perfmgr_t * pm, __monitored_node_t *mon_node, uint8_t
 	/* FIXME these events should be defineable by the user in a config
 	 * file somewhere. */
 	if (reading->symbol_err_cnt > prev_read.symbol_err_cnt)
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"osm_perfmgr_log_events: ERR 4C0D: "
+		OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C0D: "
 			"Found %" PRIu64 " Symbol errors in %lu sec on %s (0x%"
 			PRIx64 ") port %u\n",
 			(reading->symbol_err_cnt - prev_read.symbol_err_cnt),
 			time_diff, mon_node->name, mon_node->guid, port);
 
 	if (reading->rcv_err > prev_read.rcv_err)
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"osm_perfmgr_log_events: ERR 4C0E: "
+		OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C0E: "
 			"Found %" PRIu64
 			" Receive errors in %lu sec on %s (0x%" PRIx64
 			") port %u\n", (reading->rcv_err - prev_read.rcv_err),
 			time_diff, mon_node->name, mon_node->guid, port);
 
 	if (reading->xmit_discards > prev_read.xmit_discards)
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"osm_perfmgr_log_events: ERR 4C0F: "
+		OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C0F: "
 			"Found %" PRIu64 " Xmit Discards in %lu sec on %s (0x%"
 			PRIx64 ") port %u\n",
 			(reading->xmit_discards - prev_read.xmit_discards),
@@ -1111,16 +1094,15 @@ static void osm_pc_rcv_process(void *context, void *data)
 	 */
 	if ((p_node = cl_qmap_get(&(pm->monitored_map), node_guid)) ==
 	    cl_qmap_end(&(pm->monitored_map))) {
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"osm_pc_rcv_process: ERR 4C12: GUID 0x%016"
+		OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C12: GUID 0x%016"
 			PRIx64 " not found in monitored map\n",
 			node_guid);
 		goto Exit;
 	}
 	p_mon_node = (__monitored_node_t *) p_node;
 
-	osm_log(pm->log, OSM_LOG_VERBOSE,
-		"osm_pc_rcv_process: Processing received MAD status 0x%x context 0x%"
+	OSM_LOG(pm->log, OSM_LOG_VERBOSE,
+		"Processing received MAD status 0x%x context 0x%"
 		PRIx64 " port %u\n", p_mad->status, node_guid, port);
 
 	/* Response could also be redirection (IBM eHCA PMA does this) */
@@ -1131,8 +1113,8 @@ static void osm_pc_rcv_process(void *context, void *data)
 		    (osm_madw_get_perfmgt_mad_ptr(p_madw)->data);
 		ib_api_status_t status;
 
-		osm_log(pm->log, OSM_LOG_VERBOSE,
-			"osm_pc_rcv_process: Redirection to LID 0x%x "
+		OSM_LOG(pm->log, OSM_LOG_VERBOSE,
+			"Redirection to LID 0x%x "
 			"GID 0x%016" PRIx64 " : 0x%016" PRIx64
 			" QP 0x%x received\n",
 			cl_ntoh16(cpi->redir_lid),
@@ -1143,14 +1125,14 @@ static void osm_pc_rcv_process(void *context, void *data)
 		/* LID or GID redirection ? */
 		/* For GID redirection, need to get PathRecord from SA */
 		if (cpi->redir_lid == 0) {
-			osm_log(pm->log, OSM_LOG_VERBOSE,
-				"osm_pc_rcv_process: GID redirection not currently implemented!\n");
+			OSM_LOG(pm->log, OSM_LOG_VERBOSE,
+				"GID redirection not currently implemented!\n");
 			goto Exit;
 		}
 
 		if (!pm->subn->opt.perfmgr_redir) {
-				osm_log(pm->log, OSM_LOG_ERROR,
-				       "osm_pc_rcv_process: ERR 4C16: redirection requested but disabled\n");
+				OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C16: "
+				       "redirection requested but disabled\n");
 			goto Exit;
 		}
 
@@ -1159,8 +1141,8 @@ static void osm_pc_rcv_process(void *context, void *data)
 		/* Now, validate port number */
 		if (port > p_mon_node->redir_tbl_size) {
 			cl_plock_release(pm->lock);
-			osm_log(pm->log, OSM_LOG_ERROR,
-				"osm_pc_rcv_process: ERR 4C13: Invalid port num %d for GUID 0x%016"
+			OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C13: "
+				"Invalid port num %d for GUID 0x%016"
 				PRIx64 " num ports %d\n", port, node_guid,
 				p_mon_node->redir_tbl_size);
 			goto Exit;
@@ -1176,8 +1158,8 @@ static void osm_pc_rcv_process(void *context, void *data)
 					    mad_context->perfmgr_context.
 					    mad_method, mad_context);
 		if (status != IB_SUCCESS)
-			osm_log(pm->log, OSM_LOG_ERROR,
-				"osm_pc_rcv_process: ERR 4C14: Failed to send redirected MAD with method 0x%x for node 0x%"
+			OSM_LOG(pm->log, OSM_LOG_ERROR, "ERR 4C14: "
+				"Failed to send redirected MAD with method 0x%x for node 0x%"
 				PRIx64 " port %d\n",
 				mad_context->perfmgr_context.mad_method,
 				node_guid, port);
@@ -1247,7 +1229,7 @@ osm_perfmgr_init(osm_perfmgr_t * const pm,
 
 	OSM_LOG_ENTER(log);
 
-	osm_log(log, OSM_LOG_VERBOSE, "Initializing PerfMgr\n");
+	OSM_LOG(log, OSM_LOG_VERBOSE, "Initializing PerfMgr\n");
 
 	memset(pm, 0, sizeof(*pm));
 
@@ -1309,8 +1291,7 @@ void osm_perfmgr_clear_counters(osm_perfmgr_t * pm)
 void osm_perfmgr_dump_counters(osm_perfmgr_t * pm, perfmgr_db_dump_t dump_type)
 {
 	if (perfmgr_db_dump(pm->db, pm->event_db_dump_file, dump_type) != 0)
-		osm_log(pm->log, OSM_LOG_ERROR,
-			"PB dump port counters: ERR 4C10: Failed to dump file %s : %s",
+		OSM_LOG(pm->log, OSM_LOG_ERROR, "Failed to dump file %s : %s",
 			pm->event_db_dump_file, strerror(errno));
 }
 
diff --git a/opensm/opensm/osm_pkey.c b/opensm/opensm/osm_pkey.c
index d7a695b..9b43669 100644
--- a/opensm/opensm/osm_pkey.c
+++ b/opensm/opensm/osm_pkey.c
@@ -478,14 +478,12 @@ osm_physp_has_pkey(IN osm_log_t * p_log,
 
 	OSM_LOG_ENTER(p_log);
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osm_physp_has_pkey: "
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
 		"Search for PKey: 0x%4x\n", cl_ntoh16(pkey));
 
 	/* if the pkey given is an invalid pkey - return TRUE. */
 	if (ib_pkey_is_invalid(pkey)) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"osm_physp_has_pkey: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"Given invalid PKey - we treat it loosely and allow it\n");
 		res = TRUE;
 		goto Exit;
@@ -498,12 +496,10 @@ osm_physp_has_pkey(IN osm_log_t * p_log,
 	p_pkey = cl_map_get(&pkey_tbl->keys, pkey_base);
 	if (p_pkey) {
 		res = TRUE;
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"osm_physp_has_pkey: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"PKey 0x%04x was found\n", cl_ntoh16(pkey));
 	} else {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"osm_physp_has_pkey: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"PKey 0x%04x was not found\n", cl_ntoh16(pkey));
 	}
 
diff --git a/opensm/opensm/osm_pkey_mgr.c b/opensm/opensm/osm_pkey_mgr.c
index 39b8ac5..0e94df4 100644
--- a/opensm/opensm/osm_pkey_mgr.c
+++ b/opensm/opensm/osm_pkey_mgr.c
@@ -100,8 +100,7 @@ pkey_mgr_process_physical_port(IN osm_log_t * p_log,
 	p_pkey_tbl = &p_physp->pkeys;
 	p_pending = (osm_pending_pkey_t *) malloc(sizeof(osm_pending_pkey_t));
 	if (!p_pending) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"pkey_mgr_process_physical_port: ERR 0502: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0502: "
 			"Failed to allocate new pending pkey entry for node "
 			"0x%016" PRIx64 " port %u\n",
 			cl_ntoh64(osm_node_get_node_guid(p_node)),
@@ -123,8 +122,7 @@ pkey_mgr_process_physical_port(IN osm_log_t * p_log,
 						   &p_pending->block,
 						   &p_pending->index) !=
 		    IB_SUCCESS) {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"pkey_mgr_process_physical_port: ERR 0503: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0503: "
 				"Failed to obtain P_Key 0x%04x block and index for node "
 				"0x%016" PRIx64 " port %u\n",
 				ib_pkey_get_base(pkey),
@@ -137,10 +135,8 @@ pkey_mgr_process_physical_port(IN osm_log_t * p_log,
 		stat = "updated";
 	}
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"pkey_mgr_process_physical_port: "
-		"pkey 0x%04x was %s for node 0x%016" PRIx64
-		" port %u\n",
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
+		"pkey 0x%04x was %s for node 0x%016" PRIx64 " port %u\n",
 		cl_ntoh16(pkey), stat,
 		cl_ntoh64(osm_node_get_node_guid(p_node)),
 		osm_physp_get_port_num(p_physp));
@@ -211,8 +207,7 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log, osm_sm_t * sm,
 	p_pi = &p_physp->port_info;
 
 	if ((p_pi->vl_enforce & 0xc) == (0xc) * (enforce == TRUE)) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"pkey_mgr_enforce_partition: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"No need to update PortInfo for "
 			"node 0x%016" PRIx64 " port %u\n",
 			cl_ntoh64(osm_node_get_node_guid
@@ -246,8 +241,7 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log, osm_sm_t * sm,
 			     cl_hton32(osm_physp_get_port_num(p_physp)),
 			     CL_DISP_MSGID_NONE, &context);
 	if (status != IB_SUCCESS) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"pkey_mgr_enforce_partition: ERR 0511: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0511: "
 			"Failed to set PortInfo for "
 			"node 0x%016" PRIx64 " port %u\n",
 			cl_ntoh64(osm_node_get_node_guid
@@ -255,10 +249,8 @@ pkey_mgr_enforce_partition(IN osm_log_t * p_log, osm_sm_t * sm,
 			osm_physp_get_port_num(p_physp));
 		return FALSE;
 	} else {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"pkey_mgr_enforce_partition: "
-			"Set PortInfo for "
-			"node 0x%016" PRIx64 " port %u\n",
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
+			"Set PortInfo for node 0x%016" PRIx64 " port %u\n",
 			cl_ntoh64(osm_node_get_node_guid
 				  (osm_physp_get_node_ptr(p_physp))),
 			osm_physp_get_port_num(p_physp));
@@ -299,8 +291,7 @@ static boolean_t pkey_mgr_update_port(osm_log_t * p_log, osm_sm_t * sm,
 	max_num_of_blocks =
 	    pkey_mgr_get_physp_max_blocks(sm->p_subn, p_physp);
 	if (p_pkey_tbl->max_blocks > max_num_of_blocks) {
-		osm_log(p_log, OSM_LOG_INFO,
-			"pkey_mgr_update_port: "
+		OSM_LOG(p_log, OSM_LOG_INFO,
 			"Max number of blocks reduced from %u to %u "
 			"for node 0x%016" PRIx64 " port %u\n",
 			p_pkey_tbl->max_blocks, max_num_of_blocks,
@@ -329,8 +320,7 @@ static boolean_t pkey_mgr_update_port(osm_log_t * p_log, osm_sm_t * sm,
 							      &last_free_block_index,
 							      &last_free_pkey_index);
 			if (!found) {
-				osm_log(p_log, OSM_LOG_ERROR,
-					"pkey_mgr_update_port: ERR 0504: "
+				OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0504: "
 					"Failed to find empty space for new pkey 0x%04x "
 					"for node 0x%016" PRIx64 " port %u\n",
 					cl_ntoh16(p_pending->pkey),
@@ -348,8 +338,7 @@ static boolean_t pkey_mgr_update_port(osm_log_t * p_log, osm_sm_t * sm,
 			    osm_pkey_tbl_set_new_entry(p_pkey_tbl, block_index,
 						       pkey_index,
 						       p_pending->pkey)) {
-				osm_log(p_log, OSM_LOG_ERROR,
-					"pkey_mgr_update_port: ERR 0505: "
+				OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0505: "
 					"Failed to set PKey 0x%04x in block %u idx %u "
 					"for node 0x%016" PRIx64 " port %u\n",
 					cl_ntoh16(p_pending->pkey), block_index,
@@ -379,17 +368,14 @@ static boolean_t pkey_mgr_update_port(osm_log_t * p_log, osm_sm_t * sm,
 		    pkey_mgr_update_pkey_entry(sm, p_physp, new_block,
 					       block_index);
 		if (status == IB_SUCCESS) {
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"pkey_mgr_update_port: "
-				"Updated "
-				"pkey table block %d for node 0x%016" PRIx64
-				" port %u\n", block_index,
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
+				"Updated pkey table block %d for node 0x%016"
+				PRIx64 " port %u\n", block_index,
 				cl_ntoh64(osm_node_get_node_guid(p_node)),
 				osm_physp_get_port_num(p_physp));
 			ret_val = TRUE;
 		} else {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"pkey_mgr_update_port: ERR 0506: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0506: "
 				"pkey_mgr_update_pkey_entry() failed to update "
 				"pkey table block %d for node 0x%016" PRIx64
 				" port %u\n", block_index,
@@ -438,8 +424,7 @@ pkey_mgr_update_peer_port(osm_log_t * p_log, osm_sm_t * sm,
 	num_of_blocks = osm_pkey_tbl_get_num_blocks(p_pkey_tbl);
 	peer_max_blocks = pkey_mgr_get_physp_max_blocks(p_subn, peer);
 	if (peer_max_blocks < p_pkey_tbl->used_blocks) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"pkey_mgr_update_peer_port: ERR 0508: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0508: "
 			"Not enough pkey entries (%u < %u) on switch 0x%016"
 			PRIx64 " port %u. Clearing Enforcement bit\n",
 			peer_max_blocks, num_of_blocks,
@@ -471,8 +456,7 @@ pkey_mgr_update_peer_port(osm_log_t * p_log, osm_sm_t * sm,
 			if (status == IB_SUCCESS)
 				ret_val = TRUE;
 			else
-				osm_log(p_log, OSM_LOG_ERROR,
-					"pkey_mgr_update_peer_port: ERR 0509: "
+				OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0509: "
 					"pkey_mgr_update_pkey_entry() failed to update "
 					"pkey table block %d for node 0x%016"
 					PRIx64 " port %u\n", block_index,
@@ -483,8 +467,7 @@ 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)) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"pkey_mgr_update_peer_port: "
+		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)),
@@ -513,8 +496,7 @@ osm_signal_t osm_pkey_mgr_process(IN osm_opensm_t * p_osm)
 	CL_PLOCK_EXCL_ACQUIRE(&p_osm->lock);
 
 	if (osm_prtn_make_partitions(&p_osm->log, &p_osm->subn) != IB_SUCCESS) {
-		osm_log(&p_osm->log, OSM_LOG_ERROR,
-			"osm_pkey_mgr_process: ERR 0510: "
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR, "ERR 0510: "
 			"osm_prtn_make_partitions() failed\n");
 		goto _err;
 	}
diff --git a/opensm/opensm/osm_pkey_rcv.c b/opensm/opensm/osm_pkey_rcv.c
index a69106f..db9ab99 100644
--- a/opensm/opensm/osm_pkey_rcv.c
+++ b/opensm/opensm/osm_pkey_rcv.c
@@ -87,8 +87,7 @@ void osm_pkey_rcv_process(IN void *context, IN void *data)
 	cl_plock_excl_acquire(sm->p_lock);
 	p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 	if (!p_port) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_pkey_rcv_process: ERR 4806: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 4806: "
 			"No port object for port with GUID 0x%" PRIx64
 			"\n\t\t\t\tfor parent node GUID 0x%" PRIx64
 			", TID 0x%" PRIx64 "\n",
@@ -117,8 +116,7 @@ void osm_pkey_rcv_process(IN void *context, IN void *data)
 	   update the subnet.
 	 */
 	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE)) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"osm_pkey_rcv_process: "
+		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),
@@ -130,8 +128,7 @@ void osm_pkey_rcv_process(IN void *context, IN void *data)
 	   If so, ignore it.
 	 */
 	if (!p_physp) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_pkey_rcv_process: ERR 4807: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 4807: "
 			"Got invalid port number 0x%X\n", port_num);
 		goto Exit;
 	}
diff --git a/opensm/opensm/osm_port.c b/opensm/opensm/osm_port.c
index 579f797..3317cb5 100644
--- a/opensm/opensm/osm_port.c
+++ b/opensm/opensm/osm_port.c
@@ -326,8 +326,7 @@ osm_physp_calc_link_mtu(IN osm_log_t * p_log, IN const osm_physp_t * p_physp)
 		    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,
-				"osm_physp_calc_link_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
@@ -340,8 +339,7 @@ osm_physp_calc_link_mtu(IN osm_log_t * p_log, IN const osm_physp_t * p_physp)
 				mtu = remote_mtu;
 
 			if (osm_log_is_active(p_log, OSM_LOG_VERBOSE))
-				osm_log(p_log, OSM_LOG_VERBOSE,
-					"osm_physp_calc_link_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
@@ -359,8 +357,7 @@ osm_physp_calc_link_mtu(IN osm_log_t * p_log, IN const osm_physp_t * p_physp)
 		mtu = ib_port_info_get_neighbor_mtu(&p_physp->port_info);
 
 	if (mtu == 0) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"osm_physp_calc_link_mtu: ERR 4101: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG, "ERR 4101: "
 			"Invalid MTU = 0. Forcing correction to 256\n");
 		mtu = 1;
 	}
@@ -391,8 +388,7 @@ osm_physp_calc_link_op_vls(IN osm_log_t * p_log,
 		    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,
-				"osm_physp_calc_link_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
@@ -405,8 +401,7 @@ osm_physp_calc_link_op_vls(IN osm_log_t * p_log,
 				op_vls = remote_op_vls;
 
 			if (osm_log_is_active(p_log, OSM_LOG_VERBOSE))
-				osm_log(p_log, OSM_LOG_VERBOSE,
-					"osm_physp_calc_link_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
@@ -428,8 +423,7 @@ osm_physp_calc_link_op_vls(IN osm_log_t * p_log,
 		op_vls = p_subn->opt.max_op_vls;
 
 	if (op_vls == 0) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"osm_physp_calc_link_op_vls: ERR 4102: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG, "ERR 4102: "
 			"Invalid OP_VLS = 0. Forcing correction to 1 (VL0)\n");
 		op_vls = 1;
 	}
@@ -476,8 +470,7 @@ __osm_physp_get_dr_physp_set(IN osm_log_t * p_log,
 	/* find the OSM node */
 	p_port = osm_get_port_by_guid(p_subn, p_subn->sm_port_guid);
 	if (!p_port) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"__osm_physp_get_dr_nodes_set: ERR 4103: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 4103: "
 			"Failed to find the SM own port by guid\n");
 		status = CL_ERROR;
 		goto Exit;
@@ -500,8 +493,7 @@ __osm_physp_get_dr_physp_set(IN osm_log_t * p_log,
 			cl_map_insert(p_physp_map, __osm_ptr_to_key(p_physp),
 				      NULL);
 
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"__osm_physp_get_dr_nodes_set: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"Traversed through node: 0x%016" PRIx64
 			" port:%u\n",
 			cl_ntoh64(p_node->node_info.node_guid),
@@ -509,8 +501,7 @@ __osm_physp_get_dr_physp_set(IN osm_log_t * p_log,
 
 		/* make sure we got a valid port and it has a remote port */
 		if (!p_physp) {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"__osm_physp_get_dr_nodes_set: ERR 4104: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 4104: "
 				"DR Traversal stopped on invalid port at hop:%u\n",
 				hop);
 			status = CL_ERROR;
@@ -518,8 +509,7 @@ __osm_physp_get_dr_physp_set(IN osm_log_t * p_log,
 		}
 
 		if (!(p_physp = osm_physp_get_remote(p_physp))) {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"__osm_physp_get_dr_nodes_set: ERR 4106: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 4106: "
 				"DR Traversal stopped on missing remote physp at hop:%u\n",
 				hop);
 			status = CL_ERROR;
@@ -629,9 +619,7 @@ osm_physp_replace_dr_path_with_alternate_dr_path(IN osm_log_t * p_log,
 
 	p_port = osm_get_port_by_guid(p_subn, port_guid);
 	if (!p_port) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_physp_replace_dr_path_with_alternate_dr_path: ERR 4105: "
-			"No SM port object\n");
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 4105: No SM port object\n");
 		goto Exit;
 	}
 
@@ -789,8 +777,7 @@ osm_physp_set_pkey_tbl(IN osm_log_t * p_log,
 		     1) / IB_NUM_PKEY_ELEMENTS_IN_BLOCK;
 
 	if (block_num >= max_blocks) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_physp_set_pkey_tbl: ERR 4108: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 4108: "
 			"Got illegal set for block number:%u "
 			"For GUID: %" PRIx64 " port number:0x%X\n",
 			block_num,
diff --git a/opensm/opensm/osm_port_info_rcv.c b/opensm/opensm/osm_port_info_rcv.c
index 758a609..ecac2a8 100644
--- a/opensm/opensm/osm_port_info_rcv.c
+++ b/opensm/opensm/osm_port_info_rcv.c
@@ -78,8 +78,7 @@ __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,
-			"__osm_pi_rcv_set_sm: "
+		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);
@@ -99,8 +98,7 @@ static void pi_rcv_check_and_fix_lid(osm_log_t *log, ib_port_info_t * const pi,
 				     osm_physp_t * p)
 {
 	if (cl_ntoh16(pi->base_lid) > IB_LID_UCAST_END_HO) {
-		osm_log(log, OSM_LOG_ERROR,
-			"pi_rcv_check_and_fix_lid: ERR 0F04: "
+		OSM_LOG(log, OSM_LOG_ERROR, "ERR 0F04: "
 			"Got invalid base LID 0x%x from the network. "
 			"Corrected to 0x%x.\n", cl_ntoh16(pi->base_lid),
 			cl_ntoh16(p->port_info.base_lid));
@@ -131,8 +129,7 @@ __osm_pi_rcv_process_endport(IN osm_sm_t * sm,
 		/* track the minimal endport MTU and rate */
 		mtu = ib_port_info_get_mtu_cap(p_pi);
 		if (mtu < sm->p_subn->min_ca_mtu) {
-			osm_log(sm->p_log, OSM_LOG_VERBOSE,
-				"__osm_pi_rcv_process_endport: "
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 				"Setting endport minimal MTU to:%u defined by port:0x%"
 				PRIx64 "\n", mtu, cl_ntoh64(port_guid));
 			sm->p_subn->min_ca_mtu = mtu;
@@ -140,8 +137,7 @@ __osm_pi_rcv_process_endport(IN osm_sm_t * sm,
 
 		rate = ib_port_info_compute_rate(p_pi);
 		if (rate < sm->p_subn->min_ca_rate) {
-			osm_log(sm->p_log, OSM_LOG_VERBOSE,
-				"__osm_pi_rcv_process_endport: "
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 				"Setting endport minimal rate to:%u defined by port:0x%"
 				PRIx64 "\n", rate, cl_ntoh64(port_guid));
 			sm->p_subn->min_ca_rate = rate;
@@ -170,15 +166,13 @@ __osm_pi_rcv_process_endport(IN osm_sm_t * sm,
 
 		if (p_pi->capability_mask & IB_PORT_CAP_IS_SM) {
 			if (sm->p_subn->opt.ignore_other_sm)
-				osm_log(sm->p_log, OSM_LOG_VERBOSE,
-					"__osm_pi_rcv_process_endport: "
+				OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 					"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,
-						"__osm_pi_rcv_process_endport: "
+					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));
@@ -198,8 +192,8 @@ __osm_pi_rcv_process_endport(IN osm_sm_t * sm,
 						     &context);
 
 				if (status != IB_SUCCESS)
-					osm_log(sm->p_log, OSM_LOG_ERROR,
-						"__osm_pi_rcv_process_endport: ERR 0F05: "
+					OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+						"ERR 0F05: "
 						"Failure requesting SMInfo (%s)\n",
 						ib_get_err_str(status));
 			}
@@ -247,8 +241,7 @@ __osm_pi_rcv_process_switch_port(IN osm_sm_t * sm,
 				remote_port_num =
 				    osm_physp_get_port_num(p_remote_physp);
 
-				osm_log(sm->p_log, OSM_LOG_VERBOSE,
-					"__osm_pi_rcv_process_switch_port: "
+				OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 					"Unlinking local node 0x%" PRIx64
 					", port 0x%X"
 					"\n\t\t\t\tand remote node 0x%" PRIx64
@@ -301,21 +294,19 @@ __osm_pi_rcv_process_switch_port(IN osm_sm_t * sm,
 						     &context);
 
 				if (status != IB_SUCCESS)
-					osm_log(sm->p_log, OSM_LOG_ERROR,
-						"__osm_pi_rcv_process_switch_port: ERR 0F02: "
+					OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+						"ERR 0F02: "
 						"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,
-					"__osm_pi_rcv_process_switch_port: "
+				OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 					"Skipping SMP responder port 0x%X\n",
 					p_pi->local_port_num);
 			break;
 
 		default:
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_pi_rcv_process_switch_port: ERR 0F03: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0F03: "
 				"Unknown link state = %u, port = 0x%X\n",
 				ib_port_info_get_port_state(p_pi),
 				p_pi->local_port_num);
@@ -428,8 +419,7 @@ static void get_pkey_table(IN osm_log_t * p_log,
 				     CL_DISP_MSGID_NONE, &context);
 
 		if (status != IB_SUCCESS) {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osm_physp_has_pkey: ERR 0F12: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 0F12: "
 				"Failure initiating PKeyTable request (%s)\n",
 				ib_get_err_str(status));
 			goto Exit;
@@ -487,15 +477,13 @@ osm_pi_rcv_process_set(IN osm_sm_t * sm, IN osm_node_t * const p_node,
 		if (p_context->active_transition &&
 		    (cl_ntoh16(p_smp->status) & 0x7fff) == 0x1c) {
 			level = OSM_LOG_INFO;
-			osm_log(sm->p_log, OSM_LOG_INFO,
-				"osm_pi_rcv_process_set: "
+			OSM_LOG(sm->p_log, OSM_LOG_INFO,
 				"Received error status 0x%x for SetResp() during ACTIVE transition\n",
 				cl_ntoh16(p_smp->status) & 0x7fff);
 			/* Should there be a subsequent Get to validate that port is ACTIVE ? */
 		} else {
 			level = OSM_LOG_ERROR;
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"osm_pi_rcv_process_set: ERR 0F10: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0F10: "
 				"Received error status for SetResp()\n");
 		}
 		osm_dump_port_info(sm->p_log,
@@ -504,8 +492,7 @@ osm_pi_rcv_process_set(IN osm_sm_t * sm, IN osm_node_t * const p_node,
 	}
 
 	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG))
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"osm_pi_rcv_process_set: "
+		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
@@ -559,8 +546,7 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
 	/* On receipt of client reregister, clear the reregister bit so
 	   reregistering won't be sent again and again */
 	if (ib_port_info_get_client_rereg(p_pi)) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"osm_pi_rcv_process: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Client reregister received on response\n");
 		ib_port_info_set_client_rereg(p_pi, 0);
 	}
@@ -572,8 +558,7 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
 	   do anything with the response - just flag that we need a heavy sweep
 	 */
 	if (p_context->light_sweep == TRUE) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"osm_pi_rcv_process: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Got light sweep response from remote port of parent node "
 			"GUID 0x%" PRIx64 " port 0x%016" PRIx64
 			", Commencing heavy sweep\n",
@@ -586,8 +571,7 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
 	p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 	if (!p_port) {
 		CL_PLOCK_RELEASE(sm->p_lock);
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_pi_rcv_process: ERR 0F06: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0F06: "
 			"No port object for port with GUID 0x%" PRIx64
 			"\n\t\t\t\tfor parent node GUID 0x%" PRIx64
 			", TID 0x%" PRIx64 "\n",
@@ -620,8 +604,7 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
 		   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,
-				"osm_pi_rcv_process: "
+			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",
@@ -639,8 +622,7 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
 		 */
 		if (!p_physp) {
 			if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE))
-				osm_log(sm->p_log, OSM_LOG_VERBOSE,
-					"osm_pi_rcv_process: "
+				OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 					"Initializing port number 0x%X\n",
 					port_num);
 			p_physp = &p_node->physp_table[port_num];
@@ -667,8 +649,7 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
 		   in the subnet.
 		 */
 		if (p_context->update_master_sm_base_lid == TRUE) {
-			osm_log(sm->p_log, OSM_LOG_VERBOSE,
-				"osm_pi_rcv_process: "
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 				"update_master_sm is TRUE. "
 				"Updating master_sm_base_lid to:%u\n",
 				p_pi->master_sm_base_lid);
@@ -695,8 +676,7 @@ void osm_pi_rcv_process(IN void *context, IN void *data)
 							 p_node, p_physp, p_pi);
 			break;
 		default:
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"osm_pi_rcv_process: ERR 0F07: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0F07: "
 				"Unknown node type %u with GUID 0x%" PRIx64
 				"\n", osm_node_get_type(p_node),
 				cl_ntoh64(node_guid));
diff --git a/opensm/opensm/osm_prtn.c b/opensm/opensm/osm_prtn.c
index d7b7152..76227c0 100644
--- a/opensm/opensm/osm_prtn.c
+++ b/opensm/opensm/osm_prtn.c
@@ -110,14 +110,14 @@ ib_api_status_t osm_prtn_add_port(osm_log_t * p_log, osm_subn_t * p_subn,
 
 	p_port = osm_get_port_by_guid(p_subn, guid);
 	if (!p_port) {
-		osm_log(p_log, OSM_LOG_VERBOSE, "osm_prtn_add_port: "
+		OSM_LOG(p_log, OSM_LOG_VERBOSE,
 			"port 0x%" PRIx64 " not found\n", cl_ntoh64(guid));
 		return status;
 	}
 
 	p_physp = p_port->p_physp;
 	if (!p_physp) {
-		osm_log(p_log, OSM_LOG_VERBOSE, "osm_prtn_add_port: "
+		OSM_LOG(p_log, OSM_LOG_VERBOSE,
 			"no physical for port 0x%" PRIx64 "\n",
 			cl_ntoh64(guid));
 		return status;
@@ -125,7 +125,7 @@ ib_api_status_t osm_prtn_add_port(osm_log_t * p_log, osm_subn_t * p_subn,
 
 	if (cl_map_remove(&p->part_guid_tbl, guid) ||
 	    cl_map_remove(&p->full_guid_tbl, guid)) {
-		osm_log(p_log, OSM_LOG_VERBOSE, "osm_prtn_add_port: "
+		OSM_LOG(p_log, OSM_LOG_VERBOSE,
 			"port 0x%" PRIx64 " already in "
 			"partition \'%s\' (0x%04x). Will overwrite\n",
 			cl_ntoh64(guid), p->name, cl_ntoh16(p->pkey));
@@ -227,8 +227,7 @@ ib_api_status_t osm_prtn_add_mcgroup(osm_log_t * p_log,
 	status = osm_mcmr_rcv_find_or_create_new_mgrp(p_sa, comp_mask, &mc_rec,
 						      &p_mgrp);
 	if (!p_mgrp || status != IB_SUCCESS)
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_prtn_add_mcgroup: "
+		OSM_LOG(p_log, OSM_LOG_ERROR,
 			"Failed to create MC group with pkey 0x%04x\n",
 			cl_ntoh16(pkey));
 	if (p_mgrp)
@@ -296,8 +295,7 @@ osm_prtn_t *osm_prtn_make_new(osm_log_t * p_log, osm_subn_t * p_subn,
 
 	p = osm_prtn_new(name, pkey);
 	if (!p) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_prtn_make_new: Unable to create"
+		OSM_LOG(p_log, OSM_LOG_ERROR, "Unable to create"
 			" partition \'%s\' (0x%04x)\n", name, cl_ntoh16(pkey));
 		return NULL;
 	}
@@ -305,8 +303,7 @@ osm_prtn_t *osm_prtn_make_new(osm_log_t * p_log, osm_subn_t * p_subn,
 	p_check = (osm_prtn_t *) cl_qmap_insert(&p_subn->prtn_pkey_tbl,
 						p->pkey, &p->map_item);
 	if (p != p_check) {
-		osm_log(p_log, OSM_LOG_VERBOSE,
-			"osm_prtn_make_new: Duplicated partition"
+		OSM_LOG(p_log, OSM_LOG_VERBOSE, "Duplicated partition"
 			" definition: \'%s\' (0x%04x) prev name \'%s\'"
 			".  Will use it\n",
 			name, cl_ntoh16(pkey), p_check->name);
@@ -373,8 +370,7 @@ ib_api_status_t osm_prtn_make_partitions(osm_log_t * const p_log,
 		goto _err;
 
 	if (is_config && osm_prtn_config_parse_file(p_log, p_subn, file_name)) {
-		osm_log(p_log, OSM_LOG_VERBOSE,
-			"osm_prtn_make_partitions: Partition configuration "
+		OSM_LOG(p_log, OSM_LOG_VERBOSE, "Partition configuration "
 			"was not fully processed\n");
 	}
 
diff --git a/opensm/opensm/osm_prtn_config.c b/opensm/opensm/osm_prtn_config.c
index 7c4eb5c..57467d4 100644
--- a/opensm/opensm/osm_prtn_config.c
+++ b/opensm/opensm/osm_prtn_config.c
@@ -103,8 +103,7 @@ static int partition_create(unsigned lineno, struct part_conf *conf,
 		return -1;
 
 	if (!conf->p_subn->opt.qos && conf->sl != OSM_DEFAULT_SL) {
-		osm_log(conf->p_log, OSM_LOG_DEBUG,
-			"partition_create: Overriding SL %d"
+		OSM_LOG(conf->p_log, OSM_LOG_DEBUG, "Overriding SL %d"
 			" to default SL %d on partition %s"
 			" as QoS is not enabled.\n",
 			conf->sl, OSM_DEFAULT_SL, name);
@@ -143,20 +142,20 @@ static int partition_add_flag(unsigned lineno, struct part_conf *conf,
 		conf->is_ipoib = 1;
 	} else if (!strncmp(flag, "mtu", len)) {
 		if (!val || (conf->mtu = strtoul(val, NULL, 0)) == 0)
-			osm_log(conf->p_log, OSM_LOG_VERBOSE,
+			OSM_LOG(conf->p_log, OSM_LOG_VERBOSE,
 				"PARSE WARN: line %d: "
 				"flag \'mtu\' requires valid value"
 				" - skipped\n", lineno);
 	} else if (!strncmp(flag, "rate", len)) {
 		if (!val || (conf->rate = strtoul(val, NULL, 0)) == 0)
-			osm_log(conf->p_log, OSM_LOG_VERBOSE,
+			OSM_LOG(conf->p_log, OSM_LOG_VERBOSE,
 				"PARSE WARN: line %d: "
 				"flag \'rate\' requires valid value"
 				" - skipped\n", lineno);
 	} else if (!strncmp(flag, "scope", len)) {
 		unsigned int scope;
 		if (!val || (scope = strtoul(val, NULL, 0)) == 0 || scope > 0xF)
-			osm_log(conf->p_log, OSM_LOG_VERBOSE,
+			OSM_LOG(conf->p_log, OSM_LOG_VERBOSE,
 				"PARSE WARN: line %d: "
 				"flag \'scope\' requires valid value"
 				" - skipped\n", lineno);
@@ -168,7 +167,7 @@ static int partition_add_flag(unsigned lineno, struct part_conf *conf,
 
 		if (!val || !*val || (sl = strtoul(val, &end, 0)) > 15 ||
 		    (*end && !isspace(*end)))
-			osm_log(conf->p_log, OSM_LOG_VERBOSE,
+			OSM_LOG(conf->p_log, OSM_LOG_VERBOSE,
 				"PARSE WARN: line %d: "
 				"flag \'sl\' requires valid value"
 				" - skipped\n", lineno);
@@ -177,14 +176,14 @@ static int partition_add_flag(unsigned lineno, struct part_conf *conf,
 	} else if (!strncmp(flag, "defmember", len)) {
 		if (!val || (strncmp(val, "limited", strlen(val))
 			     && strncmp(val, "full", strlen(val))))
-			osm_log(conf->p_log, OSM_LOG_VERBOSE,
+			OSM_LOG(conf->p_log, OSM_LOG_VERBOSE,
 				"PARSE WARN: line %d: "
 				"flag \'defmember\' requires valid value (limited or full)"
 				" - skipped\n", lineno);
 		else
 			conf->full = strncmp(val, "full", strlen(val)) == 0;
 	} else {
-		osm_log(conf->p_log, OSM_LOG_VERBOSE,
+		OSM_LOG(conf->p_log, OSM_LOG_VERBOSE,
 			"PARSE WARN: line %d: "
 			"unrecognized partition flag \'%s\'"
 			" - ignored\n", lineno, flag);
@@ -208,7 +207,7 @@ static int partition_add_port(unsigned lineno, struct part_conf *conf,
 		if (!strncmp(flag, "full", strlen(flag)))
 			full = TRUE;
 		else if (strncmp(flag, "limited", strlen(flag))) {
-			osm_log(conf->p_log, OSM_LOG_VERBOSE,
+			OSM_LOG(conf->p_log, OSM_LOG_VERBOSE,
 				"PARSE WARN: line %d: "
 				"unrecognized port flag \'%s\'."
 				" Assume \'limited\'\n", lineno, flag);
@@ -323,8 +322,7 @@ static int parse_part_conf(struct part_conf *conf, char *str, int lineno)
 
 	q = strchr(p, ':');
 	if (!q) {
-		osm_log(conf->p_log, OSM_LOG_ERROR,
-			"PARSE ERROR: line %d: "
+		OSM_LOG(conf->p_log, OSM_LOG_ERROR, "PARSE ERROR: line %d: "
 			"no partition definition found\n", lineno);
 		fprintf(stderr, "\nPARSE ERROR: line %d: "
 			"no partition definition found\n", lineno);
@@ -351,7 +349,7 @@ static int parse_part_conf(struct part_conf *conf, char *str, int lineno)
 			*q++ = '\0';
 		ret = parse_name_token(p, &flag, &flval);
 		if (!flag) {
-			osm_log(conf->p_log, OSM_LOG_ERROR,
+			OSM_LOG(conf->p_log, OSM_LOG_ERROR,
 				"PARSE ERROR: line %d: "
 				"bad partition flags\n", lineno);
 			fprintf(stderr, "\nPARSE ERROR: line %d: "
@@ -365,8 +363,7 @@ static int parse_part_conf(struct part_conf *conf, char *str, int lineno)
 
 	if (p != str || (partition_create(lineno, conf,
 					  name, id, flag, flval) < 0)) {
-		osm_log(conf->p_log, OSM_LOG_ERROR,
-			"PARSE ERROR: line %d: "
+		OSM_LOG(conf->p_log, OSM_LOG_ERROR, "PARSE ERROR: line %d: "
 			"bad partition definition\n", lineno);
 		fprintf(stderr, "\nPARSE ERROR: line %d: "
 			"bad partition definition\n", lineno);
@@ -381,7 +378,7 @@ skip_header:
 			*q++ = '\0';
 		ret = parse_name_token(p, &name, &flag);
 		if (partition_add_port(lineno, conf, name, flag) < 0) {
-			osm_log(conf->p_log, OSM_LOG_ERROR,
+			OSM_LOG(conf->p_log, OSM_LOG_ERROR,
 				"PARSE ERROR: line %d: "
 				"bad PortGUID\n", lineno);
 			fprintf(stderr, "PARSE ERROR: line %d: "
@@ -405,8 +402,7 @@ int osm_prtn_config_parse_file(osm_log_t * p_log, osm_subn_t * p_subn,
 
 	file = fopen(file_name, "r");
 	if (!file) {
-		osm_log(p_log, OSM_LOG_VERBOSE,
-			"osm_prtn_config_parse_file: "
+		OSM_LOG(p_log, OSM_LOG_VERBOSE,
 			"Cannot open config file \'%s\': %s\n",
 			file_name, strerror(errno));
 		return -1;
@@ -433,7 +429,7 @@ int osm_prtn_config_parse_file(osm_log_t * p_log, osm_subn_t * p_subn,
 				break;
 
 			if (!conf && !(conf = new_part_conf(p_log, p_subn))) {
-				osm_log(conf->p_log, OSM_LOG_ERROR,
+				OSM_LOG(conf->p_log, OSM_LOG_ERROR,
 					"PARSE ERROR: line %d: "
 					"internal: cannot create config\n",
 					lineno);
diff --git a/opensm/opensm/osm_qos.c b/opensm/opensm/osm_qos.c
index 675189a..ca9a9d3 100644
--- a/opensm/opensm/osm_qos.c
+++ b/opensm/opensm/osm_qos.c
@@ -245,8 +245,7 @@ static ib_api_status_t qos_physp_setup(osm_log_t * p_log, osm_sm_t * sm,
 	/* setup VLArbitration */
 	status = vlarb_update(sm, p, port_num, force_update, qcfg);
 	if (status != IB_SUCCESS) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"qos_physp_setup: ERR 6202 : "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6202 : "
 			"failed to update VLArbitration tables "
 			"for port %" PRIx64 " #%d\n",
 			cl_ntoh64(p->port_guid), port_num);
@@ -256,8 +255,7 @@ static ib_api_status_t qos_physp_setup(osm_log_t * p_log, osm_sm_t * sm,
 	/* setup SL2VL tables */
 	status = sl2vl_update(sm, p_port, p, port_num, force_update, qcfg);
 	if (status != IB_SUCCESS) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"qos_physp_setup: ERR 6203 : "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6203 : "
 			"failed to update SL2VLMapping tables "
 			"for port %" PRIx64 " #%d\n",
 			cl_ntoh64(p->port_guid), port_num);
diff --git a/opensm/opensm/osm_qos_parser.y b/opensm/opensm/osm_qos_parser.y
index 11da30b..437822f 100644
--- a/opensm/opensm/osm_qos_parser.y
+++ b/opensm/opensm/osm_qos_parser.y
@@ -2281,15 +2281,13 @@ int osm_qos_parse_policy_file(IN osm_subn_t * const p_subn)
     if (!__qos_parser_in)
     {
         if (strcmp(p_subn->opt.qos_policy_file,OSM_DEFAULT_QOS_POLICY_FILE)) {
-            osm_log(p_qos_parser_osm_log, OSM_LOG_ERROR,
-                    "osm_qos_parse_policy_file: ERR AC01: "
+            OSM_LOG(p_qos_parser_osm_log, OSM_LOG_ERROR, "ERR AC01: "
                     "Failed opening QoS policy file %s - %s\n",
                     p_subn->opt.qos_policy_file, strerror(errno));
             res = 1;
         }
         else
-            osm_log(p_qos_parser_osm_log, OSM_LOG_VERBOSE,
-                    "osm_qos_parse_policy_file: "
+            OSM_LOG(p_qos_parser_osm_log, OSM_LOG_VERBOSE,
                     "QoS policy file not found (%s)\n",
                     p_subn->opt.qos_policy_file);
 
@@ -2301,8 +2299,8 @@ int osm_qos_parse_policy_file(IN osm_subn_t * const p_subn)
         first_time = FALSE;
         __setup_simple_qos_levels();
         __setup_ulp_match_rules();
-        osm_log(p_qos_parser_osm_log, OSM_LOG_INFO,
-                "osm_qos_parse_policy_file: Loading QoS policy file (%s)\n",
+        OSM_LOG(p_qos_parser_osm_log, OSM_LOG_INFO,
+		"Loading QoS policy file (%s)\n",
                 p_subn->opt.qos_policy_file);
     }
     else
@@ -2327,8 +2325,7 @@ int osm_qos_parse_policy_file(IN osm_subn_t * const p_subn)
 
     if (res != 0)
     {
-        osm_log(p_qos_parser_osm_log, OSM_LOG_ERROR,
-                "osm_qos_parse_policy_file: ERR AC03: "
+        OSM_LOG(p_qos_parser_osm_log, OSM_LOG_ERROR, "ERR AC03: "
                 "Failed parsing QoS policy file (%s)\n",
                 p_subn->opt.qos_policy_file);
         osm_qos_policy_destroy(p_subn->p_qos_policy);
@@ -2342,12 +2339,10 @@ int osm_qos_parse_policy_file(IN osm_subn_t * const p_subn)
 
     if (osm_qos_policy_validate(p_subn->p_qos_policy,p_qos_parser_osm_log))
     {
-        osm_log(p_qos_parser_osm_log, OSM_LOG_ERROR,
-                "osm_qos_parse_policy_file: ERR AC04: "
+        OSM_LOG(p_qos_parser_osm_log, OSM_LOG_ERROR, "ERR AC04: "
                 "Error(s) in QoS policy file (%s)\n",
                 p_subn->opt.qos_policy_file);
-        fprintf(stderr,
-                "Error(s) in QoS policy file (%s)\n",
+        fprintf(stderr, "Error(s) in QoS policy file (%s)\n",
                 p_subn->opt.qos_policy_file);
         osm_qos_policy_destroy(p_subn->p_qos_policy);
         p_subn->p_qos_policy = NULL;
@@ -2384,12 +2379,10 @@ static void __qos_parser_error(const char *format, ...)
     vsnprintf(s, 256, format, pvar);
     va_end(pvar);
 
-    osm_log(p_qos_parser_osm_log, OSM_LOG_ERROR,
-            "__qos_parser_error: ERR AC05: "
+    OSM_LOG(p_qos_parser_osm_log, OSM_LOG_ERROR, "ERR AC05: "
             "Syntax error (line %d:%d): %s",
             line_num, column_num, s);
-    fprintf(stderr,
-            "Error in QoS Policy File (line %d:%d): %s.\n",
+    fprintf(stderr, "Error in QoS Policy File (line %d:%d): %s.\n",
             line_num, column_num, s);
     OSM_LOG_EXIT(p_qos_parser_osm_log);
 }
@@ -3055,9 +3048,8 @@ static int __validate_pkeys( uint64_t ** range_arr,
                  * And even if it doesn't, don't exit - just print
                  * error message and continue.
                  */
-                 osm_log(p_qos_parser_osm_log, OSM_LOG_ERROR,
-                         "__validate_pkeys: ERR AC02: pkey 0x%04X - "
-                         "partition doesn't exist",
+                 OSM_LOG(p_qos_parser_osm_log, OSM_LOG_ERROR, "ERR AC02: "
+			 "pkey 0x%04X - partition doesn't exist",
                          cl_ntoh16(pkey));
             }
         }
diff --git a/opensm/opensm/osm_qos_policy.c b/opensm/opensm/osm_qos_policy.c
index 788e4d8..aef1856 100644
--- a/opensm/opensm/osm_qos_policy.c
+++ b/opensm/opensm/osm_qos_policy.c
@@ -791,8 +791,7 @@ int osm_qos_policy_validate(osm_qos_policy_t * p_qos_policy,
 			p_qos_policy->p_default_qos_level = &__default_simple_qos_level;
 		}
 		else {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osm_qos_policy_validate: ERR AC10: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR AC10: "
 				"Default qos-level (%s) not defined.\n",
 				OSM_QOS_POLICY_DEFAULT_LEVEL_NAME);
 			res = 1;
@@ -821,8 +820,7 @@ int osm_qos_policy_validate(osm_qos_policy_t * p_qos_policy,
 					       p_qos_match_rule->qos_level_name);
 
 		if (!p_qos_match_rule->p_qos_level) {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osm_qos_policy_validate: ERR AC11: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR AC11: "
 				"qos-match-rule num %u: qos-level '%s' not found\n",
 				i, p_qos_match_rule->qos_level_name);
 			res = 1;
@@ -842,9 +840,7 @@ int osm_qos_policy_validate(osm_qos_policy_t * p_qos_policy,
 				p_port_group =
 				    __qos_policy_get_port_group_by_name(p_qos_policy, str);
 				if (!p_port_group) {
-					osm_log(p_log,
-						OSM_LOG_ERROR,
-						"osm_qos_policy_validate: ERR AC12: "
+					OSM_LOG(p_log, OSM_LOG_ERROR, "ERR AC12: "
 						"qos-match-rule num %u: source port-group '%s' not found\n",
 						i, str);
 					res = 1;
@@ -873,9 +869,7 @@ int osm_qos_policy_validate(osm_qos_policy_t * p_qos_policy,
 				p_port_group =
 				    __qos_policy_get_port_group_by_name(p_qos_policy,str);
 				if (!p_port_group) {
-					osm_log(p_log,
-						OSM_LOG_ERROR,
-						"osm_qos_policy_validate: ERR AC13: "
+					OSM_LOG(p_log, OSM_LOG_ERROR, "ERR AC13: "
 						"qos-match-rule num %u: destination port-group '%s' not found\n",
 						i, str);
 					res = 1;
@@ -909,9 +903,7 @@ int osm_qos_policy_validate(osm_qos_policy_t * p_qos_policy,
 				if (p_prtn == (osm_prtn_t *)cl_qmap_end(
 					&p_qos_policy->p_subn->prtn_pkey_tbl)) {
 					/* partition for this pkey not found */
-					osm_log(p_log,
-						OSM_LOG_ERROR,
-						"osm_qos_policy_validate: ERR AC14: "
+					OSM_LOG(p_log, OSM_LOG_ERROR, "ERR AC14: "
 						"pkey 0x%04X in match rule - "
 						"partition doesn't exist\n",
 						cl_ntoh16(pkey));
@@ -921,9 +913,7 @@ int osm_qos_policy_validate(osm_qos_policy_t * p_qos_policy,
 				if (p_qos_match_rule->p_qos_level->sl_set &&
                                     p_prtn->sl != p_qos_match_rule->p_qos_level->sl) {
 					/* overriding partition's SL */
-					osm_log(p_log,
-						OSM_LOG_ERROR,
-						"osm_qos_policy_validate: ERR AC15: "
+					OSM_LOG(p_log, OSM_LOG_ERROR, "ERR AC15: "
 						"pkey 0x%04X in match rule - "
 						"overriding partition SL (%u) "
 						"with QoS Level SL (%u)\n",
@@ -976,15 +966,13 @@ static osm_qos_level_t * __qos_policy_get_qos_level_by_params(
 	else
 		p_qos_level = p_qos_policy->p_default_qos_level;
 
-	osm_log(&p_qos_policy->p_subn->p_osm->log, OSM_LOG_DEBUG,
-		"__qos_policy_get_qos_level_by_params: "
+	OSM_LOG(&p_qos_policy->p_subn->p_osm->log, OSM_LOG_DEBUG,
 		"PathRecord request:"
 		"Src port 0x%016" PRIx64 ", "
 		"Dst port 0x%016" PRIx64 "\n",
 		cl_ntoh64(osm_physp_get_port_guid(p_src_physp)),
 		cl_ntoh64(osm_physp_get_port_guid(p_dest_physp)));
-	osm_log(&p_qos_policy->p_subn->p_osm->log, OSM_LOG_DEBUG,
-		"__qos_policy_get_qos_level_by_params: "
+	OSM_LOG(&p_qos_policy->p_subn->p_osm->log, OSM_LOG_DEBUG,
 		"Applying QoS Level %s (%s)\n",
 		p_qos_level->name,
 		(p_qos_level->use) ? p_qos_level->use : "no description");
diff --git a/opensm/opensm/osm_req.c b/opensm/opensm/osm_req.c
index 44eeff0..42a638a 100644
--- a/opensm/opensm/osm_req.c
+++ b/opensm/opensm/osm_req.c
@@ -93,8 +93,8 @@ osm_req_get(IN osm_sm_t * sm,
 				  p_path->h_bind, MAD_BLOCK_SIZE, NULL);
 
 	if (p_madw == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_req_get: ERR 1101: " "Unable to acquire MAD\n");
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+			"ERR 1101: Unable to acquire MAD\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
@@ -102,8 +102,7 @@ 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,
-			"osm_req_get: "
+		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),
@@ -175,8 +174,8 @@ osm_req_set(IN osm_sm_t * sm,
 				  p_path->h_bind, MAD_BLOCK_SIZE, NULL);
 
 	if (p_madw == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_req_set: ERR 1102: " "Unable to acquire MAD\n");
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+			"ERR 1102: Unable to acquire MAD\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
@@ -184,8 +183,7 @@ 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,
-			"osm_req_set: "
+		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),
diff --git a/opensm/opensm/osm_resp.c b/opensm/opensm/osm_resp.c
index 86a62ff..09239de 100644
--- a/opensm/opensm/osm_resp.c
+++ b/opensm/opensm/osm_resp.c
@@ -85,8 +85,7 @@ osm_resp_make_resp_smp(IN osm_sm_t * sm,
 		p_dest_smp->method = IB_MAD_METHOD_TRAP_REPRESS;
 		p_dest_smp->status = 0;
 	} else {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_resp_make_resp_smp: ERR 1302: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 1302: "
 			"src smp method unsupported 0x%X\n", p_src_smp->method);
 		goto Exit;
 	}
@@ -129,8 +128,8 @@ osm_resp_send(IN osm_sm_t * sm,
 				  MAD_BLOCK_SIZE, NULL);
 
 	if (p_madw == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_resp_send: ERR 1301: " "Unable to acquire MAD\n");
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+			"ERR 1301: Unable to acquire MAD\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
@@ -151,9 +150,7 @@ osm_resp_send(IN osm_sm_t * sm,
 	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,
-			"osm_resp_send: "
-			"Responding to %s (0x%X)"
+		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),
diff --git a/opensm/opensm/osm_sa.c b/opensm/opensm/osm_sa.c
index 86be992..9dbab9d 100644
--- a/opensm/opensm/osm_sa.c
+++ b/opensm/opensm/osm_sa.c
@@ -306,8 +306,7 @@ osm_sa_bind(IN osm_sa_t * const p_sa, IN const ib_net64_t port_guid)
 	status = osm_sa_mad_ctrl_bind(&p_sa->mad_ctrl, port_guid);
 
 	if (status != IB_SUCCESS) {
-		osm_log(p_sa->p_log, OSM_LOG_ERROR,
-			"osm_sa_bind: ERR 4C03: "
+		OSM_LOG(p_sa->p_log, OSM_LOG_ERROR, "ERR 4C03: "
 			"SA MAD Controller bind failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -357,8 +356,7 @@ opensm_dump_to_file(osm_opensm_t * p_osm, const char *file_name,
 
 	file = fopen(path, "w");
 	if (!file) {
-		osm_log(&p_osm->log, OSM_LOG_ERROR,
-			"opensm_dump_to_file: ERR 4C01: "
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR, "ERR 4C01: "
 			"cannot open file \'%s\': %s\n",
 			file_name, strerror(errno));
 		return -1;
@@ -530,15 +528,14 @@ static void sa_dump_all_sa(osm_opensm_t * p_osm, FILE * file)
 
 	dump_context.p_osm = p_osm;
 	dump_context.file = file;
-	osm_log(&p_osm->log, OSM_LOG_DEBUG,
-		"sa_dump_all_sa: Dump multicast:\n");
+	OSM_LOG(&p_osm->log, OSM_LOG_DEBUG, "Dump multicast:\n");
 	cl_plock_acquire(&p_osm->lock);
 	cl_qmap_apply_func(&p_osm->subn.mgrp_mlid_tbl,
 			   sa_dump_one_mgrp, &dump_context);
-	osm_log(&p_osm->log, OSM_LOG_DEBUG, "sa_dump_all_sa: Dump inform:\n");
+	OSM_LOG(&p_osm->log, OSM_LOG_DEBUG, "Dump inform:\n");
 	cl_qlist_apply_func(&p_osm->subn.sa_infr_list,
 			    sa_dump_one_inform, &dump_context);
-	osm_log(&p_osm->log, OSM_LOG_DEBUG, "sa_dump_all_sa: Dump services:\n");
+	OSM_LOG(&p_osm->log, OSM_LOG_DEBUG, "Dump services:\n");
 	cl_qlist_apply_func(&p_osm->subn.sa_sr_list,
 			    sa_dump_one_service, &dump_context);
 	cl_plock_release(&p_osm->lock);
@@ -567,15 +564,13 @@ static osm_mgrp_t *load_mcgroup(osm_opensm_t * p_osm, ib_net16_t mlid,
 		p_mgrp = (osm_mgrp_t *) p_next;
 		if (!memcmp(&p_mgrp->mcmember_rec.mgid, &p_mcm_rec->mgid,
 			    sizeof(ib_gid_t))) {
-			osm_log(&p_osm->log, OSM_LOG_DEBUG,
-				"load_mcgroup: mgrp %04x is already here.",
-				cl_ntoh16(mlid));
+			OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
+				"mgrp %04x is already here.", cl_ntoh16(mlid));
 			goto _out;
 		}
-		osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-			"load_mcgroup: mlid %04x is already used by another "
-			"MC group. Will request clients reregistration.\n",
-			cl_ntoh16(mlid));
+		OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
+			"mlid %04x is already used by another MC group. Will "
+			"request clients reregistration.\n", cl_ntoh16(mlid));
 		p_mgrp = NULL;
 		goto _out;
 	}
@@ -586,10 +581,9 @@ static osm_mgrp_t *load_mcgroup(osm_opensm_t * p_osm, ib_net16_t mlid,
 						 comp_mask, p_mcm_rec,
 						 &p_mgrp) != IB_SUCCESS ||
 	    !p_mgrp || p_mgrp->mlid != mlid) {
-		osm_log(&p_osm->log, OSM_LOG_ERROR,
-			"load_mcgroup: cannot create MC group with mlid "
-			"0x%04x and mgid 0x%016" PRIx64 ":0x%016" PRIx64 "\n",
-			cl_ntoh16(mlid),
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
+			"cannot create MC group with mlid 0x%04x and mgid "
+			"0x%016" PRIx64 ":0x%016" PRIx64 "\n", cl_ntoh16(mlid),
 			cl_ntoh64(p_mcm_rec->mgid.unicast.prefix),
 			cl_ntoh64(p_mcm_rec->mgid.unicast.interface_id));
 		p_mgrp = NULL;
@@ -611,14 +605,14 @@ static int load_svcr(osm_opensm_t * p_osm, ib_service_record_t * sr,
 	cl_plock_excl_acquire(&p_osm->lock);
 
 	if (osm_svcr_get_by_rid(&p_osm->subn, &p_osm->log, sr)) {
-		osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-			"load_svcr: ServiceRecord already exists\n");
+		OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
+			"ServiceRecord already exists\n");
 		goto _out;
 	}
 
 	if (!(p_svcr = osm_svcr_new(sr))) {
-		osm_log(&p_osm->log, OSM_LOG_ERROR,
-			"load_svcr: cannot allocate new service struct\n");
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
+			"cannot allocate new service struct\n");
 		ret = -1;
 		goto _out;
 	}
@@ -626,8 +620,7 @@ static int load_svcr(osm_opensm_t * p_osm, ib_service_record_t * sr,
 	p_svcr->modified_time = modified_time;
 	p_svcr->lease_period = lease_period;
 
-	osm_log(&p_osm->log, OSM_LOG_DEBUG,
-		"load_svcr: adding ServiceRecord...\n");
+	OSM_LOG(&p_osm->log, OSM_LOG_DEBUG, "adding ServiceRecord...\n");
 
 	osm_svcr_insert_to_db(&p_osm->subn, &p_osm->log, p_svcr);
 
@@ -655,20 +648,19 @@ static int load_infr(osm_opensm_t * p_osm, ib_inform_info_record_t * iir,
 
 	cl_plock_excl_acquire(&p_osm->lock);
 	if (osm_infr_get_by_rec(&p_osm->subn, &p_osm->log, &infr)) {
-		osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-			"load_infr: InformInfo Record already exists\n");
+		OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
+			"InformInfo Record already exists\n");
 		goto _out;
 	}
 
 	if (!(p_infr = osm_infr_new(&infr))) {
-		osm_log(&p_osm->log, OSM_LOG_ERROR,
-			"load_infr: cannot allocate new infr struct\n");
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
+			"cannot allocate new infr struct\n");
 		ret = -1;
 		goto _out;
 	}
 
-	osm_log(&p_osm->log, OSM_LOG_DEBUG,
-		"load_infr: adding InformInfo Record...\n");
+	OSM_LOG(&p_osm->log, OSM_LOG_DEBUG, "adding InformInfo Record...\n");
 
 	osm_infr_insert_to_db(&p_osm->subn, &p_osm->log, p_infr);
 
@@ -723,7 +715,7 @@ static int unpack_string64(char *p, uint8_t * buf)
 #define PARSE_AHEAD(p, x, name, val_ptr) { int _ret; \
 	p = strstr(p, name); \
 	if (!p) { \
-		osm_log(&p_osm->log, OSM_LOG_ERROR, \
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR, \
 			"PARSE ERROR: %s:%u: cannot find \"%s\" string\n", \
 			file_name, lineno, (name)); \
 		ret = -2; \
@@ -732,7 +724,7 @@ static int unpack_string64(char *p, uint8_t * buf)
 	p += strlen(name); \
 	_ret = unpack_##x(p, (val_ptr)); \
 	if (_ret < 0) { \
-		osm_log(&p_osm->log, OSM_LOG_ERROR, \
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR, \
 			"PARSE ERROR: %s:%u: cannot parse "#x" value " \
 			"after \"%s\"\n", file_name, lineno, (name)); \
 		ret = _ret; \
@@ -753,18 +745,16 @@ int osm_sa_db_file_load(osm_opensm_t * p_osm)
 
 	file_name = p_osm->subn.opt.sa_db_file;
 	if (!file_name) {
-		osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-			"osm_sa_db_file_load: sa db file name is not "
-			"specifed. Skip restore\n");
+		OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
+			"sa db file name is not specifed. Skip restore\n");
 		return 0;
 	}
 
 	file = fopen(file_name, "r");
 	if (!file) {
-		osm_log(&p_osm->log, OSM_LOG_ERROR | OSM_LOG_SYS,
-			"osm_sa_db_file_load: ERR 4C02: "
-			"cannot open sa db file \'%s\'. "
-			"Skip restoring\n", file_name);
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR | OSM_LOG_SYS, "ERR 4C02: "
+			"cannot open sa db file \'%s\'. Skip restoring\n",
+			file_name);
 		return -1;
 	}
 
diff --git a/opensm/opensm/osm_sa_class_port_info.c b/opensm/opensm/osm_sa_class_port_info.c
index 814420a..744c97d 100644
--- a/opensm/opensm/osm_sa_class_port_info.c
+++ b/opensm/opensm/osm_sa_class_port_info.c
@@ -95,8 +95,7 @@ __osm_cpi_rcv_respond(IN osm_sa_t * sa,
 				       p_madw->h_bind,
 				       MAD_BLOCK_SIZE, &p_madw->mad_addr);
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_cpi_rcv_respond: ERR 1408: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1408: "
 			"Unable to allocate MAD\n");
 		goto Exit;
 	}
@@ -180,8 +179,7 @@ __osm_cpi_rcv_respond(IN osm_sa_t * sa,
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_cpi_rcv_respond: ERR 1409: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1409: "
 			"Unable to send MAD (%s)\n", ib_get_err_str(status));
 		/*  osm_mad_pool_put( sa->p_mad_pool, p_resp_madw ); */
 		goto Exit;
@@ -208,8 +206,7 @@ void osm_cpi_rcv_process(IN void *context, IN void *data)
 
 	/* we only support GET */
 	if (p_sa_mad->method != IB_MAD_METHOD_GET) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_cpi_rcv_process: ERR 1403: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1403: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_sa_mad->method));
 		osm_sa_send_error(sa, p_madw,
diff --git a/opensm/opensm/osm_sa_guidinfo_record.c b/opensm/opensm/osm_sa_guidinfo_record.c
index 8c10336..c6baadd 100644
--- a/opensm/opensm/osm_sa_guidinfo_record.c
+++ b/opensm/opensm/osm_sa_guidinfo_record.c
@@ -92,16 +92,14 @@ __osm_gir_rcv_new_gir(IN osm_sa_t * sa,
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_gir_rcv_new_gir: ERR 5102: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5102: "
 			"rec_item alloc failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_gir_rcv_new_gir: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"New GUIDInfoRecord: lid 0x%X, block num %d\n",
 			cl_ntoh16(match_lid), block_num);
 	}
@@ -145,8 +143,7 @@ __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,
-			"__osm_sa_gir_create_gir: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Looking for GUIDRecord with LID: 0x%X GUID:0x%016"
 			PRIx64 "\n", cl_ntoh16(match_lid),
 			cl_ntoh64(match_port_guid)
@@ -209,8 +206,7 @@ __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,
-					"__osm_sa_gir_create_gir: "
+				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 					"Comparing LID: 0x%X <= 0x%X <= 0x%X\n",
 					base_lid_ho, match_lid_ho, max_lid_ho);
 			}
@@ -346,8 +342,7 @@ void osm_gir_rcv_process(IN void *ctx, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((p_rcvd_mad->method != IB_MAD_METHOD_GET) &&
 	    (p_rcvd_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_gir_rcv_process: ERR 5105: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5105: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_rcvd_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -361,8 +356,7 @@ void osm_gir_rcv_process(IN void *ctx, IN void *data)
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_gir_rcv_process: ERR 5104: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5104: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -399,8 +393,7 @@ void osm_gir_rcv_process(IN void *ctx, IN void *data)
 			goto Exit;
 		}
 		if (num_rec > 1) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_gir_rcv_process: ERR 5103: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5103: "
 				"Got more than one record for SubnAdmGet (%u)\n",
 				num_rec);
 			osm_sa_send_error(sa, p_madw,
@@ -426,16 +419,14 @@ void osm_gir_rcv_process(IN void *ctx, IN void *data)
 	    (MAD_BLOCK_SIZE -
 	     IB_SA_MAD_HDR_SIZE) / sizeof(ib_guidinfo_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_gir_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_gir_rcv_process: " "Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	if ((p_rcvd_mad->method == IB_MAD_METHOD_GET) && (num_rec == 0)) {
 		osm_sa_send_error(sa, p_madw,
@@ -452,8 +443,7 @@ void osm_gir_rcv_process(IN void *ctx, IN void *data)
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_gir_rcv_process: ERR 5106: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5106: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -515,8 +505,7 @@ void osm_gir_rcv_process(IN void *ctx, IN void *data)
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_gir_rcv_process: ERR 5107: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5107: "
 			"osm_sa_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
diff --git a/opensm/opensm/osm_sa_informinfo.c b/opensm/opensm/osm_sa_informinfo.c
index f81b6c1..286a348 100644
--- a/opensm/opensm/osm_sa_informinfo.c
+++ b/opensm/opensm/osm_sa_informinfo.c
@@ -119,8 +119,7 @@ __validate_ports_access_rights(IN osm_sa_t * sa,
 		p_port = osm_get_port_by_guid(sa->p_subn, portguid);
 
 		if (p_port == NULL) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__validate_ports_access_rights: ERR 4301: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4301: "
 				"Invalid port guid: 0x%016" PRIx64 "\n",
 				cl_ntoh64(portguid));
 			valid = FALSE;
@@ -134,8 +133,7 @@ __validate_ports_access_rights(IN osm_sa_t * sa,
 		   according to the current partitioning. */
 		if (!osm_physp_share_pkey
 		    (sa->p_log, p_physp, p_requester_physp)) {
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__validate_ports_access_rights: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"port and requester don't share pkey\n");
 			valid = FALSE;
 			goto Exit;
@@ -166,8 +164,7 @@ __validate_ports_access_rights(IN osm_sa_t * sa,
 				p_port = cl_ptr_vector_get(p_tbl, lid);
 			} else {
 				/* lid requested is out of range */
-				osm_log(sa->p_log, OSM_LOG_ERROR,
-					"__validate_ports_access_rights: ERR 4302: "
+				OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4302: "
 					"Given LID (0x%X) is out of range:0x%X\n",
 					lid, cl_ptr_vector_get_size(p_tbl));
 				valid = FALSE;
@@ -181,8 +178,7 @@ __validate_ports_access_rights(IN osm_sa_t * sa,
 			   each other according to the current partitioning. */
 			if (!osm_physp_share_pkey
 			    (sa->p_log, p_physp, p_requester_physp)) {
-				osm_log(sa->p_log, OSM_LOG_DEBUG,
-					"__validate_ports_access_rights: "
+				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 					"port and requester don't share pkey\n");
 				valid = FALSE;
 				goto Exit;
@@ -206,8 +202,8 @@ __validate_infr(IN osm_sa_t * sa, IN osm_infr_t * p_infr_rec)
 
 	valid = __validate_ports_access_rights(sa, p_infr_rec);
 	if (!valid) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__validate_infr: " "Invalid Access for InformInfo\n");
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+			"Invalid Access for InformInfo\n");
 		valid = FALSE;
 	}
 
@@ -233,8 +229,7 @@ __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,
-			"__osm_infr_rcv_respond: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Generating successful InformInfo response\n");
 	}
 
@@ -245,8 +240,7 @@ __osm_infr_rcv_respond(IN osm_sa_t * sa,
 				       p_madw->h_bind,
 				       MAD_BLOCK_SIZE, &p_madw->mad_addr);
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_infr_rcv_respond: ERR 4303: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4303: "
 			"Unable to allocate MAD\n");
 		goto Exit;
 	}
@@ -267,8 +261,7 @@ __osm_infr_rcv_respond(IN osm_sa_t * sa,
 				    sa->p_subn);
 
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_infr_rcv_respond: ERR 4304: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4304: "
 			"Unable to send MAD (%s)\n", ib_get_err_str(status));
 		/* osm_mad_pool_put( sa->p_mad_pool, p_resp_madw ); */
 		goto Exit;
@@ -318,8 +311,7 @@ __osm_sa_inform_info_rec_by_comp_mask(IN osm_sa_t * sa,
 	portguid = p_infr->inform_record.subscriber_gid.unicast.interface_id;
 	p_subscriber_port = osm_get_port_by_guid(sa->p_subn, portguid);
 	if (p_subscriber_port == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_sa_inform_info_rec_by_comp_mask: ERR 430D: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 430D: "
 			"Invalid subscriber port guid: 0x%016" PRIx64 "\n",
 			cl_ntoh64(portguid));
 		goto Exit;
@@ -331,16 +323,14 @@ __osm_sa_inform_info_rec_by_comp_mask(IN osm_sa_t * sa,
 	   according to the current partitioning. */
 	if (!osm_physp_share_pkey
 	    (sa->p_log, p_req_physp, p_subscriber_physp)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_sa_inform_info_rec_by_comp_mask: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"requester and subscriber ports don't share pkey\n");
 		goto Exit;
 	}
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_sa_inform_info_rec_by_comp_mask: ERR 430E: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 430E: "
 			"rec_item alloc failed\n");
 		goto Exit;
 	}
@@ -401,8 +391,7 @@ osm_infr_rcv_process_get_method(IN osm_sa_t * sa,
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_infr_rcv_process_get_method: ERR 4309: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4309: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -421,8 +410,7 @@ osm_infr_rcv_process_get_method(IN osm_sa_t * sa,
 	context.sa = sa;
 	context.p_req_physp = p_req_physp;
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_infr_rcv_process_get_method: "
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 		"Query Subscriber GID:0x%016" PRIx64 " : 0x%016" PRIx64
 		"(%02X) Enum:0x%X(%02X)\n",
 		cl_ntoh64(p_rcvd_rec->subscriber_gid.unicast.prefix),
@@ -451,8 +439,7 @@ osm_infr_rcv_process_get_method(IN osm_sa_t * sa,
 			goto Exit;
 		}
 		if (num_rec > 1) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_infr_rcv_process_get_method: ERR 430A: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 430A: "
 				"More than one record for SubnAdmGet (%u)\n",
 				num_rec);
 			osm_sa_send_error(sa, p_madw,
@@ -479,17 +466,14 @@ osm_infr_rcv_process_get_method(IN osm_sa_t * sa,
 	    (MAD_BLOCK_SIZE -
 	     IB_SA_MAD_HDR_SIZE) / sizeof(ib_inform_info_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_infr_rcv_process_get_method: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_infr_rcv_process_get_method: "
-		"Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	/*
 	 * Get a MAD to reply. Address of Mad is in the received mad_wrapper
@@ -501,8 +485,7 @@ osm_infr_rcv_process_get_method(IN osm_sa_t * sa,
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_infr_rcv_process_get_method: ERR 430B: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 430B: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -571,8 +554,7 @@ osm_infr_rcv_process_get_method(IN osm_sa_t * sa,
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_infr_rcv_process_get_method: ERR 430C: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 430C: "
 			"osm_sa_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -633,8 +615,7 @@ osm_infr_rcv_process_set_method(IN osm_sa_t * sa,
 	if (res != IB_SUCCESS) {
 		cl_plock_release(sa->p_lock);
 
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_infr_rcv_process_set_method: ERR 4308 "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4308 "
 			"Subscribe Request from unknown LID: 0x%04X\n",
 			cl_ntoh16(p_madw->mad_addr.dest_lid)
 		    );
@@ -650,8 +631,7 @@ osm_infr_rcv_process_set_method(IN osm_sa_t * sa,
 	if (p_recvd_inform_info->subscribe > 1) {
 		cl_plock_release(sa->p_lock);
 
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_infr_rcv_process_set_method: ERR 4308 "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4308 "
 			"Invalid subscribe: %d\n",
 			p_recvd_inform_info->subscribe);
 		osm_sa_send_error(sa, p_madw,
@@ -672,21 +652,18 @@ osm_infr_rcv_process_set_method(IN osm_sa_t * sa,
 				       inform_info_rec.report_addr.addr_type.
 				       gsi.remote_qp);
 
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"osm_infr_rcv_process_set_method: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Subscribe Request with QPN: 0x%06X\n",
 			cl_ntoh32(inform_info_rec.report_addr.addr_type.gsi.
-				  remote_qp)
-		    );
+				  remote_qp));
 	} else {
 		ib_inform_info_get_qpn_resp_time(p_recvd_inform_info->g_or_v.
 						 generic.qpn_resp_time_val,
 						 &qpn, &resp_time_val);
 
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"osm_infr_rcv_process_set_method: "
-			"UnSubscribe Request with QPN: 0x%06X\n", cl_ntoh32(qpn)
-		    );
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+			"UnSubscribe Request with QPN: 0x%06X\n",
+			cl_ntoh32(qpn));
 	}
 
 	/* If record exists with matching InformInfo */
@@ -699,8 +676,7 @@ osm_infr_rcv_process_set_method(IN osm_sa_t * sa,
 		if (__validate_infr(sa, &inform_info_rec) != TRUE) {
 			cl_plock_release(sa->p_lock);
 
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_infr_rcv_process_set_method: ERR 4305: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4305: "
 				"Failed to validate a new inform object\n");
 
 			/* o13-13.1.1: we need to set the subscribe bit to 0 */
@@ -717,8 +693,7 @@ osm_infr_rcv_process_set_method(IN osm_sa_t * sa,
 			if (p_infr == NULL) {
 				cl_plock_release(sa->p_lock);
 
-				osm_log(sa->p_log, OSM_LOG_ERROR,
-					"osm_infr_rcv_process_set_method: ERR 4306: "
+				OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4306: "
 					"Failed to create a new inform object\n");
 
 				/* o13-13.1.1: we need to set the subscribe bit to 0 */
@@ -741,8 +716,7 @@ osm_infr_rcv_process_set_method(IN osm_sa_t * sa,
 			cl_plock_release(sa->p_lock);
 
 			/* No Such Item - So Error */
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_infr_rcv_process_set_method: ERR 4307: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4307: "
 				"Failed to UnSubscribe to non existing inform object\n");
 
 			/* o13-13.1.1: we need to set the subscribe bit to 0 */
@@ -783,8 +757,7 @@ void osm_infr_rcv_process(IN void *context, IN void *data)
 	CL_ASSERT(p_sa_mad->attr_id == IB_MAD_ATTR_INFORM_INFO);
 
 	if (p_sa_mad->method != IB_MAD_METHOD_SET) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"osm_infr_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_sa_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -816,9 +789,7 @@ void osm_infir_rcv_process(IN void *context, IN void *data)
 
 	if ((p_sa_mad->method != IB_MAD_METHOD_GET) &&
 	    (p_sa_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"osm_infir_rcv_process: "
-			"Unsupported Method (%s)\n",
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_sa_mad->method));
 		osm_sa_send_error(sa, p_madw,
 				  IB_MAD_STATUS_UNSUP_METHOD_ATTR);
diff --git a/opensm/opensm/osm_sa_lft_record.c b/opensm/opensm/osm_sa_lft_record.c
index 042fc68..10c0e71 100644
--- a/opensm/opensm/osm_sa_lft_record.c
+++ b/opensm/opensm/osm_sa_lft_record.c
@@ -87,16 +87,14 @@ __osm_lftr_rcv_new_lftr(IN osm_sa_t * sa,
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_lftr_rcv_new_lftr: ERR 4402: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4402: "
 			"rec_item alloc failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_lftr_rcv_new_lftr: "
+		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)),
@@ -130,8 +128,7 @@ static osm_port_t *__osm_lftr_get_port_by_guid(IN osm_sa_t * sa,
 
 	p_port = osm_get_port_by_guid(sa->p_subn, port_guid);
 	if (!p_port) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_lftr_get_port_by_guid ERR 4404: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "ERR 4404: "
 			"Invalid port GUID 0x%016" PRIx64 "\n", port_guid);
 		p_port = NULL;
 	}
@@ -163,8 +160,7 @@ __osm_lftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
 	    __osm_lftr_get_port_by_guid(sa,
 					p_sw->p_node->node_info.port_guid);
 	if (!p_port) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_lftr_rcv_by_comp_mask: ERR 4405: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4405: "
 			"Failed to find Port by Node Guid:0x%016" PRIx64
 			"\n", cl_ntoh64(p_sw->p_node->node_info.node_guid)
 		    );
@@ -175,8 +171,7 @@ __osm_lftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
 	   the same partition. */
 	p_physp = p_port->p_physp;
 	if (!p_physp) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_lftr_rcv_by_comp_mask: ERR 4406: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4406: "
 			"Failed to find default physical Port by Node Guid:0x%016"
 			PRIx64 "\n",
 			cl_ntoh64(p_sw->p_node->node_info.node_guid)
@@ -191,8 +186,7 @@ __osm_lftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
 
 	/* compare the lids - if required */
 	if (comp_mask & IB_LFTR_COMPMASK_LID) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_lftr_rcv_by_comp_mask: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Comparing lid:0x%02X to port lid range: 0x%02X .. 0x%02X\n",
 			cl_ntoh16(p_rcvd_rec->lid), min_lid_ho, max_lid_ho);
 		/* ok we are ready for range check */
@@ -253,8 +247,7 @@ void osm_lftr_rcv_process(IN void *ctx, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((p_rcvd_mad->method != IB_MAD_METHOD_GET) &&
 	    (p_rcvd_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_lftr_rcv_process: ERR 4408: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4408: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_rcvd_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -268,8 +261,7 @@ void osm_lftr_rcv_process(IN void *ctx, IN void *data)
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_lftr_rcv_process: ERR 4407: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4407: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -303,8 +295,7 @@ void osm_lftr_rcv_process(IN void *ctx, IN void *data)
 			goto Exit;
 		}
 		if (num_rec > 1) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_lftr_rcv_process: ERR 4409: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4409: "
 				"Got more than one record for SubnAdmGet (%u)\n",
 				num_rec);
 			osm_sa_send_error(sa, p_madw,
@@ -330,16 +321,14 @@ void osm_lftr_rcv_process(IN void *ctx, IN void *data)
 	trim_num_rec =
 	    (MAD_BLOCK_SIZE - IB_SA_MAD_HDR_SIZE) / sizeof(ib_lft_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_lftr_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_lftr_rcv_process: " "Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	if ((p_rcvd_mad->method != IB_MAD_METHOD_GETTABLE) && (num_rec == 0)) {
 		osm_sa_send_error(sa, p_madw,
@@ -356,8 +345,7 @@ void osm_lftr_rcv_process(IN void *ctx, IN void *data)
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_lftr_rcv_process: ERR 4410: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4410: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -421,8 +409,7 @@ void osm_lftr_rcv_process(IN void *ctx, IN void *data)
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_lftr_rcv_process: ERR 4411: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4411: "
 			"osm_sa_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
diff --git a/opensm/opensm/osm_sa_link_record.c b/opensm/opensm/osm_sa_link_record.c
index 2a9a3db..1f88d0e 100644
--- a/opensm/opensm/osm_sa_link_record.c
+++ b/opensm/opensm/osm_sa_link_record.c
@@ -78,8 +78,7 @@ __osm_lr_rcv_build_physp_link(IN osm_sa_t * sa,
 
 	p_lr_item = malloc(sizeof(*p_lr_item));
 	if (p_lr_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_lr_rcv_build_physp_link: ERR 1801: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1801: "
 			"Unable to acquire link record\n"
 			"\t\t\t\tFrom port 0x%u\n"
 			"\t\t\t\tTo port   0x%u\n"
@@ -159,20 +158,17 @@ __osm_lr_rcv_get_physp_link(IN osm_sa_t * sa,
 	/* Check that the p_src_physp, p_dest_physp and p_req_physp
 	   all share a pkey (doesn't have to be the same p_key). */
 	if (!osm_physp_share_pkey(sa->p_log, p_src_physp, p_dest_physp)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_lr_rcv_get_physp_link: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Source and Dest PhysPorts do not share PKey\n");
 		goto Exit;
 	}
 	if (!osm_physp_share_pkey(sa->p_log, p_src_physp, p_req_physp)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_lr_rcv_get_physp_link: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Source and Requester PhysPorts do not share PKey\n");
 		goto Exit;
 	}
 	if (!osm_physp_share_pkey(sa->p_log, p_req_physp, p_dest_physp)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_lr_rcv_get_physp_link: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Requester and Dest PhysPorts do not share PKey\n");
 		goto Exit;
 	}
@@ -203,9 +199,7 @@ __osm_lr_rcv_get_physp_link(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,
-			"__osm_lr_rcv_get_physp_link: "
-			"Acquiring link record\n"
+		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)),
@@ -414,8 +408,7 @@ __osm_lr_rcv_get_end_points(IN osm_sa_t * sa,
 			   don't enter it as an error in our own log.
 			   Return an error response to the client.
 			 */
-			osm_log(sa->p_log, OSM_LOG_VERBOSE,
-				"__osm_lr_rcv_get_end_points: "
+			OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 				"No source port with LID = 0x%X\n",
 				cl_ntoh16(p_lr->from_lid));
 
@@ -434,8 +427,7 @@ __osm_lr_rcv_get_end_points(IN osm_sa_t * sa,
 			   don't enter it as an error in our own log.
 			   Return an error response to the client.
 			 */
-			osm_log(sa->p_log, OSM_LOG_VERBOSE,
-				"__osm_lr_rcv_get_end_points: "
+			OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 				"No dest port with LID = 0x%X\n",
 				cl_ntoh16(p_lr->to_lid));
 
@@ -476,8 +468,7 @@ __osm_lr_rcv_respond(IN osm_sa_t * sa,
 	 * If we do a SubnAdmGet and got more than one record it is an error !
 	 */
 	if ((p_rcvd_mad->method == IB_MAD_METHOD_GET) && (num_rec > 1)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_lr_rcv_respond: ERR 1806: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1806: "
 			"Got more than one record for SubnAdmGet (%zu)\n",
 			num_rec);
 		osm_sa_send_error(sa, p_madw,
@@ -497,8 +488,7 @@ __osm_lr_rcv_respond(IN osm_sa_t * sa,
 	trim_num_rec =
 	    (MAD_BLOCK_SIZE - IB_SA_MAD_HDR_SIZE) / sizeof(ib_link_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"__osm_lr_rcv_respond: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
@@ -506,8 +496,7 @@ __osm_lr_rcv_respond(IN osm_sa_t * sa,
 #endif
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_lr_rcv_respond: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Generating response with %zu records", num_rec);
 	}
 
@@ -519,8 +508,7 @@ __osm_lr_rcv_respond(IN osm_sa_t * sa,
 				       num_rec * sizeof(ib_link_record_t) +
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_lr_rcv_respond: ERR 1802: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1802: "
 			"Unable to allocate MAD\n");
 		/* Release the quick pool items */
 		p_lr_item = (osm_lr_item_t *) cl_qlist_remove_head(p_list);
@@ -588,8 +576,7 @@ __osm_lr_rcv_respond(IN osm_sa_t * sa,
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_lr_rcv_respond: ERR 1803: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1803: "
 			"Unable to send MAD (%s)\n", ib_get_err_str(status));
 		/*       osm_mad_pool_put( sa->p_mad_pool, p_resp_madw ); */
 		goto Exit;
@@ -625,8 +612,7 @@ void osm_lr_rcv_process(IN void *context, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((p_sa_mad->method != IB_MAD_METHOD_GET) &&
 	    (p_sa_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_lr_rcv_process: ERR 1804: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1804: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_sa_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -640,8 +626,7 @@ void osm_lr_rcv_process(IN void *context, IN void *data)
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_lr_rcv_process: ERR 1805: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1805: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
diff --git a/opensm/opensm/osm_sa_mad_ctrl.c b/opensm/opensm/osm_sa_mad_ctrl.c
index 6182470..fc475f7 100644
--- a/opensm/opensm/osm_sa_mad_ctrl.c
+++ b/opensm/opensm/osm_sa_mad_ctrl.c
@@ -123,8 +123,7 @@ __osm_sa_mad_ctrl_process(IN osm_sa_mad_ctrl_t * const p_ctrl,
 	    (p_ctrl->p_subn->opt.max_msg_fifo_timeout) &&
 	    (last_dispatched_msg_queue_time_msec >
 	     p_ctrl->p_subn->opt.max_msg_fifo_timeout)) {
-		osm_log(p_ctrl->p_log, OSM_LOG_INFO,
-			"__osm_sa_mad_ctrl_process: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_INFO,
 			/*             "Responding BUSY status since the dispatcher is already" */
 			"Dropping MAD since the dispatcher is already"
 			" overloaded with %u messages and queue time of:"
@@ -222,8 +221,7 @@ __osm_sa_mad_ctrl_process(IN osm_sa_mad_ctrl_t * const p_ctrl,
 #endif
 
 	default:
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sa_mad_ctrl_process: ERR 1A01: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A01: "
 			"Unsupported attribute = 0x%X\n",
 			cl_ntoh16(p_sa_mad->attr_id));
 		osm_dump_sa_mad(p_ctrl->p_log, p_sa_mad, OSM_LOG_ERROR);
@@ -235,8 +233,7 @@ __osm_sa_mad_ctrl_process(IN osm_sa_mad_ctrl_t * const p_ctrl,
 		   processing by the appropriate controller.
 		 */
 
-		osm_log(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"__osm_sa_mad_ctrl_process: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
 			"Posting Dispatcher message %s\n",
 			osm_get_disp_msg_str(msg_id));
 
@@ -247,8 +244,7 @@ __osm_sa_mad_ctrl_process(IN osm_sa_mad_ctrl_t * const p_ctrl,
 				      p_ctrl);
 
 		if (status != CL_SUCCESS) {
-			osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-				"__osm_sa_mad_ctrl_process: ERR 1A02: "
+			OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A02: "
 				"Dispatcher post message failed (%s) for attribute = 0x%X\n",
 				CL_STATUS_MSG(status),
 				cl_ntoh16(p_sa_mad->attr_id));
@@ -306,8 +302,7 @@ __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,
-			"__osm_sa_mad_ctrl_rcv_callback: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
 			"%u SA MADs received\n", p_ctrl->p_stats->sa_mads_rcvd);
 	}
 
@@ -321,16 +316,14 @@ __osm_sa_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 	 */
 	if (p_ctrl->p_subn->sm_state != IB_SMINFO_STATE_MASTER) {
 		cl_atomic_inc(&p_ctrl->p_stats->sa_mads_ignored);
-		osm_log(p_ctrl->p_log, OSM_LOG_VERBOSE,
-			"__osm_sa_mad_ctrl_rcv_callback: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_VERBOSE,
 			"Received SA MAD while SM not MASTER. MAD ignored\n");
 		osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw);
 		goto Exit;
 	}
 	if (p_ctrl->p_subn->first_time_master_sweep == TRUE) {
 		cl_atomic_inc(&p_ctrl->p_stats->sa_mads_ignored);
-		osm_log(p_ctrl->p_log, OSM_LOG_VERBOSE,
-			"__osm_sa_mad_ctrl_rcv_callback: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_VERBOSE,
 			"Received SA MAD while SM in first sweep. MAD ignored\n");
 		osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw);
 		goto Exit;
@@ -348,8 +341,7 @@ __osm_sa_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 	 */
 	if ((p_sa_mad->sm_key != 0) &&
 	    (p_sa_mad->sm_key != p_ctrl->p_subn->opt.sm_key)) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sa_mad_ctrl_rcv_callback: ERR 1A04: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A04: "
 			"Non-Zero SA MAD SM_Key: 0x%" PRIx64 " != SM_Key: 0x%"
 			PRIx64 "; MAD ignored\n", cl_ntoh64(p_sa_mad->sm_key),
 			cl_ntoh64(p_ctrl->p_subn->opt.sm_key)
@@ -362,8 +354,7 @@ __osm_sa_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 	case IB_MAD_METHOD_REPORT_RESP:
 		/* we do not really do anything with report represses -
 		   just retire the transaction */
-		osm_log(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"__osm_sa_mad_ctrl_rcv_callback: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
 			"Received Report Repress. Retiring the transaction\n");
 
 		if (p_req_madw)
@@ -384,8 +375,7 @@ __osm_sa_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 
 	default:
 		cl_atomic_inc(&p_ctrl->p_stats->sa_mads_rcvd_unknown);
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sa_mad_ctrl_rcv_callback: ERR 1A05: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A05: "
 			"Unsupported method = 0x%X\n", p_sa_mad->method);
 		osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw);
 		goto Exit;
@@ -424,8 +414,7 @@ __osm_sa_mad_ctrl_send_err_callback(IN void *bind_context,
 
 	OSM_LOG_ENTER(p_ctrl->p_log);
 
-	osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-		"__osm_sa_mad_ctrl_send_err_callback: ERR 1A06: "
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A06: "
 		"MAD transaction completed in error\n");
 
 	/*
@@ -447,8 +436,7 @@ __osm_sa_mad_ctrl_send_err_callback(IN void *bind_context,
 
 	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,
-				"__osm_sa_mad_ctrl_send_err_callback: "
+			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)));
@@ -460,8 +448,7 @@ __osm_sa_mad_ctrl_send_err_callback(IN void *bind_context,
 				      __osm_sa_mad_ctrl_disp_done_callback,
 				      p_ctrl);
 		if (status != CL_SUCCESS) {
-			osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-				"__osm_sa_mad_ctrl_send_err_callback: ERR 1A07: "
+			OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A07: "
 				"Dispatcher post message failed (%s)\n",
 				CL_STATUS_MSG(status));
 		}
@@ -532,8 +519,7 @@ osm_sa_mad_ctrl_init(IN osm_sa_mad_ctrl_t * const p_ctrl,
 					  CL_DISP_MSGID_NONE, NULL, p_ctrl);
 
 	if (p_ctrl->h_disp == CL_DISP_INVALID_HANDLE) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_sa_mad_ctrl_init: ERR 1A08: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 1A08: "
 			"Dispatcher registration failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
@@ -556,8 +542,7 @@ osm_sa_mad_ctrl_bind(IN osm_sa_mad_ctrl_t * const p_ctrl,
 	OSM_LOG_ENTER(p_ctrl->p_log);
 
 	if (p_ctrl->h_bind != OSM_BIND_INVALID_HANDLE) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"osm_sa_mad_ctrl_bind: ERR 1A09: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A09: "
 			"Multiple binds not allowed\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -572,8 +557,7 @@ osm_sa_mad_ctrl_bind(IN osm_sa_mad_ctrl_t * const p_ctrl,
 	bind_info.recv_q_size = OSM_SM_DEFAULT_QP1_RCV_SIZE;
 	bind_info.send_q_size = OSM_SM_DEFAULT_QP1_SEND_SIZE;
 
-	osm_log(p_ctrl->p_log, OSM_LOG_VERBOSE,
-		"osm_sa_mad_ctrl_bind: "
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_VERBOSE,
 		"Binding to port GUID 0x%" PRIx64 "\n", cl_ntoh64(port_guid));
 
 	p_ctrl->h_bind = osm_vendor_bind(p_ctrl->p_vendor,
@@ -585,8 +569,7 @@ osm_sa_mad_ctrl_bind(IN osm_sa_mad_ctrl_t * const p_ctrl,
 
 	if (p_ctrl->h_bind == OSM_BIND_INVALID_HANDLE) {
 		status = IB_ERROR;
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"osm_sa_mad_ctrl_bind: ERR 1A10: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A10: "
 			"Vendor specific bind failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -606,8 +589,7 @@ ib_api_status_t osm_sa_mad_ctrl_unbind(IN osm_sa_mad_ctrl_t * const p_ctrl)
 	OSM_LOG_ENTER(p_ctrl->p_log);
 
 	if (p_ctrl->h_bind == OSM_BIND_INVALID_HANDLE) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"osm_sa_mad_ctrl_unbind: ERR 1A11: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A11: "
 			"No previous bind\n");
 		status = IB_ERROR;
 		goto Exit;
diff --git a/opensm/opensm/osm_sa_mcmember_record.c b/opensm/opensm/osm_sa_mcmember_record.c
index f3cbf6c..63202e8 100644
--- a/opensm/opensm/osm_sa_mcmember_record.c
+++ b/opensm/opensm/osm_sa_mcmember_record.c
@@ -171,8 +171,7 @@ __get_new_mlid(IN osm_sa_t * sa, IN ib_net16_t requested_mlid)
 	p_mgrp = (osm_mgrp_t *) cl_qmap_head(&p_subn->mgrp_mlid_tbl);
 	if (p_mgrp == (osm_mgrp_t *) cl_qmap_end(&p_subn->mgrp_mlid_tbl)) {
 		mlid = IB_LID_MCAST_START_HO;
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"__get_new_mlid: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"No multicast groups found using minimal mlid:0x%04X\n",
 			mlid);
 		goto Exit;
@@ -192,8 +191,7 @@ __get_new_mlid(IN osm_sa_t * sa, IN ib_net16_t requested_mlid)
 	while (p_mgrp != (osm_mgrp_t *) cl_qmap_end(&p_subn->mgrp_mlid_tbl)) {
 		/* ignore mgrps marked for deletion */
 		if (p_mgrp->to_be_deleted == FALSE) {
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__get_new_mlid: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"Found mgrp with lid:0x%X MGID: 0x%016" PRIx64
 				" : " "0x%016" PRIx64 "\n",
 				cl_ntoh16(p_mgrp->mlid),
@@ -205,8 +203,7 @@ __get_new_mlid(IN osm_sa_t * sa, IN ib_net16_t requested_mlid)
 			/* Map in table */
 			if (cl_ntoh16(p_mgrp->mlid) >
 			    sa->p_subn->max_multicast_lid_ho) {
-				osm_log(sa->p_log, OSM_LOG_ERROR,
-					"__get_new_mlid: ERR 1B27: "
+				OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B27: "
 					"Found mgrp with mlid:0x%04X > max allowed mlid:0x%04X\n",
 					cl_ntoh16(p_mgrp->mlid),
 					max_num_mlids + IB_LID_MCAST_START_HO);
@@ -225,12 +222,10 @@ __get_new_mlid(IN osm_sa_t * sa, IN ib_net16_t requested_mlid)
 	/* did it go above the maximal mlid allowed */
 	if (idx < max_num_mlids) {
 		mlid = idx + IB_LID_MCAST_START_HO;
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"__get_new_mlid: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Found available mlid:0x%04X at idx:%u\n", mlid, idx);
 	} else {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__get_new_mlid: ERR 1B23: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B23: "
 			"All available:%u mlids are taken\n", max_num_mlids);
 		mlid = 0;
 	}
@@ -289,8 +284,7 @@ __add_new_mgrp_port(IN osm_sa_t * sa,
 				      sa->p_subn,
 				      p_mad_addr, &requester_gid);
 	if (res != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__add_new_mgrp_port: ERR 1B29: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B29: "
 			"Could not find GID for requester\n");
 
 		return IB_INVALID_PARAMETER;
@@ -299,16 +293,14 @@ __add_new_mgrp_port(IN osm_sa_t * sa,
 	if (!memcmp(&p_recvd_mcmember_rec->port_gid, &requester_gid,
 		    sizeof(ib_gid_t))) {
 		proxy_join = FALSE;
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__add_new_mgrp_port: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Create new port with proxy_join FALSE\n");
 	} else {
 		/* The port is not the one specified in PortGID.
 		   The check that the requester is in the same partition as
 		   the PortGID is done before - just need to update the proxy_join. */
 		proxy_join = TRUE;
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__add_new_mgrp_port: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Create new port with proxy_join TRUE\n");
 	}
 
@@ -317,8 +309,7 @@ __add_new_mgrp_port(IN osm_sa_t * sa,
 					  p_recvd_mcmember_rec->scope_state,
 					  proxy_join);
 	if (*pp_mcmr_port == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__add_new_mgrp_port: ERR 1B06: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B06: "
 			"osm_mgrp_add_port failed\n");
 
 		return IB_INSUFFICIENT_MEMORY;
@@ -408,8 +399,7 @@ __osm_mcmr_rcv_respond(IN osm_sa_t * sa,
 				    sa->p_subn);
 
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mcmr_rcv_respond: ERR 1B07: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B07: "
 			"Unable to send MAD (%s) for TID <0x%" PRIx64 ">\n",
 			ib_get_err_str(status), p_resp_sa_mad->trans_id);
 	}
@@ -445,8 +435,7 @@ __validate_more_comp_fields(osm_log_t * p_log,
 		switch (mtu_sel) {
 		case 0:	/* Greater than MTU specified */
 			if (mtu_mgrp <= mtu_required) {
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"__validate_more_comp_fields: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Requested mcast group has MTU %x, which is not greater than %x\n",
 					mtu_mgrp, mtu_required);
 				return FALSE;
@@ -454,8 +443,7 @@ __validate_more_comp_fields(osm_log_t * p_log,
 			break;
 		case 1:	/* Less than MTU specified */
 			if (mtu_mgrp >= mtu_required) {
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"__validate_more_comp_fields: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Requested mcast group has MTU %x, which is not less than %x\n",
 					mtu_mgrp, mtu_required);
 				return FALSE;
@@ -463,8 +451,7 @@ __validate_more_comp_fields(osm_log_t * p_log,
 			break;
 		case 2:	/* Exactly MTU specified */
 			if (mtu_mgrp != mtu_required) {
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"__validate_more_comp_fields: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Requested mcast group has MTU %x, which is not equal to %x\n",
 					mtu_mgrp, mtu_required);
 				return FALSE;
@@ -484,8 +471,7 @@ __validate_more_comp_fields(osm_log_t * p_log,
 		switch (rate_sel) {
 		case 0:	/* Greater than RATE specified */
 			if (rate_mgrp <= rate_required) {
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"__validate_more_comp_fields: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Requested mcast group has RATE %x, which is not greater than %x\n",
 					rate_mgrp, rate_required);
 				return FALSE;
@@ -493,8 +479,7 @@ __validate_more_comp_fields(osm_log_t * p_log,
 			break;
 		case 1:	/* Less than RATE specified */
 			if (rate_mgrp >= rate_required) {
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"__validate_more_comp_fields: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Requested mcast group has RATE %x, which is not less than %x\n",
 					rate_mgrp, rate_required);
 				return FALSE;
@@ -502,8 +487,7 @@ __validate_more_comp_fields(osm_log_t * p_log,
 			break;
 		case 2:	/* Exactly RATE specified */
 			if (rate_mgrp != rate_required) {
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"__validate_more_comp_fields: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Requested mcast group has RATE %x, which is not equal to %x\n",
 					rate_mgrp, rate_required);
 				return FALSE;
@@ -533,8 +517,7 @@ __validate_port_caps(osm_log_t * const p_log,
 	mtu_required = ib_port_info_get_mtu_cap(&p_physp->port_info);
 	mtu_mgrp = (uint8_t) (p_mgrp->mcmember_rec.mtu & 0x3F);
 	if (mtu_required < mtu_mgrp) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"__validate_port_caps: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"Port's MTU %x is less than %x\n",
 			mtu_required, mtu_mgrp);
 		return FALSE;
@@ -543,8 +526,7 @@ __validate_port_caps(osm_log_t * const p_log,
 	rate_required = ib_port_info_compute_rate(&p_physp->port_info);
 	rate_mgrp = (uint8_t) (p_mgrp->mcmember_rec.rate & 0x3F);
 	if (rate_required < rate_mgrp) {
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"__validate_port_caps: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"Port's RATE %x is less than %x\n",
 			rate_required, rate_mgrp);
 		return FALSE;
@@ -582,8 +564,7 @@ __validate_modify(IN osm_sa_t * sa,
 
 	/* o15-0.2.1: If this is a new port being added - nothing to check */
 	if (!osm_mgrp_is_port_present(p_mgrp, portguid, pp_mcm_port)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__validate_modify: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"This is a new port in the MC group\n");
 		return TRUE;
 	}
@@ -598,8 +579,7 @@ __validate_modify(IN osm_sa_t * sa,
 					      p_mad_addr, &request_gid);
 
 		if (res != IB_SUCCESS) {
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__validate_modify: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"Could not find port for requested address\n");
 			return FALSE;
 		}
@@ -607,8 +587,7 @@ __validate_modify(IN osm_sa_t * sa,
 		if (memcmp
 		    (&((*pp_mcm_port)->port_gid), &request_gid,
 		     sizeof(ib_gid_t))) {
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__validate_modify: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"No ProxyJoin but different ports: stored:0x%016"
 				PRIx64 " request:0x%016" PRIx64 "\n",
 				cl_ntoh64((*pp_mcm_port)->port_gid.unicast.
@@ -630,8 +609,7 @@ __validate_modify(IN osm_sa_t * sa,
 		if (!osm_physp_has_pkey(sa->p_log, p_mgrp->mcmember_rec.pkey,
 					p_request_physp)) {
 			/* the request port is not part of the partition for this mgrp */
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__validate_modify: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"ProxyJoin but port not in partition. stored:0x%016"
 				PRIx64 " request:0x%016" PRIx64 "\n",
 				cl_ntoh64((*pp_mcm_port)->port_gid.unicast.
@@ -682,8 +660,7 @@ __validate_delete(IN osm_sa_t * sa,
 
 	/* 1 */
 	if (!osm_mgrp_is_port_present(p_mgrp, portguid, pp_mcm_port)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__validate_delete: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Failed to find the port in the MC group\n");
 		return FALSE;
 	}
@@ -691,8 +668,7 @@ __validate_delete(IN osm_sa_t * sa,
 	/* 2 */
 	if (!(p_recvd_mcmember_rec->scope_state & 0x0F &
 	      (*pp_mcm_port)->scope_state)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__validate_delete: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Could not find any matching bits in the stored and requested JoinStates\n");
 		return FALSE;
 	}
@@ -701,8 +677,7 @@ __validate_delete(IN osm_sa_t * sa,
 	if (((p_recvd_mcmember_rec->scope_state & 0x0F) |
 	     (0x0F & (*pp_mcm_port)->scope_state)) !=
 	    (0x0F & (*pp_mcm_port)->scope_state)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__validate_delete: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Some bits in the request JoinState (0x%X) are not set in the stored port (0x%X)\n",
 			(p_recvd_mcmember_rec->scope_state & 0x0F),
 			(0x0F & (*pp_mcm_port)->scope_state)
@@ -714,8 +689,7 @@ __validate_delete(IN osm_sa_t * sa,
 	/* Validate according the the proxy_join (o15-0.1.2) */
 	if (__validate_modify(sa, p_mgrp, p_mad_addr, p_recvd_mcmember_rec,
 			      pp_mcm_port) == FALSE) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__validate_delete: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"proxy_join validation failure\n");
 		return FALSE;
 	}
@@ -775,8 +749,7 @@ __validate_requested_mgid(IN osm_sa_t * sa,
 
 	/* 14-a: mcast GID must start with 0xFF */
 	if (p_mcm_rec->mgid.multicast.header[0] != 0xFF) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__validate_requested_mgid: ERR 1B01: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B01: "
 			"Wrong MGID Prefix 0x%02X must be 0xFF\n",
 			cl_ntoh16(p_mcm_rec->mgid.multicast.header[0])
 		    );
@@ -788,8 +761,7 @@ __validate_requested_mgid(IN osm_sa_t * sa,
 	memcpy(&signature, &(p_mcm_rec->mgid.multicast.raw_group_id),
 	       sizeof(signature));
 	signature = cl_ntoh16(signature);
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"__validate_requested_mgid:  "
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 		"MGID Signed as 0x%04X\n", signature);
 
 	/*
@@ -812,8 +784,7 @@ __validate_requested_mgid(IN osm_sa_t * sa,
 	 *
 	 */
 	if (signature == 0x401B || signature == 0x601B) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__validate_requested_mgid:  "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Skipping MGID Validation for IPoIB Signed (0x%04X) MGIDs\n",
 			signature);
 		goto Exit;
@@ -821,8 +792,7 @@ __validate_requested_mgid(IN osm_sa_t * sa,
 
 	/* 14-b: the 3 upper bits in the "flags" should be zero: */
 	if (p_mcm_rec->mgid.multicast.header[1] & 0xE0) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__validate_requested_mgid: ERR 1B28: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B28: "
 			"MGID uses Reserved Flags: flags=0x%X\n",
 			(p_mcm_rec->mgid.multicast.header[1] & 0xE0) >> 4);
 		valid = FALSE;
@@ -834,8 +804,7 @@ __validate_requested_mgid(IN osm_sa_t * sa,
 	if ((signature == 0xA01B) &&
 	    ((p_mcm_rec->mgid.multicast.header[1] & 0x0F) ==
 	     IB_MC_SCOPE_LINK_LOCAL)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__validate_requested_mgid: ERR 1B24: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B24: "
 			"MGID uses 0xA01B signature but with link-local scope\n");
 		valid = FALSE;
 		goto Exit;
@@ -893,8 +862,7 @@ __mgrp_request_is_realizable(IN osm_sa_t * sa,
 		switch (mtu_sel) {
 		case 0:	/* Greater than MTU specified */
 			if (port_mtu && mtu_required >= port_mtu) {
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"__mgrp_request_is_realizable: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Requested MTU %x >= the port\'s mtu:%x\n",
 					mtu_required, port_mtu);
 				return FALSE;
@@ -922,8 +890,7 @@ __mgrp_request_is_realizable(IN osm_sa_t * sa,
 		}
 		/* make sure it still be in the range */
 		if (mtu < IB_MIN_MTU || mtu > IB_MAX_MTU) {
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__mgrp_request_is_realizable: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Calculated MTU %x is out of range\n", mtu);
 			return FALSE;
 		}
@@ -942,8 +909,7 @@ __mgrp_request_is_realizable(IN osm_sa_t * sa,
 		switch (rate_sel) {
 		case 0:	/* Greater than RATE specified */
 			if (port_rate && rate_required >= port_rate) {
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"__mgrp_request_is_realizable: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Requested RATE %x >= the port\'s rate:%x\n",
 					rate_required, port_rate);
 				return FALSE;
@@ -971,8 +937,7 @@ __mgrp_request_is_realizable(IN osm_sa_t * sa,
 		}
 		/* make sure it still is in the range */
 		if (rate < IB_MIN_RATE || rate > IB_MAX_RATE) {
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"__mgrp_request_is_realizable: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Calculated RATE %x is out of range\n", rate);
 			return FALSE;
 		}
@@ -1019,15 +984,13 @@ osm_mcmr_rcv_create_new_mgrp(IN osm_sa_t * sa,
 	 */
 	mlid = __get_new_mlid(sa, mcm_rec.mlid);
 	if (mlid == 0) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_mcmr_rcv_create_new_mgrp: ERR 1B19: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B19: "
 			"__get_new_mlid failed\n");
 		status = IB_SA_MAD_STATUS_NO_RESOURCES;
 		goto Exit;
 	}
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_mcmr_rcv_create_new_mgrp: "
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 		"Obtained new mlid 0x%X\n", cl_ntoh16(mlid));
 
 	/* we need to create the new MGID if it was not defined */
@@ -1056,8 +1019,7 @@ osm_mcmr_rcv_create_new_mgrp(IN osm_sa_t * sa,
 		/* HACK: how do we get a unique number - use the mlid twice */
 		memcpy(&p_mgid->raw[10], &mlid, sizeof(uint16_t));
 		memcpy(&p_mgid->raw[12], &mlid, sizeof(uint16_t));
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"osm_mcmr_rcv_create_new_mgrp: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Allocated new MGID:0x%016" PRIx64 " : "
 			"0x%016" PRIx64 "\n",
 			cl_ntoh64(p_mgid->unicast.prefix),
@@ -1066,8 +1028,7 @@ osm_mcmr_rcv_create_new_mgrp(IN osm_sa_t * sa,
 		/* a specific MGID was requested so validate the resulting MGID */
 		valid = __validate_requested_mgid(sa, &mcm_rec);
 		if (!valid) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_mcmr_rcv_create_new_mgrp: ERR 1B22: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B22: "
 				"Invalid requested MGID\n");
 			__free_mlid(sa, mlid);
 			status = IB_SA_MAD_STATUS_REQ_INVALID;
@@ -1078,8 +1039,7 @@ osm_mcmr_rcv_create_new_mgrp(IN osm_sa_t * sa,
 	/* check the requested parameters are realizable */
 	if (__mgrp_request_is_realizable(sa, comp_mask, &mcm_rec, p_physp) ==
 	    FALSE) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_mcmr_rcv_create_new_mgrp: ERR 1B26: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B26: "
 			"Requested MGRP parameters are not realizable\n");
 		__free_mlid(sa, mlid);
 		status = IB_SA_MAD_STATUS_REQ_INVALID;
@@ -1089,8 +1049,7 @@ osm_mcmr_rcv_create_new_mgrp(IN osm_sa_t * sa,
 	/* create a new MC Group */
 	*pp_mgrp = osm_mgrp_new(mlid);
 	if (*pp_mgrp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_mcmr_rcv_create_new_mgrp: ERR 1B08: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B08: "
 			"osm_mgrp_new failed\n");
 		__free_mlid(sa, mlid);
 		status = IB_SA_MAD_STATUS_NO_RESOURCES;
@@ -1118,8 +1077,7 @@ osm_mcmr_rcv_create_new_mgrp(IN osm_sa_t * sa,
 	    (osm_mgrp_t *) cl_qmap_get(&sa->p_subn->mgrp_mlid_tbl, mlid);
 	if (p_prev_mgrp !=
 	    (osm_mgrp_t *) cl_qmap_end(&sa->p_subn->mgrp_mlid_tbl)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"osm_mcmr_rcv_create_new_mgrp: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Found previous group for mlid:0x%04x - Need to destroy it\n",
 			cl_ntoh16(mlid));
 		cl_qmap_remove_item(&sa->p_subn->mgrp_mlid_tbl,
@@ -1186,7 +1144,7 @@ __search_mgrp_by_mgid(IN cl_map_item_t * const p_map_item, IN void *context)
 			    g_prefix == rcv_prefix &&
 			    (g_interface_id & INT_ID_MASK) ==
 			     (rcv_interface_id & INT_ID_MASK)) {
-				osm_log(sa->p_log, OSM_LOG_INFO,
+				OSM_LOG(sa->p_log, OSM_LOG_INFO,
 					"Special Case Mcast Join for MGID "
 					" MGID 0x%016"PRIx64" : 0x%016"PRIx64"\n",
 					rcv_prefix, rcv_interface_id);
@@ -1197,8 +1155,7 @@ __search_mgrp_by_mgid(IN cl_map_item_t * const p_map_item, IN void *context)
 	}
 
 	if (p_ctxt->p_mgrp) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__search_mgrp_by_mgid: ERR 1B30: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B30: "
 			"Multiple MC groups for same MGID\n");
 		return;
 	}
@@ -1278,8 +1235,7 @@ __osm_mcmr_rcv_leave_mgrp(IN osm_sa_t * sa,
 	mcmember_rec = *p_recvd_mcmember_rec;
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mcmr_rcv_leave_mgrp: Dump of record\n");
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of record\n");
 		osm_dump_mc_record(sa->p_log, &mcmember_rec, OSM_LOG_DEBUG);
 	}
 
@@ -1316,8 +1272,7 @@ __osm_mcmr_rcv_leave_mgrp(IN osm_sa_t * sa,
 
 				CL_PLOCK_RELEASE(sa->p_lock);
 
-				osm_log(sa->p_log, OSM_LOG_DEBUG,
-					"__osm_mcmr_rcv_leave_mgrp: "
+				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 					"After update JoinState != 0. Updating from 0x%X to 0x%X\n",
 					port_join_state, new_join_state);
 			} else {
@@ -1332,15 +1287,13 @@ __osm_mcmr_rcv_leave_mgrp(IN osm_sa_t * sa,
 				    osm_sm_mcgrp_leave(sa->sm, mlid,
 						       portguid);
 				if (status != IB_SUCCESS) {
-					osm_log(sa->p_log, OSM_LOG_ERROR,
-						"__osm_mcmr_rcv_leave_mgrp: ERR 1B09: "
+					OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B09: "
 						"osm_sm_mcgrp_leave failed\n");
 				}
 			}
 		} else {
 			CL_PLOCK_RELEASE(sa->p_lock);
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mcmr_rcv_leave_mgrp: ERR 1B25: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B25: "
 				"Received an invalid delete request for "
 				"MGID: 0x%016" PRIx64 " : "
 				"0x%016" PRIx64 " for "
@@ -1360,8 +1313,7 @@ __osm_mcmr_rcv_leave_mgrp(IN osm_sa_t * sa,
 		}
 	} else {
 		CL_PLOCK_RELEASE(sa->p_lock);
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mcmr_rcv_leave_mgrp: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Failed since multicast group not present\n");
 		sa_status = IB_SA_MAD_STATUS_REQ_INVALID;
 		osm_sa_send_error(sa, p_madw, sa_status);
@@ -1412,9 +1364,7 @@ __osm_mcmr_rcv_join_mgrp(IN osm_sa_t * sa,
 	mcmember_rec = *p_recvd_mcmember_rec;
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mcmr_rcv_join_mgrp: "
-			"Dump of incoming record\n");
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Dump of incoming record\n");
 		osm_dump_mc_record(sa->p_log, &mcmember_rec, OSM_LOG_DEBUG);
 	}
 
@@ -1425,8 +1375,7 @@ __osm_mcmr_rcv_join_mgrp(IN osm_sa_t * sa,
 	if (!p_port) {
 		CL_PLOCK_RELEASE(sa->p_lock);
 
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mcmr_rcv_join_mgrp: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Unknown port GUID 0x%016" PRIx64 "\n", portguid);
 		sa_status = IB_SA_MAD_STATUS_REQ_INVALID;
 		osm_sa_send_error(sa, p_madw, sa_status);
@@ -1448,8 +1397,7 @@ __osm_mcmr_rcv_join_mgrp(IN osm_sa_t * sa,
 	if (!osm_physp_share_pkey(sa->p_log, p_physp, p_request_physp)) {
 		CL_PLOCK_RELEASE(sa->p_lock);
 
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mcmr_rcv_join_mgrp: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Port and requester don't share pkey\n");
 		sa_status = IB_SA_MAD_STATUS_REQ_INVALID;
 		osm_sa_send_error(sa, p_madw, sa_status);
@@ -1465,8 +1413,7 @@ __osm_mcmr_rcv_join_mgrp(IN osm_sa_t * sa,
 		/* check for JoinState.FullMember = 1 o15.0.1.9 */
 		if ((join_state & 0x01) != 0x01) {
 			CL_PLOCK_RELEASE(sa->p_lock);
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mcmr_rcv_join_mgrp: ERR 1B10: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B10: "
 				"Provided Join State != FullMember - required for create, "
 				"MGID: 0x%016" PRIx64 " : "
 				"0x%016" PRIx64 " from port 0x%016" PRIx64
@@ -1502,15 +1449,12 @@ __osm_mcmr_rcv_join_mgrp(IN osm_sa_t * sa,
 		} else {
 			CL_PLOCK_RELEASE(sa->p_lock);
 
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mcmr_rcv_join_mgrp: ERR 1B11: "
-				"method = %s, "
-				"scope_state = 0x%x, "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B11: "
+				"method = %s, scope_state = 0x%x, "
 				"component mask = 0x%016" PRIx64 ", "
 				"expected comp mask = 0x%016" PRIx64 ", "
-				"MGID: 0x%016" PRIx64 " : "
-				"0x%016" PRIx64 " from port 0x%016" PRIx64
-				" (%s)\n",
+				"MGID: 0x%016" PRIx64 " : 0x%016" PRIx64
+				" from port 0x%016" PRIx64 " (%s)\n",
 				ib_get_sa_method_str(p_sa_mad->method),
 				p_recvd_mcmember_rec->scope_state,
 				cl_ntoh64(p_sa_mad->comp_mask),
@@ -1568,8 +1512,7 @@ __osm_mcmr_rcv_join_mgrp(IN osm_sa_t * sa,
 
 		CL_PLOCK_RELEASE(sa->p_lock);
 
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mcmr_rcv_join_mgrp: ERR 1B12: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B12: "
 			"__validate_more_comp_fields, __validate_port_caps, "
 			"or JoinState = 0 failed from port 0x%016" PRIx64
 			" (%s), " "sending IB_SA_MAD_STATUS_REQ_INVALID\n",
@@ -1595,8 +1538,7 @@ __osm_mcmr_rcv_join_mgrp(IN osm_sa_t * sa,
 		if (!valid) {
 			CL_PLOCK_RELEASE(sa->p_lock);
 
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mcmr_rcv_join_mgrp: ERR 1B13: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B13: "
 				"__validate_modify failed from port 0x%016"
 				PRIx64 " (%s), "
 				"sending IB_SA_MAD_STATUS_REQ_INVALID\n",
@@ -1647,8 +1589,7 @@ __osm_mcmr_rcv_join_mgrp(IN osm_sa_t * sa,
 			      interface_id, req_type);
 
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mcmr_rcv_join_mgrp: ERR 1B14: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B14: "
 			"osm_sm_mcgrp_join failed from port 0x%016" PRIx64
 			" (%s), " "sending IB_SA_MAD_STATUS_NO_RESOURCES\n",
 			cl_ntoh64(portguid), p_port->p_node->print_desc);
@@ -1697,8 +1638,7 @@ __osm_mcmr_rcv_new_mcmr(IN osm_sa_t * sa,
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mcmr_rcv_new_mcmr: ERR 1B15: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B15: "
 			"rec_item alloc failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
@@ -1744,14 +1684,12 @@ __osm_sa_mcm_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
 
 	OSM_LOG_ENTER(sa->p_log);
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"__osm_sa_mcm_by_comp_mask_cb: "
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 		"Checking mlid:0x%X\n", cl_ntoh16(p_mgrp->mlid));
 
 	/* the group might be marked for deletion */
 	if (p_mgrp->to_be_deleted) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_sa_mcm_by_comp_mask_cb: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Group mlid:0x%X is marked to be deleted\n",
 			cl_ntoh16(p_mgrp->mlid));
 		goto Exit;
@@ -1848,8 +1786,7 @@ __osm_sa_mcm_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
 	/* Many MC records returned */
 	if ((p_ctxt->trusted_req == TRUE)
 	    && !(IB_MCR_COMPMASK_PORT_GID & comp_mask)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_sa_mcm_by_comp_mask_cb: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Trusted req is TRUE and no specific port defined\n");
 
 		/* return all the ports that match in this MC group */
@@ -1865,8 +1802,7 @@ __osm_sa_mcm_by_comp_mask_cb(IN cl_map_item_t * const p_map_item,
 				memcpy(&(match_rec.port_gid),
 				       &(p_mcm_port->port_gid),
 				       sizeof(ib_gid_t));
-				osm_log(sa->p_log, OSM_LOG_DEBUG,
-					"__osm_sa_mcm_by_comp_mask_cb: "
+				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 					"Record of port_gid: 0x%016" PRIx64
 					"0x%016" PRIx64
 					" in multicast_lid: 0x%X is returned\n",
@@ -1948,8 +1884,7 @@ __osm_mcmr_query_mgrp(IN osm_sa_t * sa,
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mcmr_query_mgrp: ERR 1B04: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B04: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -1978,8 +1913,7 @@ __osm_mcmr_query_mgrp(IN osm_sa_t * sa,
 	 * If we do a SubnAdmGet and got more than one record it is an error !
 	 */
 	if ((p_rcvd_mad->method == IB_MAD_METHOD_GET) && (num_rec > 1)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mcmr_query_mgrp: ERR 1B05: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B05: "
 			"Got more than one record for SubnAdmGet (%u)\n",
 			num_rec);
 		osm_sa_send_error(sa, p_madw,
@@ -2003,16 +1937,14 @@ __osm_mcmr_query_mgrp(IN osm_sa_t * sa,
 	trim_num_rec =
 	    (MAD_BLOCK_SIZE - IB_SA_MAD_HDR_SIZE) / sizeof(ib_member_rec_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"__osm_mcmr_query_mgrp: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"__osm_mcmr_query_mgrp: " "Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	if ((p_rcvd_mad->method == IB_MAD_METHOD_GET) && (num_rec == 0)) {
 		osm_sa_send_error(sa, p_madw,
@@ -2030,8 +1962,7 @@ __osm_mcmr_query_mgrp(IN osm_sa_t * sa,
 				       osm_madw_get_mad_addr_ptr(p_madw));
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mcmr_query_mgrp: ERR 1B16: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B16: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -2110,8 +2041,7 @@ __osm_mcmr_query_mgrp(IN osm_sa_t * sa,
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mcmr_query_mgrp: ERR 1B17: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B17: "
 			"osm_sa_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -2148,15 +2078,12 @@ void osm_mcmr_rcv_process(IN void *context, IN void *data)
 	case IB_MAD_METHOD_SET:
 		valid = __check_join_comp_mask(p_sa_mad->comp_mask);
 		if (!valid) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_mcmr_rcv_process: ERR 1B18: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B18: "
 				"component mask = 0x%016" PRIx64 ", "
 				"expected comp mask = 0x%016" PRIx64 " ,"
-				"MGID: 0x%016" PRIx64 " : "
-				"0x%016" PRIx64 " for "
-				"PortGID: 0x%016" PRIx64 " : "
-				"0x%016" PRIx64 "\n",
-				cl_ntoh64(p_sa_mad->comp_mask),
+				"MGID: 0x%016" PRIx64 " : 0x%016" PRIx64
+				" for PortGID: 0x%016" PRIx64 " : 0x%016"
+				PRIx64 "\n", cl_ntoh64(p_sa_mad->comp_mask),
 				CL_NTOH64(JOIN_MC_COMP_MASK),
 				cl_ntoh64(p_recvd_mcmember_rec->mgid.unicast.
 					  prefix),
@@ -2179,8 +2106,7 @@ void osm_mcmr_rcv_process(IN void *context, IN void *data)
 	case IB_MAD_METHOD_DELETE:
 		valid = __check_join_comp_mask(p_sa_mad->comp_mask);
 		if (!valid) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_mcmr_rcv_process: ERR 1B20: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B20: "
 				"component mask = 0x%016" PRIx64 ", "
 				"expected comp mask = 0x%016" PRIx64 "\n",
 				cl_ntoh64(p_sa_mad->comp_mask),
@@ -2203,8 +2129,7 @@ void osm_mcmr_rcv_process(IN void *context, IN void *data)
 		__osm_mcmr_query_mgrp(sa, p_madw);
 		break;
 	default:
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_mcmr_rcv_process: ERR 1B21: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B21: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_sa_mad->method));
 		osm_sa_send_error(sa, p_madw,
diff --git a/opensm/opensm/osm_sa_mft_record.c b/opensm/opensm/osm_sa_mft_record.c
index 73111ca..a5d1292 100644
--- a/opensm/opensm/osm_sa_mft_record.c
+++ b/opensm/opensm/osm_sa_mft_record.c
@@ -88,16 +88,14 @@ __osm_mftr_rcv_new_mftr(IN osm_sa_t * sa,
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mftr_rcv_new_mftr: ERR 4A02: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4A02: "
 			"rec_item alloc failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mftr_rcv_new_mftr: "
+		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)),
@@ -134,8 +132,7 @@ static osm_port_t *__osm_mftr_get_port_by_guid(IN osm_sa_t * sa,
 
 	p_port = osm_get_port_by_guid(sa->p_subn, port_guid);
 	if (!p_port) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mftr_get_port_by_guid ERR 4A04: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "ERR 4A04: "
 			"Invalid port GUID 0x%016" PRIx64 "\n", port_guid);
 	}
 
@@ -168,8 +165,7 @@ __osm_mftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
 	    __osm_mftr_get_port_by_guid(sa,
 					p_sw->p_node->node_info.port_guid);
 	if (!p_port) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mftr_rcv_by_comp_mask: ERR 4A05: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4A05: "
 			"Failed to find Port by Node Guid:0x%016" PRIx64
 			"\n", cl_ntoh64(p_sw->p_node->node_info.node_guid)
 		    );
@@ -180,8 +176,7 @@ __osm_mftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
 	   the same partition. */
 	p_physp = p_port->p_physp;
 	if (!p_physp) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mftr_rcv_by_comp_mask: ERR 4A06: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4A06: "
 			"Failed to find default physical Port by Node Guid:0x%016"
 			PRIx64 "\n",
 			cl_ntoh64(p_sw->p_node->node_info.node_guid)
@@ -196,8 +191,7 @@ __osm_mftr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item,
 
 	/* compare the lids - if required */
 	if (comp_mask & IB_MFTR_COMPMASK_LID) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mftr_rcv_by_comp_mask: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Comparing lid:0x%02X to port lid range: 0x%02X .. 0x%02X\n",
 			cl_ntoh16(p_rcvd_rec->lid), min_lid_ho, max_lid_ho);
 		/* ok we are ready for range check */
@@ -284,8 +278,7 @@ void osm_mftr_rcv_process(IN void *ctx, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((p_rcvd_mad->method != IB_MAD_METHOD_GET) &&
 	    (p_rcvd_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_mftr_rcv_process: ERR 4A08: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4A08: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_rcvd_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -299,8 +292,7 @@ void osm_mftr_rcv_process(IN void *ctx, IN void *data)
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_mftr_rcv_process: ERR 4A07: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4A07: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -334,8 +326,7 @@ void osm_mftr_rcv_process(IN void *ctx, IN void *data)
 			goto Exit;
 		}
 		if (num_rec > 1) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_mftr_rcv_process: ERR 4A09: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4A09: "
 				"Got more than one record for SubnAdmGet (%u)\n",
 				num_rec);
 			osm_sa_send_error(sa, p_madw,
@@ -361,16 +352,14 @@ void osm_mftr_rcv_process(IN void *ctx, IN void *data)
 	trim_num_rec =
 	    (MAD_BLOCK_SIZE - IB_SA_MAD_HDR_SIZE) / sizeof(ib_mft_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_mftr_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_mftr_rcv_process: " "Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	if ((p_rcvd_mad->method != IB_MAD_METHOD_GETTABLE) && (num_rec == 0)) {
 		osm_sa_send_error(sa, p_madw,
@@ -387,8 +376,7 @@ void osm_mftr_rcv_process(IN void *ctx, IN void *data)
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_mftr_rcv_process: ERR 4A10: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4A10: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -452,8 +440,7 @@ void osm_mftr_rcv_process(IN void *ctx, IN void *data)
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_mftr_rcv_process: ERR 4A11: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4A11: "
 			"osm_sa_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
diff --git a/opensm/opensm/osm_sa_multipath_record.c b/opensm/opensm/osm_sa_multipath_record.c
index a81bfd5..98a2da1 100644
--- a/opensm/opensm/osm_sa_multipath_record.c
+++ b/opensm/opensm/osm_sa_multipath_record.c
@@ -216,8 +216,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 							 comp_mask))
 		if (mtu > IB_MTU_LEN_1024) {
 			mtu = IB_MTU_LEN_1024;
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__osm_mpr_rcv_get_path_parms: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"Optimized Path MTU to 1K for Mellanox Tavor device\n");
 		}
 
@@ -239,8 +238,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 		 */
 		p_physp = osm_switch_get_route_by_lid(p_node->sw, dest_lid);
 		if (p_physp == 0) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_path_parms: ERR 4514: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4514: "
 				"Can't find routing to LID 0x%X from switch for GUID 0x%016"
 				PRIx64 "\n", dest_lid_ho,
 				cl_ntoh64(osm_node_get_node_guid(p_node)));
@@ -265,8 +263,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 		}
 		if (!valid_sl_mask) {
 			if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-				osm_log(sa->p_log, OSM_LOG_DEBUG,
-					"__osm_mpr_rcv_get_path_parms: "
+				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 					"All the SLs lead to VL15 on this path\n");
 			status = IB_NOT_FOUND;
 			goto Exit;
@@ -285,8 +282,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 		p_dest_physp = osm_switch_get_route_by_lid(p_node->sw, dest_lid);
 
 		if (p_dest_physp == 0) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_path_parms: ERR 4515: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4515: "
 				"Can't find routing to LID 0x%X from switch for GUID 0x%016"
 				PRIx64 "\n", dest_lid_ho,
 				cl_ntoh64(osm_node_get_node_guid(p_node)));
@@ -306,8 +302,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 		p_physp = osm_physp_get_remote(p_physp);
 
 		if (p_physp == 0) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_path_parms: ERR 4505: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4505: "
 				"Can't find remote phys port when routing to LID 0x%X from node GUID 0x%016"
 				PRIx64 "\n", dest_lid_ho,
 				cl_ntoh64(osm_node_get_node_guid(p_node)));
@@ -332,8 +327,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 			   If this isn't a switch, we should have reached
 			   the destination by now!
 			 */
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_path_parms: ERR 4503: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4503: "
 				"Internal error, bad path\n");
 			status = IB_ERROR;
 			goto Exit;
@@ -355,8 +349,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 		 */
 		p_physp = osm_switch_get_route_by_lid(p_node->sw, dest_lid);
 		if (p_physp == 0) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_path_parms: ERR 4516: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4516: "
 				"Dead end on path to LID 0x%X from switch for GUID 0x%016"
 				PRIx64 "\n", dest_lid_ho,
 				cl_ntoh64(osm_node_get_node_guid(p_node)));
@@ -384,8 +377,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 			}
 			if (!valid_sl_mask) {
 				if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-					osm_log(sa->p_log, OSM_LOG_DEBUG,
-						"__osm_mpr_rcv_get_path_parms: "
+					OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 						"All the SLs lead to VL15 "
 						"on this path\n");
 				status = IB_NOT_FOUND;
@@ -406,8 +398,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 		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,
-			"__osm_mpr_rcv_get_path_parms: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Path min MTU = %u, min rate = %u\n", mtu, rate);
 	}
 
@@ -423,8 +414,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 						 p_dest_physp, comp_mask))) {
 
 		if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__osm_mpr_rcv_get_path_parms: "
+			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->
@@ -608,8 +598,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 		required_pkey = p_mpr->pkey;
 		if (!osm_physp_share_this_pkey
 		    (p_src_physp, p_dest_physp, required_pkey)) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_path_parms: ERR 4518: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4518: "
 				"Ports do not share specified PKey 0x%04x\n"
 				"\t\tsrc %" PRIx64 " dst %" PRIx64 "\n",
 				cl_ntoh16(required_pkey),
@@ -621,8 +610,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 		}
 		if (p_qos_level && p_qos_level->pkey_range_len &&
 		    !osm_qos_level_has_pkey(p_qos_level, required_pkey)) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_path_parms: ERR 451C: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 451C: "
 				"Ports do not share PKeys defined by QoS level\n");
 			status = IB_NOT_FOUND;
 			goto Exit;
@@ -637,8 +625,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 							      p_src_physp,
 							      p_dest_physp);
 		if (!required_pkey) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_path_parms: ERR 451D: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 451D: "
 				"Ports do not share PKeys defined by QoS level\n");
 			status = IB_NOT_FOUND;
 			goto Exit;
@@ -652,8 +639,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 		required_pkey =
 		    osm_physp_find_common_pkey(p_src_physp, p_dest_physp);
 		if (!required_pkey) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_path_parms: ERR 4519: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4519: "
 				"Ports do not have any shared PKeys\n"
 				"\t\tsrc %" PRIx64 " dst %" PRIx64 "\n",
 				cl_ntoh64(osm_physp_get_port_guid(p_physp)),
@@ -686,8 +672,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 
 		if (p_qos_level && p_qos_level->sl_set &&
 		    p_qos_level->sl != required_sl) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_path_parms: ERR 451E: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 451E: "
 				"QoS constaraints: required MultiPathRecord SL (%u) "
 				"doesn't match QoS policy SL (%u)\n",
 				required_sl, p_qos_level->sl);
@@ -703,8 +688,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 		required_sl = p_qos_level->sl;
 
 		if (required_pkey && p_prtn && p_prtn->sl != p_qos_level->sl)
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__osm_mpr_rcv_get_path_parms: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"QoS level SL (%u) overrides partition SL (%u)\n",
 				p_qos_level->sl, p_prtn->sl);
 
@@ -720,8 +704,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 			required_sl = OSM_DEFAULT_SL;
 			/* this may be possible when pkey tables are created somehow in
 			   previous runs or things are going wrong here */
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_path_parms: ERR 451A: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 451A: "
 				"No partition found for PKey 0x%04x - using default SL %d\n",
 				cl_ntoh16(required_pkey), required_sl);
 		} else
@@ -740,8 +723,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 		required_sl = OSM_DEFAULT_SL;
 
 	if (sa->p_subn->opt.qos && !(valid_sl_mask & (1 << required_sl))) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mpr_rcv_get_path_parms: ERR 451F: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 451F: "
 			"Selected SL (%u) leads to VL15\n", required_sl);
 		status = IB_NOT_FOUND;
 		goto Exit;
@@ -760,8 +742,7 @@ __osm_mpr_rcv_get_path_parms(IN osm_sa_t * sa,
 	p_parms->hops = hops;
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mpr_rcv_get_path_parms: MultiPath params:"
+		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);
@@ -844,15 +825,13 @@ __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,
-			"__osm_mpr_rcv_get_lid_pair_path: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Src LID 0x%X, Dest LID 0x%X\n",
 			src_lid_ho, dest_lid_ho);
 
 	p_pr_item = malloc(sizeof(*p_pr_item));
 	if (p_pr_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mpr_rcv_get_lid_pair_path: ERR 4501: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4501: "
 			"Unable to allocate path record\n");
 		goto Exit;
 	}
@@ -883,8 +862,7 @@ __osm_mpr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
 	 */
 	if (comp_mask & IB_MPR_COMPMASK_REVERSIBLE) {
 		if ((!path_parms.reversible && (p_mpr->num_path & 0x80))) {
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__osm_mpr_rcv_get_lid_pair_path: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"Requested reversible path but failed to get one\n");
 
 			free(p_pr_item);
@@ -933,8 +911,7 @@ __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,
-			"__osm_mpr_rcv_get_port_pair_paths: "
+		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)),
@@ -1000,10 +977,8 @@ __osm_mpr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
 				  &dest_lid_max_ho);
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mpr_rcv_get_port_pair_paths: "
-			"Src LID [0x%X-0x%X], "
-			"Dest LID [0x%X-0x%X]\n",
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+			"Src LID [0x%X-0x%X], Dest LID [0x%X-0x%X]\n",
 			src_lid_min_ho, src_lid_max_ho,
 			dest_lid_min_ho, dest_lid_max_ho);
 
@@ -1131,8 +1106,7 @@ __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,
-			"__osm_mpr_rcv_get_apm_port_pair_paths: "
+		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)),
@@ -1151,8 +1125,7 @@ __osm_mpr_rcv_get_apm_port_pair_paths(IN osm_sa_t * sa,
 	src_lid_ho += base_offs % src_lids;
 	dest_lid_ho += base_offs % dest_lids;
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"__osm_mpr_rcv_get_apm_port_pair_paths: "
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 		"Src LIDs [0x%X-0x%X] hashed %d, "
 		"Dest LIDs [0x%X-0x%X] hashed %d\n",
 		src_lid_min_ho, src_lid_max_ho, src_lid_ho,
@@ -1172,8 +1145,7 @@ __osm_mpr_rcv_get_apm_port_pair_paths(IN osm_sa_t * sa,
 							    comp_mask, 0);
 
 		if (p_pr_item) {
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__osm_mpr_rcv_get_apm_port_pair_paths: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"Found matching path from Src LID 0x%X to Dest LID 0x%X with %d hops\n",
 				src_lid_ho, dest_lid_ho, p_pr_item->hops);
 			break;
@@ -1213,8 +1185,7 @@ __osm_mpr_rcv_get_gids(IN osm_sa_t * sa,
 				   don't enter it as an error in our own log.
 				   Return an error response to the client.
 				 */
-				osm_log(sa->p_log, OSM_LOG_VERBOSE,
-					"__osm_mpr_rcv_get_gids: ERR 451B: "
+				OSM_LOG(sa->p_log, OSM_LOG_VERBOSE, "ERR 451B: "
 					"%sGID 0x%016" PRIx64
 					" is multicast or non local subnet prefix\n",
 					is_sgid ? "S" : "D",
@@ -1234,8 +1205,7 @@ __osm_mpr_rcv_get_gids(IN osm_sa_t * sa,
 			   don't enter it as an error in our own log.
 			   Return an error response to the client.
 			 */
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_mpr_rcv_get_gids: ERR 4506: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4506: "
 				"No port with GUID 0x%016" PRIx64 "\n",
 				cl_ntoh64(gids->unicast.interface_id));
 
@@ -1381,8 +1351,7 @@ __osm_mpr_rcv_get_apm_paths(IN osm_sa_t * sa,
 						  pp_ports[3], base_offs + 1,
 						  comp_mask, p_list);
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG, "__osm_mpr_rcv_get_apm_paths: "
-		"APM matrix:\n"
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "APM matrix:\n"
 		"\t{0,0} 0x%X->0x%X (%d)\t| {0,1} 0x%X->0x%X (%d)\n"
 		"\t{1,0} 0x%X->0x%X (%d)\t| {1,1} 0x%X->0x%X (%d)\n",
 		matrix[0][0]->path_rec.slid, matrix[0][0]->path_rec.dlid,
@@ -1403,8 +1372,7 @@ __osm_mpr_rcv_get_apm_paths(IN osm_sa_t * sa,
 	/* and the winner is... */
 	if (minA <= minB || (minA == minB && sumA < sumB)) {
 		/* Diag A */
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mpr_rcv_get_apm_paths: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Diag {0,0} & {1,1} is the best:\n"
 			"\t{0,0} 0x%X->0x%X (%d)\t & {1,1} 0x%X->0x%X (%d)\n",
 			matrix[0][0]->path_rec.slid,
@@ -1417,8 +1385,7 @@ __osm_mpr_rcv_get_apm_paths(IN osm_sa_t * sa,
 		free(matrix[1][0]);
 	} else {
 		/* Diag B */
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_mpr_rcv_get_apm_paths: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Diag {0,1} & {1,0} is the best:\n"
 			"\t{0,1} 0x%X->0x%X (%d)\t & {1,0} 0x%X->0x%X (%d)\n",
 			matrix[0][1]->path_rec.slid,
@@ -1471,8 +1438,7 @@ __osm_mpr_rcv_process_pairs(IN osm_sa_t * sa,
 							      comp_mask,
 							      p_list);
 			total_paths += num_paths;
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__osm_mpr_rcv_process_pairs: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"%d paths %d total paths %d max paths\n",
 				num_paths, total_paths, max_paths);
 			/* Just take first NumbPaths found */
@@ -1510,8 +1476,7 @@ __osm_mpr_rcv_respond(IN osm_sa_t * sa,
 
 	num_rec = cl_qlist_count(p_list);
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"__osm_mpr_rcv_respond: "
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 		"Generating response with %zu records\n", num_rec);
 
 	mad_size = IB_SA_MAD_HDR_SIZE + num_rec * sizeof(ib_path_rec_t);
@@ -1523,8 +1488,7 @@ __osm_mpr_rcv_respond(IN osm_sa_t * sa,
 				       mad_size, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mpr_rcv_respond: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR,
 			"ERR 4502: Unable to allocate MAD\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -1577,8 +1541,7 @@ __osm_mpr_rcv_respond(IN osm_sa_t * sa,
 				    sa->p_subn);
 
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_mpr_rcv_respond: ERR 4507: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4507: "
 			"Unable to send MAD (%s)\n", ib_get_err_str(status));
 		/*  osm_mad_pool_put( sa->p_mad_pool, p_resp_madw ); */
 	}
@@ -1611,8 +1574,7 @@ void osm_mpr_rcv_process(IN void *context, IN void *data)
 	CL_ASSERT(p_sa_mad->attr_id == IB_MAD_ATTR_MULTIPATH_RECORD);
 
 	if ((p_sa_mad->rmpp_flags & IB_RMPP_FLAG_ACTIVE) != IB_RMPP_FLAG_ACTIVE) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_mpr_rcv_process: ERR 4510: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4510: "
 			"Invalid request since RMPP_FLAG_ACTIVE is not set\n");
 		osm_sa_send_error(sa, p_madw,
 				  IB_SA_MAD_STATUS_REQ_INVALID);
@@ -1621,8 +1583,7 @@ void osm_mpr_rcv_process(IN void *context, IN void *data)
 
 	/* we only support SubnAdmGetMulti method */
 	if (p_sa_mad->method != IB_MAD_METHOD_GETMULTI) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_mpr_rcv_process: ERR 4513: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4513: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_sa_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -1635,8 +1596,7 @@ void osm_mpr_rcv_process(IN void *context, IN void *data)
 						  osm_madw_get_mad_addr_ptr
 						  (p_madw));
 	if (requester_port == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_mpr_rcv_process: ERR 4517: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4517: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -1657,8 +1617,7 @@ void osm_mpr_rcv_process(IN void *context, IN void *data)
 
 	if (sa_status != IB_SA_MAD_STATUS_SUCCESS || !nsrc || !ndest) {
 		if (sa_status == IB_SA_MAD_STATUS_SUCCESS && (!nsrc || !ndest))
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_mpr_rcv_process_cb: ERR 4512: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4512: "
 				"__osm_mpr_rcv_get_end_points failed, not enough GIDs "
 				"(nsrc %d ndest %d)\n", nsrc, ndest);
 		cl_plock_release(sa->p_lock);
diff --git a/opensm/opensm/osm_sa_node_record.c b/opensm/opensm/osm_sa_node_record.c
index 5148509..ab5e3a6 100644
--- a/opensm/opensm/osm_sa_node_record.c
+++ b/opensm/opensm/osm_sa_node_record.c
@@ -87,16 +87,14 @@ __osm_nr_rcv_new_nr(IN osm_sa_t * sa,
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_nr_rcv_new_nr: ERR 1D02: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1D02: "
 			"rec_item alloc failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_nr_rcv_new_nr: "
+		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)),
@@ -141,8 +139,7 @@ __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,
-			"__osm_nr_rcv_create_nr: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Looking for NodeRecord with LID: 0x%X GUID:0x%016"
 			PRIx64 "\n", cl_ntoh16(match_lid),
 			cl_ntoh64(match_port_guid)
@@ -184,8 +181,7 @@ __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,
-					"__osm_nr_rcv_create_nr: "
+				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 					"Comparing LID: 0x%X <= 0x%X <= 0x%X\n",
 					base_lid_ho, match_lid_ho, max_lid_ho);
 			}
@@ -230,8 +226,7 @@ __osm_nr_rcv_by_comp_mask(IN cl_map_item_t * const p_map_item, IN void *context)
 		   DEBUG TOP
 		 */
 		if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__osm_nr_rcv_by_comp_mask: "
+			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),
@@ -348,8 +343,7 @@ void osm_nr_rcv_process(IN void *ctx, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((p_rcvd_mad->method != IB_MAD_METHOD_GET) &&
 	    (p_rcvd_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_nr_rcv_process: ERR 1D05: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1D05: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_rcvd_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -363,8 +357,7 @@ void osm_nr_rcv_process(IN void *ctx, IN void *data)
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_nr_rcv_process: ERR 1D04: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1D04: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -394,8 +387,7 @@ void osm_nr_rcv_process(IN void *ctx, IN void *data)
 	 * If we do a SubnAdmGet and got more than one record it is an error !
 	 */
 	if ((p_rcvd_mad->method == IB_MAD_METHOD_GET) && (num_rec > 1)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_nr_rcv_process: ERR 1D03: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1D03: "
 			"Got more than one record for SubnAdmGet (%u)\n",
 			num_rec);
 		osm_sa_send_error(sa, p_madw,
@@ -418,16 +410,14 @@ void osm_nr_rcv_process(IN void *ctx, IN void *data)
 	trim_num_rec =
 	    (MAD_BLOCK_SIZE - IB_SA_MAD_HDR_SIZE) / sizeof(ib_node_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_nr_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_nr_rcv_process: " "Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	if ((p_rcvd_mad->method == IB_MAD_METHOD_GET) && (num_rec == 0)) {
 		osm_sa_send_error(sa, p_madw,
@@ -444,8 +434,7 @@ void osm_nr_rcv_process(IN void *ctx, IN void *data)
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_nr_rcv_process: ERR 1D06: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1D06: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -507,8 +496,7 @@ void osm_nr_rcv_process(IN void *ctx, IN void *data)
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_nr_rcv_process: ERR 1D07: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1D07: "
 			"osm_sa_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
diff --git a/opensm/opensm/osm_sa_path_record.c b/opensm/opensm/osm_sa_path_record.c
index 0cf59e6..f94145b 100644
--- a/opensm/opensm/osm_sa_path_record.c
+++ b/opensm/opensm/osm_sa_path_record.c
@@ -223,8 +223,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 						    p_dest_port, comp_mask))
 		if (mtu > IB_MTU_LEN_1024) {
 			mtu = IB_MTU_LEN_1024;
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__osm_pr_rcv_get_path_parms: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"Optimized Path MTU to 1K for Mellanox Tavor device\n");
 		}
 
@@ -246,8 +245,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		 */
 		p_physp = osm_switch_get_route_by_lid(p_node->sw, dest_lid);
 		if (p_physp == 0) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F02: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F02: "
 				"Cannot find routing to LID 0x%X from switch for GUID 0x%016"
 				PRIx64 "\n", dest_lid_ho,
 				cl_ntoh64(osm_node_get_node_guid(p_node)));
@@ -272,8 +270,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		}
 		if (!valid_sl_mask) {
 			if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-				osm_log(sa->p_log, OSM_LOG_DEBUG,
-					"__osm_pr_rcv_get_path_parms: "
+				OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 					"All the SLs lead to VL15 on this path\n");
 			status = IB_NOT_FOUND;
 			goto Exit;
@@ -292,8 +289,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		p_dest_physp = osm_switch_get_route_by_lid(p_node->sw, dest_lid);
 
 		if (p_dest_physp == 0) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F03: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F03: "
 				"Cannot find routing to LID 0x%X from switch for GUID 0x%016"
 				PRIx64 "\n", dest_lid_ho,
 				cl_ntoh64(osm_node_get_node_guid(p_node)));
@@ -313,8 +309,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		p_physp = osm_physp_get_remote(p_physp);
 
 		if (p_physp == 0) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F05: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F05: "
 				"Cannot find remote phys port when routing to LID 0x%X from node GUID 0x%016"
 				PRIx64 "\n", dest_lid_ho,
 				cl_ntoh64(osm_node_get_node_guid(p_node)));
@@ -338,8 +333,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 			   If this isn't a switch, we should have reached
 			   the destination by now!
 			 */
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F06: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F06: "
 				"Internal error, bad path\n");
 			status = IB_ERROR;
 			goto Exit;
@@ -361,8 +355,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		 */
 		p_physp = osm_switch_get_route_by_lid(p_node->sw, dest_lid);
 		if (p_physp == 0) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F07: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F07: "
 				"Dead end on path to LID 0x%X from switch for GUID 0x%016"
 				PRIx64 "\n", dest_lid_ho,
 				cl_ntoh64(osm_node_get_node_guid(p_node)));
@@ -390,8 +383,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 			}
 			if (!valid_sl_mask) {
 				if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-					osm_log(sa->p_log, OSM_LOG_DEBUG,
-						"__osm_pr_rcv_get_path_parms: "
+					OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 						"All the SLs lead to VL15 "
 						"on this path\n");
 				status = IB_NOT_FOUND;
@@ -412,8 +404,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		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,
-			"__osm_pr_rcv_get_path_parms: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Path min MTU = %u, min rate = %u\n", mtu, rate);
 
 	/*
@@ -427,8 +418,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 						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,
-				"__osm_pr_rcv_get_path_parms: "
+			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->
@@ -614,8 +604,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		 */
 		pkey = p_pr->pkey;
 		if (!osm_physp_share_this_pkey(p_src_physp, p_dest_physp, pkey)) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F1A: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F1A: "
 				"Ports do not share specified PKey 0x%04x\n",
 				cl_ntoh16(pkey));
 			status = IB_NOT_FOUND;
@@ -623,8 +612,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		}
 		if (p_qos_level && p_qos_level->pkey_range_len &&
 		    !osm_qos_level_has_pkey(p_qos_level, pkey)) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F1D: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F1D: "
 				"Ports do not share PKeys defined by QoS level\n");
 			status = IB_NOT_FOUND;
 			goto Exit;
@@ -638,8 +626,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		pkey = osm_qos_level_get_shared_pkey(p_qos_level,
 						     p_src_physp, p_dest_physp);
 		if (!pkey) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F1E: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F1E: "
 				"Ports do not share PKeys defined by QoS level\n");
 			status = IB_NOT_FOUND;
 			goto Exit;
@@ -651,8 +638,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		 */
 		pkey = osm_physp_find_common_pkey(p_src_physp, p_dest_physp);
 		if (!pkey) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F1B: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F1B: "
 				"Ports do not have any shared PKeys\n");
 			status = IB_NOT_FOUND;
 			goto Exit;
@@ -683,8 +669,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 
 		if (p_qos_level && p_qos_level->sl_set
 		    && (p_qos_level->sl != sl)) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F1F: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F1F: "
 				"QoS constaraints: required PathRecord SL (%u) "
 				"doesn't match QoS policy SL (%u)\n", sl,
 				p_qos_level->sl);
@@ -694,8 +679,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 
 		if (is_lash
 		    && osm_get_lash_sl(p_osm, p_src_port, p_dest_port) != sl) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F23: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F23: "
 				"Required PathRecord SL (%u) doesn't "
 				"match LASH SL\n", sl);
 			status = IB_NOT_FOUND;
@@ -717,8 +701,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		sl = p_qos_level->sl;
 
 		if (pkey && p_prtn && p_prtn->sl != p_qos_level->sl)
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__osm_pr_rcv_get_path_parms: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"QoS level SL (%u) overrides partition SL (%u)\n",
 				p_qos_level->sl, p_prtn->sl);
 
@@ -730,8 +713,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 			sl = OSM_DEFAULT_SL;
 			/* this may be possible when pkey tables are created somehow in
 			   previous runs or things are going wrong here */
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_get_path_parms: ERR 1F1C: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F1C: "
 				"No partition found for PKey 0x%04x - using default SL %d\n",
 				cl_ntoh16(pkey), sl);
 		} else
@@ -749,8 +731,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 		sl = OSM_DEFAULT_SL;
 
 	if (sa->p_subn->opt.qos && !(valid_sl_mask & (1 << sl))) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_pr_rcv_get_path_parms: ERR 1F24: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F24: "
 			"Selected SL (%u) leads to VL15\n", sl);
 		status = IB_NOT_FOUND;
 		goto Exit;
@@ -768,8 +749,7 @@ __osm_pr_rcv_get_path_parms(IN osm_sa_t * sa,
 	p_parms->sl = sl;
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_pr_rcv_get_path_parms: Path params:"
+		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);
@@ -870,15 +850,13 @@ __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,
-			"__osm_pr_rcv_get_lid_pair_path: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Src LID 0x%X, Dest LID 0x%X\n",
 			src_lid_ho, dest_lid_ho);
 
 	p_pr_item = malloc(sizeof(*p_pr_item));
 	if (p_pr_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_pr_rcv_get_lid_pair_path: ERR 1F01: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F01: "
 			"Unable to allocate path record\n");
 		goto Exit;
 	}
@@ -909,8 +887,7 @@ __osm_pr_rcv_get_lid_pair_path(IN osm_sa_t * sa,
 	 */
 	if (comp_mask & IB_PR_COMPMASK_REVERSIBLE) {
 		if ((!path_parms.reversible && (p_pr->num_path & 0x80))) {
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"__osm_pr_rcv_get_lid_pair_path: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"Requested reversible path but failed to get one\n");
 
 			free(p_pr_item);
@@ -958,8 +935,7 @@ __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,
-			"__osm_pr_rcv_get_port_pair_paths: "
+		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)),
@@ -1041,24 +1017,20 @@ __osm_pr_rcv_get_port_pair_paths(IN osm_sa_t * sa,
 					  &src_lid_max_ho);
 
 	if (src_lid_min_ho == 0) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_pr_rcv_get_port_pair_paths: ERR 1F20:"
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F20:"
 			"Obtained source LID of 0. No such LID possible\n");
 		goto Exit;
 	}
 
 	if (dest_lid_min_ho == 0) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_pr_rcv_get_port_pair_paths: ERR 1F21:"
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F21:"
 			"Obtained destination LID of 0. No such LID possible\n");
 		goto Exit;
 	}
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_pr_rcv_get_port_pair_paths: "
-			"Src LIDs [0x%X-0x%X], "
-			"Dest LIDs [0x%X-0x%X]\n",
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+			"Src LIDs [0x%X-0x%X], Dest LIDs [0x%X-0x%X]\n",
 			src_lid_min_ho, src_lid_max_ho,
 			dest_lid_min_ho, dest_lid_max_ho);
 
@@ -1213,8 +1185,7 @@ __osm_pr_rcv_get_end_points(IN osm_sa_t * sa,
 				   don't enter it as an error in our own log.
 				   Return an error response to the client.
 				 */
-				osm_log(sa->p_log, OSM_LOG_VERBOSE,
-					"__osm_pr_rcv_get_end_points: "
+				OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 					"Non local SGID subnet prefix 0x%016"
 					PRIx64 "\n",
 					cl_ntoh64(p_pr->sgid.unicast.prefix));
@@ -1233,8 +1204,7 @@ __osm_pr_rcv_get_end_points(IN osm_sa_t * sa,
 			   don't enter it as an error in our own log.
 			   Return an error response to the client.
 			 */
-			osm_log(sa->p_log, OSM_LOG_VERBOSE,
-				"__osm_pr_rcv_get_end_points: "
+			OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 				"No source port with GUID 0x%016" PRIx64 "\n",
 				cl_ntoh64(p_pr->sgid.unicast.interface_id));
 
@@ -1254,8 +1224,7 @@ __osm_pr_rcv_get_end_points(IN osm_sa_t * sa,
 				   don't enter it as an error in our own log.
 				   Return an error response to the client.
 				 */
-				osm_log(sa->p_log, OSM_LOG_VERBOSE,
-					"__osm_pr_rcv_get_end_points: "
+				OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 					"No source port with LID = 0x%X\n",
 					cl_ntoh16(p_pr->slid));
 
@@ -1274,8 +1243,7 @@ __osm_pr_rcv_get_end_points(IN osm_sa_t * sa,
 			if (!ib_gid_is_multicast(&p_pr->dgid) &&
 			    ib_gid_get_subnet_prefix(&p_pr->dgid) !=
 			    sa->p_subn->opt.subnet_prefix) {
-				osm_log(sa->p_log, OSM_LOG_VERBOSE,
-					"__osm_pr_rcv_get_end_points: "
+				OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 					"Non local DGID subnet prefix 0x%016"
 					PRIx64 "\n",
 					cl_ntoh64(p_pr->dgid.unicast.prefix));
@@ -1325,8 +1293,8 @@ __osm_pr_rcv_get_end_points(IN osm_sa_t * sa,
 								 p_subn->
 								 rtr_guid_tbl))
 				{
-					osm_log(sa->p_log, OSM_LOG_ERROR,
-						"__osm_pr_rcv_get_end_points: ERR 1F22: "
+					OSM_LOG(sa->p_log, OSM_LOG_ERROR,
+						"ERR 1F22: "
 						"Off subnet DGID but router not found\n");
 					sa_status =
 					    IB_SA_MAD_STATUS_INVALID_GID;
@@ -1347,8 +1315,7 @@ __osm_pr_rcv_get_end_points(IN osm_sa_t * sa,
 			   don't enter it as an error in our own log.
 			   Return an error response to the client.
 			 */
-			osm_log(sa->p_log, OSM_LOG_VERBOSE,
-				"__osm_pr_rcv_get_end_points: "
+			OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 				"No dest port with GUID 0x%016" PRIx64 "\n",
 				cl_ntoh64(dest_guid));
 
@@ -1368,8 +1335,7 @@ __osm_pr_rcv_get_end_points(IN osm_sa_t * sa,
 				   don't enter it as an error in our own log.
 				   Return an error response to the client.
 				 */
-				osm_log(sa->p_log, OSM_LOG_VERBOSE,
-					"__osm_pr_rcv_get_end_points: "
+				OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 					"No dest port with LID = 0x%X\n",
 					cl_ntoh16(p_pr->dlid));
 
@@ -1542,8 +1508,7 @@ __osm_pr_get_mgrp(IN osm_sa_t * sa,
 	if (comp_mask & IB_PR_COMPMASK_DGID) {
 		status = osm_get_mgrp_by_mgid(sa, &p_pr->dgid, pp_mgrp);
 		if (status != IB_SUCCESS) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_get_mgrp: ERR 1F09: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F09: "
 				"No MC group found for PathRecord destination GID\n");
 			goto Exit;
 		}
@@ -1555,8 +1520,7 @@ __osm_pr_get_mgrp(IN osm_sa_t * sa,
 			/* the same as the DLID in the PathRecord */
 			if ((*pp_mgrp)->mlid != p_pr->dlid) {
 				/* Note: perhaps this might be better indicated as an invalid request */
-				osm_log(sa->p_log, OSM_LOG_ERROR,
-					"__osm_pr_get_mgrp: ERR 1F10: "
+				OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F10: "
 					"MC group MLID does not match PathRecord destination LID\n");
 				*pp_mgrp = NULL;
 				goto Exit;
@@ -1564,8 +1528,7 @@ __osm_pr_get_mgrp(IN osm_sa_t * sa,
 		} else {
 			*pp_mgrp = __get_mgrp_by_mlid(sa, p_pr->dlid);
 			if (*pp_mgrp == NULL)
-				osm_log(sa->p_log, OSM_LOG_ERROR,
-					"__osm_pr_get_mgrp: ERR 1F11: "
+				OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F11: "
 					"No MC group found for PathRecord destination LID\n");
 		}
 	}
@@ -1669,8 +1632,7 @@ __osm_pr_rcv_check_mcast_dest(IN osm_sa_t * sa,
 		    cl_ntoh16(p_pr->dlid) <= IB_LID_MCAST_END_HO)
 			is_multicast = 1;
 		else if (is_multicast) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_check_mcast_dest: ERR 1F12: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F12: "
 				"PathRecord request indicates MGID but not MLID\n");
 			is_multicast = -1;
 		}
@@ -1716,8 +1678,7 @@ __osm_pr_rcv_respond(IN osm_sa_t * sa,
 			goto Exit;
 		}
 		if (num_rec > 1) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_pr_rcv_respond: ERR 1F13: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F13: "
 				"Got more than one record for SubnAdmGet (%zu)\n",
 				num_rec);
 			osm_sa_send_error(sa, p_madw,
@@ -1740,16 +1701,14 @@ __osm_pr_rcv_respond(IN osm_sa_t * sa,
 	trim_num_rec =
 	    (MAD_BLOCK_SIZE - IB_SA_MAD_HDR_SIZE) / sizeof(ib_path_rec_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"__osm_pr_rcv_respond: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"__osm_pr_rcv_respond: "
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 		"Generating response with %zu records\n", num_rec);
 
 	if ((sad_mad->method == IB_MAD_METHOD_GET) && (num_rec == 0)) {
@@ -1765,8 +1724,7 @@ __osm_pr_rcv_respond(IN osm_sa_t * sa,
 				       num_rec * sizeof(ib_path_rec_t) +
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_pr_rcv_respond: ERR 1F14: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F14: "
 			"Unable to allocate MAD\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -1823,8 +1781,7 @@ __osm_pr_rcv_respond(IN osm_sa_t * sa,
 				    sa->p_subn);
 
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_pr_rcv_respond: ERR 1F15: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F15: "
 			"Unable to send MAD (%s)\n", ib_get_err_str(status));
 		/*  osm_mad_pool_put( sa->p_mad_pool, p_resp_madw ); */
 	}
@@ -1861,8 +1818,7 @@ void osm_pr_rcv_process(IN void *context, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((p_sa_mad->method != IB_MAD_METHOD_GET) &&
 	    (p_sa_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_pr_rcv_process: ERR 1F17: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F17: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_sa_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -1875,8 +1831,7 @@ void osm_pr_rcv_process(IN void *context, IN void *data)
 						  osm_madw_get_mad_addr_ptr
 						  (p_madw));
 	if (requester_port == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_pr_rcv_process: ERR 1F16: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F16: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -1904,8 +1859,7 @@ void osm_pr_rcv_process(IN void *context, IN void *data)
 	if (ret > 0)
 		goto McastDest;
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_pr_rcv_process: " "Unicast destination requested\n");
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Unicast destination requested\n");
 
 	sa_status = __osm_pr_rcv_get_end_points(sa, p_madw,
 						&p_src_port, &p_dest_port,
@@ -1952,8 +1906,7 @@ void osm_pr_rcv_process(IN void *context, IN void *data)
 	goto Unlock;
 
 McastDest:
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_pr_rcv_process: " "Multicast destination requested\n");
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Multicast destination requested\n");
 	{
 		osm_mgrp_t *p_mgrp = NULL;
 		ib_api_status_t status;
@@ -1971,16 +1924,14 @@ McastDest:
 		/* Make sure the rest of the PathRecord matches the MC group attributes */
 		status = __osm_pr_match_mgrp_attributes(sa, p_madw, p_mgrp);
 		if (status != IB_SUCCESS) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_pr_rcv_process: ERR 1F19: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F19: "
 				"MC group attributes don't match PathRecord request\n");
 			goto Unlock;
 		}
 
 		p_pr_item = malloc(sizeof(*p_pr_item));
 		if (p_pr_item == NULL) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_pr_rcv_process: ERR 1F18: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1F18: "
 				"Unable to allocate path record for MC group\n");
 			goto Unlock;
 		}
diff --git a/opensm/opensm/osm_sa_pkey_record.c b/opensm/opensm/osm_sa_pkey_record.c
index 31d7837..aeed9fc 100644
--- a/opensm/opensm/osm_sa_pkey_record.c
+++ b/opensm/opensm/osm_sa_pkey_record.c
@@ -80,8 +80,7 @@ __osm_sa_pkey_create(IN osm_sa_t * sa,
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_sa_pkey_create: ERR 4602: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4602: "
 			"rec_item alloc failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
@@ -93,8 +92,7 @@ __osm_sa_pkey_create(IN osm_sa_t * sa,
 		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,
-			"__osm_sa_pkey_create: "
+		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)),
@@ -168,8 +166,7 @@ __osm_sa_pkey_by_comp_mask(IN osm_sa_t * sa,
 	if (p_port->p_node->node_info.node_type != IB_NODE_TYPE_SWITCH) {
 		/* we put it in the comp mask and port num */
 		port_num = p_port->p_physp->port_num;
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_sa_pkey_by_comp_mask:  "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Using Physical Default Port Number: 0x%X (for End Node)\n",
 			port_num);
 		comp_mask |= IB_PKEY_COMPMASK_PORT;
@@ -187,8 +184,7 @@ __osm_sa_pkey_by_comp_mask(IN osm_sa_t * sa,
 				__osm_sa_pkey_check_physp(sa, p_physp,
 							  p_ctxt);
 		} else {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_sa_pkey_by_comp_mask: ERR 4603: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4603: "
 				"Given Physical Port Number: 0x%X is out of range should be < 0x%X\n",
 				port_num,
 				osm_node_get_num_physp(p_port->p_node));
@@ -270,8 +266,7 @@ void osm_pkey_rec_rcv_process(IN void *ctx, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((p_rcvd_mad->method != IB_MAD_METHOD_GET) &&
 	    (p_rcvd_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_pkey_rec_rcv_process: ERR 4605: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4605: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_rcvd_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -286,8 +281,7 @@ void osm_pkey_rec_rcv_process(IN void *ctx, IN void *data)
 	 */
 	if (p_rcvd_mad->sm_key != sa->p_subn->opt.sm_key) {
 		/* This is not a trusted requester! */
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_pkey_rec_rcv_process ERR 4608: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4608: "
 			"Request from non-trusted requester: "
 			"Given SM_Key:0x%016" PRIx64 "\n",
 			cl_ntoh64(p_rcvd_mad->sm_key));
@@ -302,8 +296,7 @@ void osm_pkey_rec_rcv_process(IN void *ctx, IN void *data)
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_pkey_rec_rcv_process: ERR 4604: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4604: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -319,8 +312,7 @@ void osm_pkey_rec_rcv_process(IN void *ctx, IN void *data)
 	context.block_num = p_rcvd_rec->block_num;
 	context.p_req_physp = p_req_physp;
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_pkey_rec_rcv_process: "
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 		"Got Query Lid:0x%04X(%02X), Block:0x%02X(%02X), Port:0x%02X(%02X)\n",
 		cl_ntoh16(p_rcvd_rec->lid),
 		(comp_mask & IB_PKEY_COMPMASK_LID) != 0, p_rcvd_rec->port_num,
@@ -344,8 +336,7 @@ void osm_pkey_rec_rcv_process(IN void *ctx, IN void *data)
 					     &p_port);
 		if ((status != IB_SUCCESS) || (p_port == NULL)) {
 			status = IB_NOT_FOUND;
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_pkey_rec_rcv_process: ERR 460B: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 460B: "
 				"No port found with LID 0x%x\n",
 				cl_ntoh16(p_rcvd_rec->lid));
 		}
@@ -378,8 +369,7 @@ void osm_pkey_rec_rcv_process(IN void *ctx, IN void *data)
 			goto Exit;
 		}
 		if (num_rec > 1) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_pkey_rec_rcv_process: ERR 460A: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 460A: "
 				"Got more than one record for SubnAdmGet (%u)\n",
 				num_rec);
 			osm_sa_send_error(sa, p_madw,
@@ -405,16 +395,14 @@ void osm_pkey_rec_rcv_process(IN void *ctx, IN void *data)
 	    (MAD_BLOCK_SIZE -
 	     IB_SA_MAD_HDR_SIZE) / sizeof(ib_pkey_table_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_pkey_rec_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_pkey_rec_rcv_process: " "Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	if ((p_rcvd_mad->method == IB_MAD_METHOD_GET) && (num_rec == 0)) {
 		osm_sa_send_error(sa, p_madw,
@@ -432,8 +420,7 @@ void osm_pkey_rec_rcv_process(IN void *ctx, IN void *data)
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_pkey_rec_rcv_process: ERR 4606: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4606: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -497,8 +484,7 @@ void osm_pkey_rec_rcv_process(IN void *ctx, IN void *data)
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_pkey_rec_rcv_process: ERR 4607: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4607: "
 			"osm_sa_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
diff --git a/opensm/opensm/osm_sa_portinfo_record.c b/opensm/opensm/osm_sa_portinfo_record.c
index e85fa3e..3e866f3 100644
--- a/opensm/opensm/osm_sa_portinfo_record.c
+++ b/opensm/opensm/osm_sa_portinfo_record.c
@@ -91,16 +91,14 @@ __osm_pir_rcv_new_pir(IN osm_sa_t * sa,
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_pir_rcv_new_pir: ERR 2102: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2102: "
 			"rec_item alloc failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_pir_rcv_new_pir: "
+		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)),
@@ -155,8 +153,7 @@ __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,
-				"__osm_sa_pir_create: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"Comparing LID: 0x%X <= 0x%X <= 0x%X\n",
 				base_lid_ho, match_lid_ho, max_lid_ho);
 
@@ -513,8 +510,7 @@ void osm_pir_rcv_process(IN void *ctx, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((p_rcvd_mad->method != IB_MAD_METHOD_GET) &&
 	    (p_rcvd_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_pir_rcv_process: ERR 2105: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2105: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_rcvd_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -528,8 +524,7 @@ void osm_pir_rcv_process(IN void *ctx, IN void *data)
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_pir_rcv_process: ERR 2104: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2104: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -565,8 +560,7 @@ void osm_pir_rcv_process(IN void *ctx, IN void *data)
 					     &p_port);
 		if ((status != IB_SUCCESS) || (p_port == NULL)) {
 			status = IB_NOT_FOUND;
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_pir_rcv_process: ERR 2109: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2109: "
 				"No port found with LID 0x%x\n",
 				cl_ntoh16(p_rcvd_rec->lid));
 		}
@@ -577,8 +571,7 @@ void osm_pir_rcv_process(IN void *ctx, IN void *data)
 						   cl_ntoh16(p_pi->base_lid));
 		else {
 			status = IB_NOT_FOUND;
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_pir_rcv_process: ERR 2103: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2103: "
 				"Given LID (0x%X) is out of range:0x%X\n",
 				cl_ntoh16(p_pi->base_lid),
 				cl_ptr_vector_get_size(p_tbl));
@@ -610,8 +603,7 @@ void osm_pir_rcv_process(IN void *ctx, IN void *data)
 			goto Exit;
 		}
 		if (num_rec > 1) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_pir_rcv_process: ERR 2108: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2108: "
 				"Got more than one record for SubnAdmGet (%u)\n",
 				num_rec);
 			osm_sa_send_error(sa, p_madw,
@@ -637,16 +629,14 @@ void osm_pir_rcv_process(IN void *ctx, IN void *data)
 	    (MAD_BLOCK_SIZE -
 	     IB_SA_MAD_HDR_SIZE) / sizeof(ib_portinfo_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_pir_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_pir_rcv_process: " "Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	if ((p_rcvd_mad->method == IB_MAD_METHOD_GET) && (num_rec == 0)) {
 		osm_sa_send_error(sa, p_madw,
@@ -663,8 +653,7 @@ void osm_pir_rcv_process(IN void *ctx, IN void *data)
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_pir_rcv_process: ERR 2106: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2106: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -740,8 +729,7 @@ void osm_pir_rcv_process(IN void *ctx, IN void *data)
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_pir_rcv_process: ERR 2107: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2107: "
 			"osm_sa_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
diff --git a/opensm/opensm/osm_sa_response.c b/opensm/opensm/osm_sa_response.c
index c4e138d..7db3927 100644
--- a/opensm/opensm/osm_sa_response.c
+++ b/opensm/opensm/osm_sa_response.c
@@ -73,8 +73,7 @@ osm_sa_send_error(IN osm_sa_t * sa,
 
 	/* avoid races - if we are exiting - exit */
 	if (osm_exit_flag) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"osm_sa_send_error: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Ignoring requested send after exit\n");
 		goto Exit;
 	}
@@ -84,8 +83,7 @@ osm_sa_send_error(IN osm_sa_t * sa,
 				       &p_madw->mad_addr);
 
 	if (p_resp_madw == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_sa_send_error: ERR 2301: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2301: "
 			"Unable to acquire response MAD\n");
 		goto Exit;
 	}
@@ -121,8 +119,7 @@ osm_sa_send_error(IN osm_sa_t * sa,
 				    p_resp_madw, FALSE, sa->p_subn);
 
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_sa_send_error: ERR 2302: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2302: "
 			"Error sending MAD (%s)\n", ib_get_err_str(status));
 		/*  osm_mad_pool_put( sa->p_mad_pool, p_resp_madw ); */
 		goto Exit;
diff --git a/opensm/opensm/osm_sa_service_record.c b/opensm/opensm/osm_sa_service_record.c
index 762eb25..1680ea1 100644
--- a/opensm/opensm/osm_sa_service_record.c
+++ b/opensm/opensm/osm_sa_service_record.c
@@ -100,8 +100,7 @@ __match_service_pkey_with_ports_pkey(IN osm_sa_t * sa,
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__match_service_pkey_with_ports_pkey: ERR 2404: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2404: "
 			"Cannot find requester physical port\n");
 		valid = FALSE;
 		goto Exit;
@@ -124,8 +123,7 @@ __match_service_pkey_with_ports_pkey(IN osm_sa_t * sa,
 			service_port =
 			    osm_get_port_by_guid(sa->p_subn, service_guid);
 			if (!service_port) {
-				osm_log(sa->p_log, OSM_LOG_ERROR,
-					"__match_service_pkey_with_ports_pkey: ERR 2405: "
+				OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2405: "
 					"No port object for port 0x%016" PRIx64
 					"\n", cl_ntoh64(service_guid));
 				valid = FALSE;
@@ -187,8 +185,8 @@ __validate_sr(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw)
 						     p_sa_mad->comp_mask);
 
 	if (!valid) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__validate_sr: " "No Match for Service Pkey\n");
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
+			"No Match for Service Pkey\n");
 		valid = FALSE;
 		goto Exit;
 	}
@@ -198,8 +196,7 @@ __validate_sr(IN osm_sa_t * sa, IN const osm_madw_t * const p_madw)
 						p_sa_mad->comp_mask);
 
 	if (!valid) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__validate_sr: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Service Record Name to key matching failed\n");
 		valid = FALSE;
 		goto Exit;
@@ -239,8 +236,7 @@ __osm_sr_rcv_respond(IN osm_sa_t * sa,
 	 * If we do a SubnAdmGet and got more than one record it is an error !
 	 */
 	if ((p_rcvd_mad->method == IB_MAD_METHOD_GET) && (num_rec > 1)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_sr_rcv_respond: ERR 2406: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2406: "
 			"Got more than one record for SubnAdmGet (%u).\n",
 			num_rec);
 		osm_sa_send_error(sa, p_madw,
@@ -260,8 +256,7 @@ __osm_sr_rcv_respond(IN osm_sa_t * sa,
 	trim_num_rec =
 	    (MAD_BLOCK_SIZE - IB_SA_MAD_HDR_SIZE) / sizeof(ib_service_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"__osm_sr_rcv_respond: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
@@ -269,8 +264,7 @@ __osm_sr_rcv_respond(IN osm_sa_t * sa,
 #endif
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_sr_rcv_respond: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Generating response with %u records\n", num_rec);
 	}
 
@@ -282,8 +276,7 @@ __osm_sr_rcv_respond(IN osm_sa_t * sa,
 				       num_rec * sizeof(ib_service_record_t) +
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_sr_rcv_respond: ERR 2402: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2402: "
 			"Unable to allocate MAD\n");
 		/* Release the quick pool items */
 		p_sr_item = (osm_sr_item_t *) cl_qlist_remove_head(p_list);
@@ -373,8 +366,7 @@ __osm_sr_rcv_respond(IN osm_sa_t * sa,
 				    sa->p_subn);
 
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_sr_rcv_respond: ERR 2407: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2407: "
 			"Unable to send MAD (%s)\n", ib_get_err_str(status));
 		/*  osm_mad_pool_put( sa->p_mad_pool, p_resp_madw ); */
 		goto Exit;
@@ -591,8 +583,7 @@ __get_matching_sr(IN cl_list_item_t * const p_list_item, IN void *context)
 		if (!osm_physp_has_pkey(p_sr_item->sa->p_log,
 					p_svcr->service_record.service_pkey,
 					p_req_physp)) {
-			osm_log(p_sr_item->sa->p_log, OSM_LOG_VERBOSE,
-				"__get_matching_sr: "
+			OSM_LOG(p_sr_item->sa->p_log, OSM_LOG_VERBOSE,
 				"requester port doesn't have the service_pkey: 0x%X\n",
 				cl_ntoh16(p_svcr->service_record.service_pkey));
 			return;
@@ -601,8 +592,7 @@ __get_matching_sr(IN cl_list_item_t * const p_list_item, IN void *context)
 
 	p_sr_pool_item = malloc(sizeof(*p_sr_pool_item));
 	if (p_sr_pool_item == NULL) {
-		osm_log(p_sr_item->sa->p_log, OSM_LOG_ERROR,
-			"__get_matching_sr: ERR 2408: "
+		OSM_LOG(p_sr_item->sa->p_log, OSM_LOG_ERROR, "ERR 2408: "
 			"Unable to acquire Service Record from pool\n");
 		goto Exit;
 	}
@@ -637,8 +627,7 @@ osm_sr_rcv_process_get_method(IN osm_sa_t * sa,
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_sr_rcv_process_get_method: ERR 2409: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2409: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -670,8 +659,7 @@ osm_sr_rcv_process_get_method(IN osm_sa_t * sa,
 
 	if ((p_sa_mad->method == IB_MAD_METHOD_GET) &&
 	    (cl_qlist_count(&sr_match_item.sr_list) == 0)) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"osm_sr_rcv_process_get_method: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"No records matched the Service Record query\n");
 
 		osm_sa_send_error(sa, p_madw,
@@ -717,8 +705,7 @@ osm_sr_rcv_process_set_method(IN osm_sa_t * sa,
 
 	if ((comp_mask & (IB_SR_COMPMASK_SID | IB_SR_COMPMASK_SGID)) !=
 	    (IB_SR_COMPMASK_SID | IB_SR_COMPMASK_SGID)) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_sr_rcv_process_set_method: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Component Mask RID check failed for METHOD_SET\n");
 		osm_sa_send_error(sa, p_madw, sa_status);
 		goto Exit;
@@ -727,8 +714,7 @@ osm_sr_rcv_process_set_method(IN osm_sa_t * sa,
 	/* if we were not provided with a service lease make it
 	   infinite */
 	if ((comp_mask & IB_SR_COMPMASK_SLEASE) != IB_SR_COMPMASK_SLEASE) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"osm_sr_rcv_process_set_method: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"ServiceLease Component Mask not set - using infinite lease\n");
 		p_recvd_service_rec->service_lease = 0xFFFFFFFF;
 	}
@@ -746,8 +732,7 @@ osm_sr_rcv_process_set_method(IN osm_sa_t * sa,
 		if (p_svcr == NULL) {
 			cl_plock_release(sa->p_lock);
 
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_sr_rcv_process_set_method: ERR 2411: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2411: "
 				"osm_svcr_get_by_rid failed\n");
 
 			osm_sa_send_error(sa, p_madw,
@@ -778,8 +763,7 @@ osm_sr_rcv_process_set_method(IN osm_sa_t * sa,
 
 	p_sr_item = malloc(sizeof(*p_sr_item));
 	if (p_sr_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_sr_rcv_process_set_method: ERR 2412: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2412: "
 			"Unable to acquire Service record\n");
 		osm_sa_send_error(sa, p_madw,
 				  IB_SA_MAD_STATUS_NO_RESOURCES);
@@ -840,8 +824,7 @@ osm_sr_rcv_process_delete_method(IN osm_sa_t * sa,
 
 	if (p_svcr == NULL) {
 		cl_plock_release(sa->p_lock);
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"osm_sr_rcv_process_delete_method: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"No records matched the RID\n");
 		osm_sa_send_error(sa, p_madw,
 				  IB_SA_MAD_STATUS_NO_RECORDS);
@@ -854,8 +837,7 @@ osm_sr_rcv_process_delete_method(IN osm_sa_t * sa,
 
 	p_sr_item = malloc(sizeof(*p_sr_item));
 	if (p_sr_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_sr_rcv_process_delete_method: ERR 2413: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2413: "
 			"Unable to acquire Service record\n");
 		osm_sa_send_error(sa, p_madw,
 				  IB_SA_MAD_STATUS_NO_RESOURCES);
@@ -900,8 +882,7 @@ void osm_sr_rcv_process(IN void *context, IN void *data)
 	case IB_MAD_METHOD_SET:
 		valid = __validate_sr(sa, p_madw);
 		if (!valid) {
-			osm_log(sa->p_log, OSM_LOG_VERBOSE,
-				"osm_sr_rcv_process: "
+			OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 				"Component Mask check failed for set request\n");
 			osm_sa_send_error(sa, p_madw, sa_status);
 			goto Exit;
@@ -911,8 +892,7 @@ void osm_sr_rcv_process(IN void *context, IN void *data)
 	case IB_MAD_METHOD_DELETE:
 		valid = __validate_sr(sa, p_madw);
 		if (!valid) {
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"osm_sr_rcv_process: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"Component Mask check failed for delete request\n");
 			osm_sa_send_error(sa, p_madw, sa_status);
 			goto Exit;
@@ -924,8 +904,7 @@ void osm_sr_rcv_process(IN void *context, IN void *data)
 		osm_sr_rcv_process_get_method(sa, p_madw);
 		break;
 	default:
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"osm_sr_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_sa_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -980,8 +959,7 @@ void osm_sr_rcv_lease_cb(IN void *context)
 			 */
 			p_svcr->lease_period -= elapsed_time;
 
-			osm_log(sa->p_log, OSM_LOG_DEBUG,
-				"osm_sr_rcv_lease_cb: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"Remaining time for Service Name:%s is:0x%X\n",
 				p_svcr->service_record.service_name,
 				p_svcr->lease_period);
diff --git a/opensm/opensm/osm_sa_slvl_record.c b/opensm/opensm/osm_sa_slvl_record.c
index 72d259f..9d717ba 100644
--- a/opensm/opensm/osm_sa_slvl_record.c
+++ b/opensm/opensm/osm_sa_slvl_record.c
@@ -92,8 +92,7 @@ __osm_sa_slvl_create(IN osm_sa_t * sa,
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_sa_slvl_create: ERR 2602: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2602: "
 			"rec_item alloc failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
@@ -105,8 +104,7 @@ __osm_sa_slvl_create(IN osm_sa_t * sa,
 		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,
-			"__osm_sa_slvl_create: "
+		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)),
@@ -155,8 +153,7 @@ __osm_sa_slvl_by_comp_mask(IN osm_sa_t * sa,
 	p_req_physp = p_ctxt->p_req_physp;
 
 	if (p_port->p_node->node_info.node_type != IB_NODE_TYPE_SWITCH) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_sa_slvl_by_comp_mask:  "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Using Physical Default Port Number: 0x%X (for End Node)\n",
 			p_port->p_physp->port_num);
 		p_out_physp = p_port->p_physp;
@@ -260,8 +257,7 @@ void osm_slvl_rec_rcv_process(IN void *ctx, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((p_rcvd_mad->method != IB_MAD_METHOD_GET) &&
 	    (p_rcvd_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_slvl_rec_rcv_process: ERR 2604: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2604: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(p_rcvd_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -275,8 +271,7 @@ void osm_slvl_rec_rcv_process(IN void *ctx, IN void *data)
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_slvl_rec_rcv_process: ERR 2603: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2603: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -292,8 +287,7 @@ void osm_slvl_rec_rcv_process(IN void *ctx, IN void *data)
 
 	cl_plock_acquire(sa->p_lock);
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_slvl_rec_rcv_process: "
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 		"Got Query Lid:0x%04X(%02X), In-Port:0x%02X(%02X), Out-Port:0x%02X(%02X)\n",
 		cl_ntoh16(p_rcvd_rec->lid),
 		(comp_mask & IB_SLVL_COMPMASK_LID) != 0,
@@ -317,8 +311,7 @@ void osm_slvl_rec_rcv_process(IN void *ctx, IN void *data)
 					     &p_port);
 		if ((status != IB_SUCCESS) || (p_port == NULL)) {
 			status = IB_NOT_FOUND;
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_slvl_rec_rcv_process: ERR 2608: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2608: "
 				"No port found with LID 0x%x\n",
 				cl_ntoh16(p_rcvd_rec->lid));
 		}
@@ -350,8 +343,7 @@ void osm_slvl_rec_rcv_process(IN void *ctx, IN void *data)
 			goto Exit;
 		}
 		if (num_rec > 1) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_slvl_rec_rcv_process: ERR 2607: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2607: "
 				"Got more than one record for SubnAdmGet (%u)\n",
 				num_rec);
 			osm_sa_send_error(sa, p_madw,
@@ -377,16 +369,14 @@ void osm_slvl_rec_rcv_process(IN void *ctx, IN void *data)
 	    (MAD_BLOCK_SIZE -
 	     IB_SA_MAD_HDR_SIZE) / sizeof(ib_slvl_table_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_slvl_rec_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_slvl_rec_rcv_process: " "Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	if ((p_rcvd_mad->method == IB_MAD_METHOD_GET) && (num_rec == 0)) {
 		osm_sa_send_error(sa, p_madw,
@@ -404,8 +394,7 @@ void osm_slvl_rec_rcv_process(IN void *ctx, IN void *data)
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_slvl_rec_rcv_process: ERR 2605: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2605: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -469,8 +458,7 @@ void osm_slvl_rec_rcv_process(IN void *ctx, IN void *data)
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_slvl_rec_rcv_process: ERR 2606: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2606: "
 			"osm_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
diff --git a/opensm/opensm/osm_sa_sminfo_record.c b/opensm/opensm/osm_sa_sminfo_record.c
index 595d890..5527892 100644
--- a/opensm/opensm/osm_sa_sminfo_record.c
+++ b/opensm/opensm/osm_sa_sminfo_record.c
@@ -97,18 +97,15 @@ __osm_smir_rcv_new_smir(IN osm_sa_t * sa,
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_smir_rcv_new_smir: ERR 2801: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2801: "
 			"rec_item alloc failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_smir_rcv_new_smir: "
-			"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));
 
@@ -225,8 +222,7 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((sad_mad->method != IB_MAD_METHOD_GET) &&
 	    (sad_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_smir_rcv_process: ERR 2804: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2804: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(sad_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -240,8 +236,7 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_smir_rcv_process: ERR 2803: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2803: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -273,8 +268,7 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 					     &p_port);
 		if ((status != IB_SUCCESS) || (p_port == NULL)) {
 			status = IB_NOT_FOUND;
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_smir_rcv_process: ERR 2806: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2806: "
 				"No port found with LID 0x%x\n",
 				cl_ntoh16(p_rcvd_rec->lid));
 		}
@@ -287,8 +281,7 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 					 sa->p_subn->sm_port_guid);
 		if (!local_port) {
 			cl_plock_release(sa->p_lock);
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_smir_rcv_process: ERR 2809: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2809: "
 				"No port found with GUID 0x%016" PRIx64 "\n",
 				cl_ntoh64(sa->p_subn->sm_port_guid));
 			goto Exit;
@@ -299,8 +292,7 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 			    osm_physp_share_pkey(sa->p_log, p_req_physp,
 						 local_port->p_physp)) {
 				cl_plock_release(sa->p_lock);
-				osm_log(sa->p_log, OSM_LOG_ERROR,
-					"osm_smir_rcv_process: ERR 2805: "
+				OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2805: "
 					"Cannot get SMInfo record due to pkey violation\n");
 				goto Exit;
 			}
@@ -345,8 +337,7 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 				__osm_sa_smir_by_comp_mask(sa, p_rem_sm,
 							   &context);
 			else {
-				osm_log(sa->p_log, OSM_LOG_ERROR,
-					"osm_smir_rcv_process: ERR 280A: "
+				OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 280A: "
 					"No remote SM for GUID 0x%016" PRIx64
 					"\n", cl_ntoh64(port_guid));
 			}
@@ -373,8 +364,7 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 			goto Exit;
 		}
 		if (num_rec > 1) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_smir_rcv_process: ERR 2808: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2808: "
 				"Got more than one record for SubnAdmGet (%u)\n",
 				num_rec);
 			osm_sa_send_error(sa, p_madw,
@@ -399,16 +389,14 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 	trim_num_rec =
 	    (MAD_BLOCK_SIZE - IB_SA_MAD_HDR_SIZE) / sizeof(ib_sminfo_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_smir_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_smir_rcv_process: " "Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	if ((sad_mad->method == IB_MAD_METHOD_GET) && (num_rec == 0)) {
 		osm_sa_send_error(sa, p_madw,
@@ -425,8 +413,7 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_smir_rcv_process: ERR 2807: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2807: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -492,8 +479,7 @@ void osm_smir_rcv_process(IN void *ctx, IN void *data)
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_smir_rcv_process: ERR 2802: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2802: "
 			"Error sending MAD (%s)\n", ib_get_err_str(status));
 		goto Exit;
 	}
diff --git a/opensm/opensm/osm_sa_sw_info_record.c b/opensm/opensm/osm_sa_sw_info_record.c
index 33a5df8..79f7a19 100644
--- a/opensm/opensm/osm_sa_sw_info_record.c
+++ b/opensm/opensm/osm_sa_sw_info_record.c
@@ -85,16 +85,14 @@ __osm_sir_rcv_new_sir(IN osm_sa_t * sa,
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_sir_rcv_new_sir: ERR 5308: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5308: "
 			"rec_item alloc failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
 	}
 
 	if (osm_log_is_active(sa->p_log, OSM_LOG_DEBUG))
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_sir_rcv_new_sir: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"New SwitchInfoRecord: lid 0x%X\n", cl_ntoh16(lid)
 		    );
 
@@ -121,8 +119,7 @@ static osm_port_t *__osm_sir_get_port_by_guid(IN osm_sa_t * sa,
 
 	p_port = osm_get_port_by_guid(sa->p_subn, port_guid);
 	if (!p_port) {
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_sir_get_port_by_guid ERR 5309: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "ERR 5309: "
 			"Invalid port GUID 0x%016" PRIx64 "\n", port_guid);
 		p_port = NULL;
 	}
@@ -149,8 +146,7 @@ __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,
-			"__osm_sir_rcv_create_sir: "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Looking for SwitchInfoRecord with LID: 0x%X\n",
 			cl_ntoh16(match_lid)
 		    );
@@ -161,8 +157,7 @@ __osm_sir_rcv_create_sir(IN osm_sa_t * sa,
 	    __osm_sir_get_port_by_guid(sa,
 				       p_sw->p_node->node_info.port_guid);
 	if (!p_port) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_sir_rcv_create_sir: ERR 530A: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 530A: "
 			"Failed to find Port by Node Guid:0x%016" PRIx64
 			"\n", cl_ntoh64(p_sw->p_node->node_info.node_guid)
 		    );
@@ -173,8 +168,7 @@ __osm_sir_rcv_create_sir(IN osm_sa_t * sa,
 	   the same partition. */
 	p_physp = p_port->p_physp;
 	if (!p_physp) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_sir_rcv_create_sir: ERR 530B: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 530B: "
 			"Failed to find default physical Port by Node Guid:0x%016"
 			PRIx64 "\n",
 			cl_ntoh64(p_sw->p_node->node_info.node_guid)
@@ -193,8 +187,7 @@ __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,
-				"__osm_sir_rcv_create_sir: "
+			OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 				"Comparing LID: 0x%X <= 0x%X <= 0x%X\n",
 				min_lid_ho, match_lid_ho, max_lid_ho);
 		}
@@ -281,8 +274,7 @@ void osm_sir_rcv_process(IN void *ctx, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((sad_mad->method != IB_MAD_METHOD_GET) &&
 	    (sad_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_sir_rcv_process: ERR 5305: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5305: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(sad_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -296,8 +288,7 @@ void osm_sir_rcv_process(IN void *ctx, IN void *data)
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_sir_rcv_process: ERR 5304: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5304: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -329,8 +320,7 @@ void osm_sir_rcv_process(IN void *ctx, IN void *data)
 	 * If we do a SubnAdmGet and got more than one record it is an error !
 	 */
 	if ((sad_mad->method == IB_MAD_METHOD_GET) && (num_rec > 1)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_sir_rcv_process: ERR 5303: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5303: "
 			"Got more than one record for SubnAdmGet (%u)\n",
 			num_rec);
 		osm_sa_send_error(sa, p_madw,
@@ -354,16 +344,14 @@ void osm_sir_rcv_process(IN void *ctx, IN void *data)
 	    (MAD_BLOCK_SIZE -
 	     IB_SA_MAD_HDR_SIZE) / sizeof(ib_switch_info_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_sir_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_sir_rcv_process: " "Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	if ((sad_mad->method == IB_MAD_METHOD_GET) && (num_rec == 0)) {
 		osm_sa_send_error(sa, p_madw,
@@ -381,8 +369,7 @@ void osm_sir_rcv_process(IN void *ctx, IN void *data)
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_sir_rcv_process: ERR 5306: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5306: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -444,8 +431,7 @@ void osm_sir_rcv_process(IN void *ctx, IN void *data)
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_sir_rcv_process: ERR 5307: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5307: "
 			"osm_sa_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
diff --git a/opensm/opensm/osm_sa_vlarb_record.c b/opensm/opensm/osm_sa_vlarb_record.c
index 2823412..7b022aa 100644
--- a/opensm/opensm/osm_sa_vlarb_record.c
+++ b/opensm/opensm/osm_sa_vlarb_record.c
@@ -92,8 +92,7 @@ __osm_sa_vl_arb_create(IN osm_sa_t * sa,
 
 	p_rec_item = malloc(sizeof(*p_rec_item));
 	if (p_rec_item == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"__osm_sa_vl_arb_create: ERR 2A02: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2A02: "
 			"rec_item alloc failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
@@ -105,8 +104,7 @@ __osm_sa_vl_arb_create(IN osm_sa_t * sa,
 		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,
-			"__osm_sa_vl_arb_create: "
+		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)),
@@ -174,8 +172,7 @@ __osm_sa_vl_arb_by_comp_mask(IN osm_sa_t * sa,
 	if (p_port->p_node->node_info.node_type != IB_NODE_TYPE_SWITCH) {
 		/* we put it in the comp mask and port num */
 		port_num = p_port->p_physp->port_num;
-		osm_log(sa->p_log, OSM_LOG_DEBUG,
-			"__osm_sa_vl_arb_by_comp_mask:  "
+		OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 			"Using Physical Default Port Number: 0x%X (for End Node)\n",
 			port_num);
 		comp_mask |= IB_VLA_COMPMASK_OUT_PORT;
@@ -193,8 +190,7 @@ __osm_sa_vl_arb_by_comp_mask(IN osm_sa_t * sa,
 				__osm_sa_vl_arb_check_physp(sa, p_physp,
 							    p_ctxt);
 		} else {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"__osm_sa_vl_arb_by_comp_mask: ERR 2A03: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2A03: "
 				"Given Physical Port Number: 0x%X is out of range should be < 0x%X\n",
 				port_num,
 				osm_node_get_num_physp(p_port->p_node));
@@ -276,8 +272,7 @@ void osm_vlarb_rec_rcv_process(IN void *ctx, IN void *data)
 	/* we only support SubnAdmGet and SubnAdmGetTable methods */
 	if ((sad_mad->method != IB_MAD_METHOD_GET) &&
 	    (sad_mad->method != IB_MAD_METHOD_GETTABLE)) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_vlarb_rec_rcv_process: ERR 2A05: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2A05: "
 			"Unsupported Method (%s)\n",
 			ib_get_sa_method_str(sad_mad->method));
 		osm_sa_send_error(sa, p_madw,
@@ -291,8 +286,7 @@ void osm_vlarb_rec_rcv_process(IN void *ctx, IN void *data)
 						osm_madw_get_mad_addr_ptr
 						(p_madw));
 	if (p_req_physp == NULL) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_vlarb_rec_rcv_process: ERR 2A04: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2A04: "
 			"Cannot find requester physical port\n");
 		goto Exit;
 	}
@@ -308,8 +302,7 @@ void osm_vlarb_rec_rcv_process(IN void *ctx, IN void *data)
 	context.block_num = p_rcvd_rec->block_num;
 	context.p_req_physp = p_req_physp;
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_vlarb_rec_rcv_process: "
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG,
 		"Got Query Lid:0x%04X(%02X), Port:0x%02X(%02X), Block:0x%02X(%02X)\n",
 		cl_ntoh16(p_rcvd_rec->lid),
 		(comp_mask & IB_VLA_COMPMASK_LID) != 0, p_rcvd_rec->port_num,
@@ -334,8 +327,7 @@ void osm_vlarb_rec_rcv_process(IN void *ctx, IN void *data)
 					     &p_port);
 		if ((status != IB_SUCCESS) || (p_port == NULL)) {
 			status = IB_NOT_FOUND;
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_vlarb_rec_rcv_process: ERR 2A09: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2A09: "
 				"No port found with LID 0x%x\n",
 				cl_ntoh16(p_rcvd_rec->lid));
 		}
@@ -368,8 +360,7 @@ void osm_vlarb_rec_rcv_process(IN void *ctx, IN void *data)
 			goto Exit;
 		}
 		if (num_rec > 1) {
-			osm_log(sa->p_log, OSM_LOG_ERROR,
-				"osm_vlarb_rec_rcv_process:  ERR 2A08: "
+			OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2A08: "
 				"Got more than one record for SubnAdmGet (%u)\n",
 				num_rec);
 			osm_sa_send_error(sa, p_madw,
@@ -395,17 +386,14 @@ void osm_vlarb_rec_rcv_process(IN void *ctx, IN void *data)
 	    (MAD_BLOCK_SIZE -
 	     IB_SA_MAD_HDR_SIZE) / sizeof(ib_vl_arb_table_record_t);
 	if (trim_num_rec < num_rec) {
-		osm_log(sa->p_log, OSM_LOG_VERBOSE,
-			"osm_vlarb_rec_rcv_process: "
+		OSM_LOG(sa->p_log, OSM_LOG_VERBOSE,
 			"Number of records:%u trimmed to:%u to fit in one MAD\n",
 			num_rec, trim_num_rec);
 		num_rec = trim_num_rec;
 	}
 #endif
 
-	osm_log(sa->p_log, OSM_LOG_DEBUG,
-		"osm_vlarb_rec_rcv_process: "
-		"Returning %u records\n", num_rec);
+	OSM_LOG(sa->p_log, OSM_LOG_DEBUG, "Returning %u records\n", num_rec);
 
 	if ((sad_mad->method == IB_MAD_METHOD_GET) && (num_rec == 0)) {
 		osm_sa_send_error(sa, p_madw,
@@ -423,8 +411,7 @@ void osm_vlarb_rec_rcv_process(IN void *ctx, IN void *data)
 				       IB_SA_MAD_HDR_SIZE, &p_madw->mad_addr);
 
 	if (!p_resp_madw) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_vlarb_rec_rcv_process: ERR 2A06: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2A06: "
 			"osm_mad_pool_get failed\n");
 
 		for (i = 0; i < num_rec; i++) {
@@ -488,8 +475,7 @@ void osm_vlarb_rec_rcv_process(IN void *ctx, IN void *data)
 	status = osm_sa_vendor_send(p_resp_madw->h_bind, p_resp_madw, FALSE,
 				    sa->p_subn);
 	if (status != IB_SUCCESS) {
-		osm_log(sa->p_log, OSM_LOG_ERROR,
-			"osm_vlarb_rec_rcv_process: ERR 2A07: "
+		OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 2A07: "
 			"osm_sa_vendor_send status = %s\n",
 			ib_get_err_str(status));
 		goto Exit;
diff --git a/opensm/opensm/osm_service.c b/opensm/opensm/osm_service.c
index 1c5c127..41aada2 100644
--- a/opensm/opensm/osm_service.c
+++ b/opensm/opensm/osm_service.c
@@ -146,8 +146,7 @@ osm_svcr_insert_to_db(IN osm_subn_t * p_subn,
 {
 	OSM_LOG_ENTER(p_log);
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osm_svcr_insert_to_db: "
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
 		"Inserting new Service Record into Database\n");
 
 	cl_qlist_insert_head(&p_subn->sa_sr_list, &p_svcr->list_item);
@@ -161,8 +160,7 @@ osm_svcr_remove_from_db(IN osm_subn_t * p_subn,
 {
 	OSM_LOG_ENTER(p_log);
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"osm_svcr_remove_from_db: "
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
 		"Removing Service Record Name:%s ID:0x%016" PRIx64
 		" from Database\n", p_svcr->service_record.service_name,
 		p_svcr->service_record.service_id);
diff --git a/opensm/opensm/osm_slvl_map_rcv.c b/opensm/opensm/osm_slvl_map_rcv.c
index aca364e..c78951d 100644
--- a/opensm/opensm/osm_slvl_map_rcv.c
+++ b/opensm/opensm/osm_slvl_map_rcv.c
@@ -99,8 +99,7 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 
 	if (!p_port) {
 		cl_plock_release(sm->p_lock);
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_slvl_rcv_process: ERR 2C06: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2C06: "
 			"No port object for port with GUID 0x%" PRIx64
 			"\n\t\t\t\tfor parent node GUID 0x%" PRIx64
 			", TID 0x%" PRIx64 "\n",
@@ -130,8 +129,7 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 	   the subnet.
 	 */
 	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE)) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"osm_slvl_rcv_process: "
+		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,
@@ -144,8 +142,7 @@ void osm_slvl_rcv_process(IN void *context, IN void *p_data)
 	   If so, Ignore it.
 	 */
 	if (!p_physp) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_slvl_rcv_process: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
 			"Got invalid port number 0x%X\n", out_port_num);
 		goto Exit;
 	}
diff --git a/opensm/opensm/osm_sm.c b/opensm/opensm/osm_sm.c
index f412e58..32525ba 100644
--- a/opensm/opensm/osm_sm.c
+++ b/opensm/opensm/osm_sm.c
@@ -112,12 +112,10 @@ static void __osm_sm_sweeper(IN void *p_ptr)
 					  EVENT_NO_TIMEOUT, TRUE);
 
 		if (status == CL_SUCCESS)
-			osm_log(p_sm->p_log, OSM_LOG_DEBUG,
-				"__osm_sm_sweeper: "
+			OSM_LOG(p_sm->p_log, OSM_LOG_DEBUG,
 				"Off schedule sweep signalled\n");
 		else if (status != CL_TIMEOUT) {
-			osm_log(p_sm->p_log, OSM_LOG_ERROR,
-				"__osm_sm_sweeper: ERR 2E01: "
+			OSM_LOG(p_sm->p_log, OSM_LOG_ERROR, "ERR 2E01: "
 				"Event wait failed (%s)\n",
 				CL_STATUS_MSG(status));
 			continue;
@@ -431,8 +429,7 @@ osm_sm_bind(IN osm_sm_t * const p_sm, IN const ib_net64_t port_guid)
 	status = osm_sm_mad_ctrl_bind(&p_sm->mad_ctrl, port_guid);
 
 	if (status != IB_SUCCESS) {
-		osm_log(p_sm->p_log, OSM_LOG_ERROR,
-			"osm_sm_bind: ERR 2E10: "
+		OSM_LOG(p_sm->p_log, OSM_LOG_ERROR, "ERR 2E10: "
 			"SM MAD Controller bind failed (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -512,8 +509,7 @@ osm_sm_mcgrp_join(IN osm_sm_t * const p_sm,
 
 	OSM_LOG_ENTER(p_sm->p_log);
 
-	osm_log(p_sm->p_log, OSM_LOG_VERBOSE,
-		"osm_sm_mcgrp_join: "
+	OSM_LOG(p_sm->p_log, OSM_LOG_VERBOSE,
 		"Port 0x%016" PRIx64 " joining MLID 0x%X\n",
 		cl_ntoh64(port_guid), cl_ntoh16(mlid));
 
@@ -524,8 +520,7 @@ osm_sm_mcgrp_join(IN osm_sm_t * const p_sm,
 	p_port = osm_get_port_by_guid(p_sm->p_subn, port_guid);
 	if (!p_port) {
 		CL_PLOCK_RELEASE(p_sm->p_lock);
-		osm_log(p_sm->p_log, OSM_LOG_ERROR,
-			"osm_sm_mcgrp_join: ERR 2E05: "
+		OSM_LOG(p_sm->p_log, OSM_LOG_ERROR, "ERR 2E05: "
 			"No port object for port 0x%016" PRIx64 "\n",
 			cl_ntoh64(port_guid));
 		status = IB_INVALID_PARAMETER;
@@ -538,15 +533,13 @@ osm_sm_mcgrp_join(IN osm_sm_t * const p_sm,
 	p_tbl = &p_sm->p_subn->mgrp_mlid_tbl;
 	p_mgrp = (osm_mgrp_t *) cl_qmap_get(p_tbl, mlid);
 	if (p_mgrp == (osm_mgrp_t *) cl_qmap_end(p_tbl)) {
-		osm_log(p_sm->p_log, OSM_LOG_VERBOSE,
-			"osm_sm_mcgrp_join: "
+		OSM_LOG(p_sm->p_log, OSM_LOG_VERBOSE,
 			"Creating group, MLID 0x%X\n", cl_ntoh16(mlid));
 
 		p_mgrp = osm_mgrp_new(mlid);
 		if (p_mgrp == NULL) {
 			CL_PLOCK_RELEASE(p_sm->p_lock);
-			osm_log(p_sm->p_log, OSM_LOG_ERROR,
-				"osm_sm_mcgrp_join: ERR 2E06: "
+			OSM_LOG(p_sm->p_log, OSM_LOG_ERROR, "ERR 2E06: "
 				"Unable to allocate multicast group object\n");
 			status = IB_INSUFFICIENT_MEMORY;
 			goto Exit;
@@ -562,8 +555,7 @@ osm_sm_mcgrp_join(IN osm_sm_t * const p_sm,
 		 */
 		if (!osm_mgrp_is_guid(p_mgrp, port_guid)) {
 			CL_PLOCK_RELEASE(p_sm->p_lock);
-			osm_log(p_sm->p_log, OSM_LOG_ERROR,
-				"osm_sm_mcgrp_join: ERR 2E12: "
+			OSM_LOG(p_sm->p_log, OSM_LOG_ERROR, "ERR 2E12: "
 				"Port 0x%016" PRIx64
 				" not in mcast group 0x%X\n",
 				cl_ntoh64(port_guid), cl_ntoh16(mlid));
@@ -581,8 +573,7 @@ osm_sm_mcgrp_join(IN osm_sm_t * const p_sm,
 	while (p_mcm != (osm_mcm_info_t *) cl_qlist_end(&p_port->mcm_list)) {
 		if (p_mcm->mlid == mlid) {
 			CL_PLOCK_RELEASE(p_sm->p_lock);
-			osm_log(p_sm->p_log, OSM_LOG_DEBUG,
-				"osm_sm_mcgrp_join: "
+			OSM_LOG(p_sm->p_log, OSM_LOG_DEBUG,
 				"Found mlid object for Port:"
 				"0x%016" PRIx64 " lid:0x%X\n",
 				cl_ntoh64(port_guid), cl_ntoh16(mlid));
@@ -594,8 +585,7 @@ osm_sm_mcgrp_join(IN osm_sm_t * const p_sm,
 	status = osm_port_add_mgrp(p_port, mlid);
 	if (status != IB_SUCCESS) {
 		CL_PLOCK_RELEASE(p_sm->p_lock);
-		osm_log(p_sm->p_log, OSM_LOG_ERROR,
-			"osm_sm_mcgrp_join: ERR 2E03: "
+		OSM_LOG(p_sm->p_log, OSM_LOG_ERROR, "ERR 2E03: "
 			"Unable to associate port 0x%" PRIx64 " to mlid 0x%X\n",
 			cl_ntoh64(osm_port_get_guid(p_port)),
 			cl_ntoh16(osm_mgrp_get_mlid(p_mgrp)));
@@ -623,8 +613,7 @@ osm_sm_mcgrp_leave(IN osm_sm_t * const p_sm,
 
 	OSM_LOG_ENTER(p_sm->p_log);
 
-	osm_log(p_sm->p_log, OSM_LOG_VERBOSE,
-		"osm_sm_mcgrp_leave: "
+	OSM_LOG(p_sm->p_log, OSM_LOG_VERBOSE,
 		"Port 0x%" PRIx64 " leaving MLID 0x%X\n",
 		cl_ntoh64(port_guid), cl_ntoh16(mlid));
 
@@ -636,8 +625,7 @@ osm_sm_mcgrp_leave(IN osm_sm_t * const p_sm,
 	p_port = osm_get_port_by_guid(p_sm->p_subn, port_guid);
 	if (!p_port) {
 		CL_PLOCK_RELEASE(p_sm->p_lock);
-		osm_log(p_sm->p_log, OSM_LOG_ERROR,
-			"osm_sm_mcgrp_leave: ERR 2E04: "
+		OSM_LOG(p_sm->p_log, OSM_LOG_ERROR, "ERR 2E04: "
 			"No port object for port 0x%" PRIx64 "\n",
 			cl_ntoh64(port_guid));
 		status = IB_INVALID_PARAMETER;
@@ -651,8 +639,7 @@ osm_sm_mcgrp_leave(IN osm_sm_t * const p_sm,
 	p_mgrp = (osm_mgrp_t *) cl_qmap_get(p_tbl, mlid);
 	if (p_mgrp == (osm_mgrp_t *) cl_qmap_end(p_tbl)) {
 		CL_PLOCK_RELEASE(p_sm->p_lock);
-		osm_log(p_sm->p_log, OSM_LOG_ERROR,
-			"osm_sm_mcgrp_leave: ERR 2E08: "
+		OSM_LOG(p_sm->p_log, OSM_LOG_ERROR, "ERR 2E08: "
 			"No multicast group for MLID 0x%X\n", cl_ntoh16(mlid));
 		status = IB_INVALID_PARAMETER;
 		goto Exit;
diff --git a/opensm/opensm/osm_sm_mad_ctrl.c b/opensm/opensm/osm_sm_mad_ctrl.c
index 15b8626..4b0c27f 100644
--- a/opensm/opensm/osm_sm_mad_ctrl.c
+++ b/opensm/opensm/osm_sm_mad_ctrl.c
@@ -82,8 +82,7 @@ __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,
-			"__osm_sm_mad_ctrl_retire_trans_mad: "
+		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));
 
@@ -92,8 +91,7 @@ __osm_sm_mad_ctrl_retire_trans_mad(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	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,
-			"__osm_sm_mad_ctrl_retire_trans_mad: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
 			"%u QP0 MADs outstanding\n",
 			p_ctrl->p_stats->qp0_mads_outstanding);
 
@@ -102,8 +100,7 @@ __osm_sm_mad_ctrl_retire_trans_mad(IN osm_sm_mad_ctrl_t * const p_ctrl,
 		   The wire is clean.
 		   Signal the subnet manager.
 		 */
-		osm_log(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"__osm_sm_mad_ctrl_retire_trans_mad: wire is clean.\n");
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG, "wire is clean.\n");
 #ifdef HAVE_LIBPTHREAD
 		pthread_cond_signal(&p_ctrl->p_stats->cond);
 #else
@@ -179,8 +176,7 @@ __osm_sm_mad_ctrl_update_wire_stats(IN osm_sm_mad_ctrl_t * const p_ctrl)
 	    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,
-			"__osm_sm_mad_ctrl_update_wire_stats: "
+		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);
 
@@ -220,8 +216,7 @@ __osm_sm_mad_ctrl_process_get_resp(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	p_smp = osm_madw_get_smp_ptr(p_madw);
 
 	if (p_smp->mgmt_class == IB_MCLASS_SUBN_DIR && !ib_smp_is_d(p_smp)) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_process_get_resp: ERR 3102: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3102: "
 			"'D' bit not set in returned SMP\n");
 		osm_dump_dr_smp(p_ctrl->p_log, p_smp, OSM_LOG_ERROR);
 	}
@@ -282,8 +277,7 @@ __osm_sm_mad_ctrl_process_get_resp(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	case IB_MAD_ATTR_INFORM_INFO:
 	default:
 		cl_atomic_inc(&p_ctrl->p_stats->qp0_mads_rcvd_unknown);
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_process_get_resp: ERR 3103: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3103: "
 			"Unsupported attribute = 0x%X\n",
 			cl_ntoh16(p_smp->attr_id));
 		osm_dump_dr_smp(p_ctrl->p_log, p_smp, OSM_LOG_ERROR);
@@ -299,8 +293,7 @@ __osm_sm_mad_ctrl_process_get_resp(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	 */
 
 	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		osm_log(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"__osm_sm_mad_ctrl_process_get_resp: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
 			"Posting Dispatcher message %s\n",
 			osm_get_disp_msg_str(msg_id));
 
@@ -308,8 +301,7 @@ __osm_sm_mad_ctrl_process_get_resp(IN osm_sm_mad_ctrl_t * const p_ctrl,
 			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
 
 	if (status != CL_SUCCESS) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_process_get_resp: ERR 3104: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3104: "
 			"Dispatcher post message failed (%s) for attribute = 0x%X\n",
 			CL_STATUS_MSG(status), cl_ntoh16(p_smp->attr_id));
 		goto Exit;
@@ -351,8 +343,7 @@ __osm_sm_mad_ctrl_process_get(IN osm_sm_mad_ctrl_t * const p_ctrl,
 
 	default:
 		cl_atomic_inc(&p_ctrl->p_stats->qp0_mads_rcvd_unknown);
-		osm_log(p_ctrl->p_log, OSM_LOG_VERBOSE,
-			"__osm_sm_mad_ctrl_process_get: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_VERBOSE,
 			"Ignoring SubnGet MAD - unsupported attribute = 0x%X\n",
 			cl_ntoh16(p_smp->attr_id));
 		break;
@@ -373,8 +364,7 @@ __osm_sm_mad_ctrl_process_get(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	 */
 
 	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		osm_log(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"__osm_sm_mad_ctrl_process_get: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
 			"Posting Dispatcher message %s\n",
 			osm_get_disp_msg_str(msg_id));
 
@@ -382,8 +372,7 @@ __osm_sm_mad_ctrl_process_get(IN osm_sm_mad_ctrl_t * const p_ctrl,
 			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
 
 	if (status != CL_SUCCESS) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_process_get: ERR 3106: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3106: "
 			"Dispatcher post message failed (%s)\n",
 			CL_STATUS_MSG(status));
 		goto Exit;
@@ -435,8 +424,7 @@ __osm_sm_mad_ctrl_process_set(IN osm_sm_mad_ctrl_t * const p_ctrl,
 
 	default:
 		cl_atomic_inc(&p_ctrl->p_stats->qp0_mads_rcvd_unknown);
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_process_set: ERR  3107: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3107: "
 			"Unsupported attribute = 0x%X\n",
 			cl_ntoh16(p_smp->attr_id));
 		osm_dump_dr_smp(p_ctrl->p_log, p_smp, OSM_LOG_ERROR);
@@ -458,8 +446,7 @@ __osm_sm_mad_ctrl_process_set(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	 */
 
 	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		osm_log(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"__osm_sm_mad_ctrl_process_set: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
 			"Posting Dispatcher message %s\n",
 			osm_get_disp_msg_str(msg_id));
 
@@ -467,8 +454,7 @@ __osm_sm_mad_ctrl_process_set(IN osm_sm_mad_ctrl_t * const p_ctrl,
 			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
 
 	if (status != CL_SUCCESS) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_process_set: ERR 3108: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3108: "
 			"Dispatcher post message failed (%s)\n",
 			CL_STATUS_MSG(status));
 		goto Exit;
@@ -511,8 +497,7 @@ __osm_sm_mad_ctrl_process_trap(IN osm_sm_mad_ctrl_t * const p_ctrl,
 
 	/* Make sure OpenSM is master. If not - then we should not process the trap */
 	if (p_ctrl->p_subn->sm_state != IB_SMINFO_STATE_MASTER) {
-		osm_log(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"__osm_sm_mad_ctrl_process_trap: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
 			"Received trap but OpenSM is not in MASTER state. "
 			"Dropping mad\n");
 		osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw);
@@ -530,8 +515,7 @@ __osm_sm_mad_ctrl_process_trap(IN osm_sm_mad_ctrl_t * const p_ctrl,
 
 	default:
 		cl_atomic_inc(&p_ctrl->p_stats->qp0_mads_rcvd_unknown);
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_process_trap: ERR 3109: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3109: "
 			"Unsupported attribute = 0x%X\n",
 			cl_ntoh16(p_smp->attr_id));
 		osm_dump_dr_smp(p_ctrl->p_log, p_smp, OSM_LOG_ERROR);
@@ -553,8 +537,7 @@ __osm_sm_mad_ctrl_process_trap(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	 */
 
 	if (osm_log_is_active(p_ctrl->p_log, OSM_LOG_DEBUG))
-		osm_log(p_ctrl->p_log, OSM_LOG_DEBUG,
-			"__osm_sm_mad_ctrl_process_trap: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
 			"Posting Dispatcher message %s\n",
 			osm_get_disp_msg_str(msg_id));
 
@@ -562,8 +545,7 @@ __osm_sm_mad_ctrl_process_trap(IN osm_sm_mad_ctrl_t * const p_ctrl,
 			      __osm_sm_mad_ctrl_disp_done_callback, p_ctrl);
 
 	if (status != CL_SUCCESS) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_process_trap: ERR 3110: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3110: "
 			"Dispatcher post message failed (%s)\n",
 			CL_STATUS_MSG(status));
 		goto Exit;
@@ -611,8 +593,7 @@ __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,
-			"__osm_sm_mad_ctrl_rcv_callback: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_DEBUG,
 			"%u QP0 MADs received\n",
 			p_ctrl->p_stats->qp0_mads_rcvd);
 
@@ -620,8 +601,7 @@ __osm_sm_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 
 	/* if we are closing down simply do nothing */
 	if (osm_exit_flag) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_rcv_callback: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR,
 			"Ignoring received mad - since we are exiting\n");
 
 		osm_dump_dr_smp(p_ctrl->p_log, p_smp, OSM_LOG_DEBUG);
@@ -648,8 +628,7 @@ __osm_sm_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 		status = p_smp->status;
 
 	if (status != 0) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_rcv_callback: ERR 3111: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3111: "
 			"Error status = 0x%X\n", status);
 		osm_dump_dr_smp(p_ctrl->p_log, p_smp, OSM_LOG_ERROR);
 	}
@@ -681,8 +660,7 @@ __osm_sm_mad_ctrl_rcv_callback(IN osm_madw_t * p_madw,
 	case IB_MAD_METHOD_TRAP_REPRESS:
 	default:
 		cl_atomic_inc(&p_ctrl->p_stats->qp0_mads_rcvd_unknown);
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_rcv_callback: ERR 3112: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3112: "
 			"Unsupported method = 0x%X\n", p_smp->method);
 		osm_dump_dr_smp(p_ctrl->p_log, p_smp, OSM_LOG_ERROR);
 		osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw);
@@ -724,8 +702,7 @@ __osm_sm_mad_ctrl_send_err_cb(IN void *bind_context, IN osm_madw_t * p_madw)
 
 	CL_ASSERT(p_madw);
 
-	osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-		"__osm_sm_mad_ctrl_send_err_cb: ERR 3113: "
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3113: "
 		"MAD completed in error (%s)\n",
 		ib_get_err_str(p_madw->status));
 
@@ -741,8 +718,7 @@ __osm_sm_mad_ctrl_send_err_cb(IN void *bind_context, IN osm_madw_t * p_madw)
 	     p_smp->attr_id == IB_MAD_ATTR_MCAST_FWD_TBL ||
 	     p_smp->attr_id == IB_MAD_ATTR_SWITCH_INFO ||
 	     p_smp->attr_id == IB_MAD_ATTR_LIN_FWD_TBL)) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"__osm_sm_mad_ctrl_send_err_cb: ERR 3119: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3119: "
 			"Set method failed\n");
 		p_ctrl->p_subn->subnet_initialization_error = TRUE;
 	}
@@ -763,8 +739,7 @@ __osm_sm_mad_ctrl_send_err_cb(IN void *bind_context, IN osm_madw_t * p_madw)
 					      p_ctrl->p_subn,
 					      &(p_madw->mad_addr));
 		if (!p_physp) {
-			osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-				"__osm_sm_mad_ctrl_send_err_cb: ERR 3114: "
+			OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3114: "
 				"Failed to find the corresponding phys port\n");
 		} else {
 			osm_physp_replace_dr_path_with_alternate_dr_path
@@ -786,8 +761,7 @@ __osm_sm_mad_ctrl_send_err_cb(IN void *bind_context, IN osm_madw_t * p_madw)
 
 	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,
-				"__osm_sm_mad_ctrl_send_err_cb: "
+			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)));
@@ -798,8 +772,7 @@ __osm_sm_mad_ctrl_send_err_cb(IN void *bind_context, IN osm_madw_t * p_madw)
 				      __osm_sm_mad_ctrl_disp_done_callback,
 				      p_ctrl);
 		if (status != CL_SUCCESS)
-			osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-				"__osm_sm_mad_ctrl_send_err_cb: ERR 3115: "
+			OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3115: "
 				"Dispatcher post message failed (%s)\n",
 				CL_STATUS_MSG(status));
 	} else
@@ -873,8 +846,7 @@ osm_sm_mad_ctrl_init(IN osm_sm_mad_ctrl_t * const p_ctrl,
 					  CL_DISP_MSGID_NONE, NULL, NULL);
 
 	if (p_ctrl->h_disp == CL_DISP_INVALID_HANDLE) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_sm_mad_ctrl_init: ERR 3116: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 3116: "
 			"Dispatcher registration failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
@@ -897,8 +869,7 @@ osm_sm_mad_ctrl_bind(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	OSM_LOG_ENTER(p_ctrl->p_log);
 
 	if (p_ctrl->h_bind != OSM_BIND_INVALID_HANDLE) {
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"osm_sm_mad_ctrl_bind: ERR 3117: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3117: "
 			"Multiple binds not allowed\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -913,8 +884,7 @@ osm_sm_mad_ctrl_bind(IN osm_sm_mad_ctrl_t * const p_ctrl,
 	bind_info.recv_q_size = OSM_SM_DEFAULT_QP0_RCV_SIZE;
 	bind_info.send_q_size = OSM_SM_DEFAULT_QP0_SEND_SIZE;
 
-	osm_log(p_ctrl->p_log, OSM_LOG_VERBOSE,
-		"osm_sm_mad_ctrl_bind: "
+	OSM_LOG(p_ctrl->p_log, OSM_LOG_VERBOSE,
 		"Binding to port 0x%" PRIx64 "\n", cl_ntoh64(port_guid));
 
 	p_ctrl->h_bind = osm_vendor_bind(p_ctrl->p_vendor,
@@ -925,8 +895,7 @@ osm_sm_mad_ctrl_bind(IN osm_sm_mad_ctrl_t * const p_ctrl,
 
 	if (p_ctrl->h_bind == OSM_BIND_INVALID_HANDLE) {
 		status = IB_ERROR;
-		osm_log(p_ctrl->p_log, OSM_LOG_ERROR,
-			"osm_sm_mad_ctrl_bind: ERR 3118: "
+		OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3118: "
 			"Vendor specific bind failed\n");
 		goto Exit;
 	}
diff --git a/opensm/opensm/osm_sm_state_mgr.c b/opensm/opensm/osm_sm_state_mgr.c
index f71bc43..1fb67c5 100644
--- a/opensm/opensm/osm_sm_state_mgr.c
+++ b/opensm/opensm/osm_sm_state_mgr.c
@@ -105,8 +105,7 @@ static void __osm_sm_state_mgr_send_master_sm_info_req(osm_sm_t * sm)
 		p_port = sm->p_polling_sm->p_port;
 	}
 	if (p_port == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sm_state_mgr_send_master_sm_info_req: ERR 3203: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3203: "
 			"No port object for GUID 0x%016" PRIx64 "\n",
 			cl_ntoh64(sm->master_sm_guid));
 		goto Exit;
@@ -120,8 +119,7 @@ static void __osm_sm_state_mgr_send_master_sm_info_req(osm_sm_t * sm)
 			     &context);
 
 	if (status != IB_SUCCESS)
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sm_state_mgr_send_master_sm_info_req: ERR 3204: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3204: "
 			"Failure requesting SMInfo (%s)\n",
 			ib_get_err_str(status));
 
@@ -155,8 +153,7 @@ static void __osm_sm_state_mgr_start_polling(osm_sm_t * sm)
 	 */
 	cl_status = cl_timer_start(&sm->polling_timer, timeout);
 	if (cl_status != CL_SUCCESS)
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sm_state_mgr_start_polling: ERR 3210: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3210: "
 			"Failed to start timer\n");
 
 	OSM_LOG_EXIT(sm->p_log);
@@ -191,8 +188,7 @@ void osm_sm_state_mgr_polling_callback(IN void *context)
 	 * signal is on - since we are currently in exit flow
 	 */
 	if (sm->p_subn->sm_state == IB_SMINFO_STATE_STANDBY && osm_exit_flag) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"osm_sm_state_mgr_polling_callback: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Signalling subnet_up_event\n");
 		cl_event_signal(&sm->subnet_up_event);
 		goto Exit;
@@ -204,13 +200,11 @@ void osm_sm_state_mgr_polling_callback(IN void *context)
 	 * osm_sm_state_mgr_process with signal OSM_SM_SIGNAL_POLLING_TIMEOUT
 	 */
 	sm->retry_number++;
-	osm_log(sm->p_log, OSM_LOG_VERBOSE,
-		"__osm_sm_state_mgr_polling_callback: "
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 		"Retry number:%d\n", sm->retry_number);
 
 	if (sm->retry_number >= sm->p_subn->opt.polling_retry_number) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_sm_state_mgr_polling_callback: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Reached polling_retry_number value in retry_number. "
 			"Go to DISCOVERY state\n");
 		osm_sm_state_mgr_process(sm, OSM_SM_SIGNAL_POLLING_TIMEOUT);
@@ -223,8 +217,7 @@ void osm_sm_state_mgr_polling_callback(IN void *context)
 	/* restart the timer */
 	cl_status = cl_timer_start(&sm->polling_timer, timeout);
 	if (cl_status != CL_SUCCESS)
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sm_state_mgr_polling_callback: ERR 3211: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3211: "
 			"Failed to restart timer\n");
 
 Exit:
@@ -237,8 +230,7 @@ Exit:
 static void __osm_sm_state_mgr_signal_error(osm_sm_t * sm,
 					    IN const osm_sm_signal_t signal)
 {
-	osm_log(sm->p_log, OSM_LOG_ERROR,
-		"__osm_sm_state_mgr_signal_error: ERR 3207: "
+	OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3207: "
 		"Invalid signal %s in state %s\n",
 		osm_get_sm_mgr_signal_str(signal),
 		osm_get_sm_mgr_state_str(sm->p_subn->sm_state));
@@ -271,8 +263,7 @@ 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,
-			"osm_sm_state_mgr_process: "
+		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));
@@ -423,8 +414,7 @@ ib_api_status_t osm_sm_state_mgr_process(osm_sm_t * sm,
 			 * We also want to clear the p_polling_sm object - since we are
 			 * done polling on that remote sm - we got a handover from it.
 			 */
-			osm_log(sm->p_log, OSM_LOG_VERBOSE,
-				"osm_sm_state_mgr_process: "
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 				"Forcing heavy sweep. "
 				"Received OSM_SM_SIGNAL_HANDOVER or OSM_SM_SIGNAL_POLLING_TIMEOUT\n");
 			sm->p_polling_sm = NULL;
@@ -462,8 +452,7 @@ ib_api_status_t osm_sm_state_mgr_process(osm_sm_t * sm,
 		break;
 
 	default:
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_sm_state_mgr_process: ERR 3208: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3208: "
 			"Invalid state %s\n",
 			osm_get_sm_mgr_state_str(sm->p_subn->sm_state));
 
@@ -493,8 +482,7 @@ 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,
-			"osm_sm_state_mgr_check_legality: "
+		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));
@@ -556,8 +544,7 @@ ib_api_status_t osm_sm_state_mgr_check_legality(osm_sm_t * sm,
 		break;
 
 	default:
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_sm_state_mgr_check_legality: ERR 3209: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3209: "
 			"Invalid state %s\n",
 			osm_get_sm_mgr_state_str(sm->p_subn->sm_state));
 		status = IB_INVALID_PARAMETER;
diff --git a/opensm/opensm/osm_sminfo_rcv.c b/opensm/opensm/osm_sminfo_rcv.c
index 8f96eaf..96221d6 100644
--- a/opensm/opensm/osm_sminfo_rcv.c
+++ b/opensm/opensm/osm_sminfo_rcv.c
@@ -116,22 +116,19 @@ __osm_sminfo_rcv_process_get_request(IN osm_sm_t * sm,
 	 */
 	p_remote_smi = ib_smp_get_payload_ptr(osm_madw_get_smp_ptr(p_madw));
 	if (ib_sminfo_get_state(p_remote_smi) == IB_SMINFO_STATE_MASTER) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_sminfo_rcv_process_get_request: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Responding to master SM with real sm_key\n");
 		p_smi->sm_key = sm->p_subn->opt.sm_key;
 	} else {
 		/* The requester is not authenticated as master - set sm_key to zero. */
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_sminfo_rcv_process_get_request: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Responding to SM not master with zero sm_key\n");
 		p_smi->sm_key = 0;
 	}
 
 	status = osm_resp_send(sm, p_madw, 0, payload);
 	if (status != IB_SUCCESS) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_get_request: ERR 2F02: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F02: "
 			"Error sending response (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -202,8 +199,7 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 	sm_smi = ib_smp_get_payload_ptr(p_smp);
 
 	if (p_smp->method != IB_MAD_METHOD_SET) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_set_request: ERR 2F03: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F03: "
 			"Unsupported method 0x%X\n", p_smp->method);
 		CL_PLOCK_RELEASE(sm->p_lock);
 		goto Exit;
@@ -219,14 +215,12 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 	 */
 	p_remote_smi = ib_smp_get_payload_ptr(osm_madw_get_smp_ptr(p_madw));
 	if (ib_sminfo_get_state(p_remote_smi) == IB_SMINFO_STATE_MASTER) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_sminfo_rcv_process_set_request: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Responding to master SM with real sm_key\n");
 		p_smi->sm_key = sm->p_subn->opt.sm_key;
 	} else {
 		/* The requester is not authenticated as master - set sm_key to zero. */
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_sminfo_rcv_process_set_request: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Responding to SM not master with zero sm_key\n");
 		p_smi->sm_key = 0;
 	}
@@ -234,16 +228,14 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 	/* Check the legality of the packet */
 	status = __osm_sminfo_rcv_check_set_req_legality(p_smp);
 	if (status != IB_SUCCESS) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_set_request: ERR 2F04: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F04: "
 			"Check legality failed. AttributeModifier:0x%X RemoteState:%s\n",
 			p_smp->attr_mod,
 			osm_get_sm_mgr_state_str(ib_sminfo_get_state(sm_smi)));
 		/* send a response with error code */
 		status = osm_resp_send(sm, p_madw, 7, payload);
 		if (status != IB_SUCCESS)
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_sminfo_rcv_process_set_request: ERR 2F05: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F05: "
 				"Error sending response (%s)\n",
 				ib_get_err_str(status));
 		CL_PLOCK_RELEASE(sm->p_lock);
@@ -272,8 +264,7 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 		   This code shouldn't be reached - checked in the
 		   check legality
 		 */
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_set_request: ERR 2F06: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F06: "
 			"THIS CODE SHOULD NOT BE REACHED!!\n");
 		CL_PLOCK_RELEASE(sm->p_lock);
 		goto Exit;
@@ -282,16 +273,14 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 	/* check legality of the needed transition in the SM state machine */
 	status = osm_sm_state_mgr_check_legality(sm, sm_signal);
 	if (status != IB_SUCCESS) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_set_request: ERR 2F07: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F07: "
 			"Failed check of legality of needed SM transition. AttributeModifier:0x%X RemoteState:%s\n",
 			p_smp->attr_mod,
 			osm_get_sm_mgr_state_str(ib_sminfo_get_state(sm_smi)));
 		/* send a response with error code */
 		status = osm_resp_send(sm, p_madw, 7, payload);
 		if (status != IB_SUCCESS)
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_sminfo_rcv_process_set_request: ERR 2F08: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F08: "
 				"Error sending response (%s)\n",
 				ib_get_err_str(status));
 		CL_PLOCK_RELEASE(sm->p_lock);
@@ -301,8 +290,7 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 	/* the SubnSet(SMInfo) command is ok. Send a response. */
 	status = osm_resp_send(sm, p_madw, 0, payload);
 	if (status != IB_SUCCESS)
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_set_request: ERR 2F09: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F09: "
 			"Error sending response (%s)\n",
 			ib_get_err_str(status));
 
@@ -311,8 +299,7 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 	/* if the AttributeModifier is STANDBY - need to save on the sm in */
 	/* the master_sm_guid variable - the guid of the current master. */
 	if (p_smp->attr_mod == IB_SMINFO_ATTR_MOD_STANDBY) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_sminfo_rcv_process_set_request: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Received a STANDBY signal. Updating "
 			"sm_state_mgr master_guid: 0x%016" PRIx64 "\n",
 			cl_ntoh64(sm_smi->guid));
@@ -324,8 +311,7 @@ __osm_sminfo_rcv_process_set_request(IN osm_sm_t * sm,
 	status = osm_sm_state_mgr_process(sm, sm_signal);
 
 	if (status != IB_SUCCESS)
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_set_request: ERR 2F10: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F10: "
 			"Error in SM state transition (%s)\n",
 			ib_get_err_str(status));
 
@@ -346,8 +332,7 @@ __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,
-			"__osm_sminfo_rcv_process_get_sm: "
+		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));
 
@@ -365,8 +350,7 @@ __osm_sminfo_rcv_process_get_sm(IN osm_sm_t * sm,
 		case IB_SMINFO_STATE_MASTER:
 			sm->master_sm_found = 1;
 			/* save on the sm the guid of the current master. */
-			osm_log(sm->p_log, OSM_LOG_VERBOSE,
-				"__osm_sminfo_rcv_process_get_sm: "
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 				"Found master SM. Updating sm_state_mgr master_guid: 0x%016"
 				PRIx64 "\n", cl_ntoh64(p_sm->p_port->guid));
 			sm->master_sm_guid = p_sm->p_port->guid;
@@ -379,8 +363,7 @@ __osm_sminfo_rcv_process_get_sm(IN osm_sm_t * sm,
 				sm->master_sm_found = 1;
 				/* save on the sm the guid of the higher SM we found - */
 				/* we will poll it - as long as it lives - we should be in Standby. */
-				osm_log(sm->p_log, OSM_LOG_VERBOSE,
-					"__osm_sminfo_rcv_process_get_sm: "
+				OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 					"Found higher SM. Updating sm_state_mgr master_guid:"
 					" 0x%016" PRIx64 "\n",
 					cl_ntoh64(p_sm->p_port->guid));
@@ -468,8 +451,7 @@ __osm_sminfo_rcv_process_get_response(IN osm_sm_t * sm,
 	p_smp = osm_madw_get_smp_ptr(p_madw);
 
 	if (p_smp->method != IB_MAD_METHOD_GET_RESP) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_get_response: ERR 2F11: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F11: "
 			"Unsupported method 0x%X\n", p_smp->method);
 		goto Exit;
 	}
@@ -484,8 +466,7 @@ __osm_sminfo_rcv_process_get_response(IN osm_sm_t * sm,
 	   Check that the sm_key of the found SM is the same as ours,
 	   or is zero. If not - OpenSM cannot continue with configuration!. */
 	if (p_smi->sm_key != 0 && p_smi->sm_key != sm->p_subn->opt.sm_key) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_get_response: ERR 2F18: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F18: "
 			"Got SM with sm_key that doesn't match our "
 			"local key. Exiting\n");
 		osm_log(sm->p_log, OSM_LOG_SYS,
@@ -501,17 +482,14 @@ __osm_sminfo_rcv_process_get_response(IN osm_sm_t * sm,
 
 	p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 	if (!p_port) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_get_response: ERR 2F12: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F12: "
 			"No port object for this SM\n");
 		goto _unlock_and_exit;
 	}
 
 	if (osm_port_get_guid(p_port) != p_smi->guid) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_get_response: ERR 2F13: "
-			"Bogus SM port GUID"
-			"\n\t\t\t\tExpected 0x%016" PRIx64
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F13: "
+			"Bogus SM port GUID\n\t\t\t\tExpected 0x%016" PRIx64
 			", Received 0x%016" PRIx64 "\n",
 			cl_ntoh64(osm_port_get_guid(p_port)),
 			cl_ntoh64(p_smi->guid));
@@ -519,8 +497,7 @@ __osm_sminfo_rcv_process_get_response(IN osm_sm_t * sm,
 	}
 
 	if (port_guid == sm->p_subn->sm_port_guid) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_sminfo_rcv_process_get_response: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Self query response received - SM port 0x%016" PRIx64
 			"\n", cl_ntoh64(port_guid));
 		goto _unlock_and_exit;
@@ -530,8 +507,7 @@ __osm_sminfo_rcv_process_get_response(IN osm_sm_t * sm,
 	if (p_sm == (osm_remote_sm_t *) cl_qmap_end(p_sm_tbl)) {
 		p_sm = malloc(sizeof(*p_sm));
 		if (p_sm == NULL) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_sminfo_rcv_process_get_response: ERR 2F14: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F14: "
 				"Unable to allocate SM object\n");
 			goto _unlock_and_exit;
 		}
@@ -571,8 +547,7 @@ __osm_sminfo_rcv_process_set_response(IN osm_sm_t * sm,
 	p_smp = osm_madw_get_smp_ptr(p_madw);
 
 	if (p_smp->method != IB_MAD_METHOD_GET_RESP) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_set_response: ERR 2F16: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F16: "
 			"Unsupported method 0x%X\n", p_smp->method);
 		goto Exit;
 	}
@@ -582,8 +557,7 @@ __osm_sminfo_rcv_process_set_response(IN osm_sm_t * sm,
 
 	/* Check the AttributeModifier */
 	if (p_smp->attr_mod != IB_SMINFO_ATTR_MOD_HANDOVER) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_sminfo_rcv_process_set_response: ERR 2F17: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F17: "
 			"Unsupported attribute modifier 0x%X\n",
 			p_smp->attr_mod);
 		goto Exit;
@@ -629,8 +603,7 @@ void osm_sminfo_rcv_process(IN void *context, IN void *data)
 		   moving issue.
 		 */
 		if (p_smi_context->port_guid != p_smi->guid) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"osm_sminfo_rcv_process: ERR 2F19: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 2F19: "
 				"Unexpected SM port GUID in response"
 				"\n\t\t\t\tExpected 0x%016" PRIx64
 				", Received 0x%016" PRIx64 "\n",
diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
index fa9a273..8f76c00 100644
--- a/opensm/opensm/osm_state_mgr.c
+++ b/opensm/opensm/osm_state_mgr.c
@@ -101,8 +101,7 @@ static void __osm_state_mgr_reset_node_count(IN cl_map_item_t *
 	osm_sm_t *sm = context;
 
 	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_state_mgr_reset_node_count: "
+		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);
@@ -120,8 +119,7 @@ static void __osm_state_mgr_reset_port_count(IN cl_map_item_t *
 	osm_sm_t *sm = context;
 
 	if (osm_log_is_active(sm->p_log, OSM_LOG_DEBUG)) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_state_mgr_reset_port_count: "
+		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->
@@ -141,8 +139,7 @@ __osm_state_mgr_reset_switch_count(IN cl_map_item_t * const 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,
-			"__osm_state_mgr_reset_switch_count: "
+		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)),
@@ -180,8 +177,7 @@ static void __osm_state_mgr_get_sw_info(IN cl_map_item_t * const p_object,
 			     OSM_MSG_LIGHT_SWEEP_FAIL, &mad_context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_state_mgr_get_sw_info: ERR 3304: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3304: "
 			"Request for SwitchInfo failed\n");
 	}
 
@@ -225,8 +221,7 @@ __osm_state_mgr_get_remote_port_info(IN osm_sm_t * sm,
 			     &mad_context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_state_mgr_get_remote_port_info: ERR 332E: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 332E: "
 			"Request for PortInfo failed\n");
 	}
 
@@ -286,13 +281,11 @@ static ib_api_status_t __osm_state_mgr_sweep_hop_0(IN osm_sm_t * sm)
 				     CL_DISP_MSGID_NONE, NULL);
 
 		if (status != IB_SUCCESS) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_state_mgr_sweep_hop_0: ERR 3305: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3305: "
 				"Request for NodeInfo failed\n");
 		}
 	} else {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_state_mgr_sweep_hop_0: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"No bound ports. Deferring sweep...\n");
 		status = IB_INVALID_STATE;
 	}
@@ -340,8 +333,7 @@ static ib_api_status_t __osm_state_mgr_notify_lid_change(IN osm_sm_t * sm)
 	 */
 	h_bind = osm_sm_mad_ctrl_get_bind_handle(&sm->mad_ctrl);
 	if (h_bind == OSM_BIND_INVALID_HANDLE) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_state_mgr_notify_lid_change: ERR 3306: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3306: "
 			"No bound ports\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -352,8 +344,7 @@ static ib_api_status_t __osm_state_mgr_notify_lid_change(IN osm_sm_t * sm)
 	 */
 	status = osm_vendor_local_lid_change(h_bind);
 	if (status != IB_SUCCESS) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_state_mgr_notify_lid_change: ERR 3307: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3307: "
 			"Vendor LID update failed (%s)\n",
 			ib_get_err_str(status));
 	}
@@ -382,8 +373,7 @@ static boolean_t __osm_state_mgr_is_sm_port_down(IN osm_sm_t * sm)
 	 * If we don't know our own port guid yet, assume the port is down.
 	 */
 	if (port_guid == 0) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_state_mgr_is_sm_port_down: ERR 3308: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3308: "
 			"SM port GUID unknown\n");
 		state = IB_LINK_DOWN;
 		goto Exit;
@@ -394,8 +384,7 @@ static boolean_t __osm_state_mgr_is_sm_port_down(IN osm_sm_t * sm)
 	CL_PLOCK_ACQUIRE(sm->p_lock);
 	p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 	if (!p_port) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_state_mgr_is_sm_port_down: ERR 3309: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3309: "
 			"SM port with GUID:%016" PRIx64 " (%s) is unknown\n",
 			cl_ntoh64(port_guid),
 			p_port->p_node ? p_port->p_node->
@@ -457,8 +446,7 @@ static ib_api_status_t __osm_state_mgr_sweep_hop_1(IN osm_sm_t * sm)
 
 	p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 	if (!p_port) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_state_mgr_sweep_hop_1: ERR 3310: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3310: "
 			"No SM port object\n");
 		status = IB_ERROR;
 		goto Exit;
@@ -469,8 +457,7 @@ static ib_api_status_t __osm_state_mgr_sweep_hop_1(IN osm_sm_t * sm)
 
 	port_num = ib_node_info_get_local_port_num(&p_node->node_info);
 
-	osm_log(sm->p_log, OSM_LOG_DEBUG,
-		"__osm_state_mgr_sweep_hop_1: "
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 		"Probing hop 1 on local port %u\n", port_num);
 
 	p_physp = osm_node_get_physp_ptr(p_node, port_num);
@@ -500,8 +487,7 @@ static ib_api_status_t __osm_state_mgr_sweep_hop_1(IN osm_sm_t * sm)
 				     CL_DISP_MSGID_NONE, &context);
 
 		if (status != IB_SUCCESS) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_state_mgr_sweep_hop_1: ERR 3311: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3311: "
 				"Request for NodeInfo failed\n");
 		}
 		break;
@@ -535,8 +521,7 @@ static ib_api_status_t __osm_state_mgr_sweep_hop_1(IN osm_sm_t * sm)
 						CL_DISP_MSGID_NONE, &context);
 
 				if (status != IB_SUCCESS) {
-					osm_log(sm->p_log, OSM_LOG_ERROR,
-						"__osm_state_mgr_sweep_hop_1: ERR 3312: "
+					OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3312: "
 						"Request for NodeInfo failed\n");
 				}
 			}
@@ -544,8 +529,8 @@ static ib_api_status_t __osm_state_mgr_sweep_hop_1(IN osm_sm_t * sm)
 		break;
 
 	default:
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_state_mgr_sweep_hop_1: ERR 3313: Unknown node type %d (%s)\n",
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+			"ERR 3313: Unknown node type %d (%s)\n",
 			osm_node_get_type(p_node), p_node->print_desc);
 	}
 
@@ -599,8 +584,8 @@ static ib_api_status_t __osm_state_mgr_light_sweep_start(IN osm_sm_t * sm)
 				    && (osm_physp_get_port_state(p_physp) !=
 					IB_LINK_DOWN)
 				    && !osm_physp_get_remote(p_physp)) {
-					osm_log(sm->p_log, OSM_LOG_ERROR,
-						"__osm_state_mgr_light_sweep_start: ERR 0108: "
+					OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+						"ERR 0108: "
 						"Unknown remote side for node 0x%016"
 						PRIx64
 						"(%s) port %u. Adding to light sweep sampling list\n",
@@ -620,8 +605,7 @@ static ib_api_status_t __osm_state_mgr_light_sweep_start(IN osm_sm_t * sm)
 		}
 		CL_PLOCK_RELEASE(sm->p_lock);
 	} else {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_state_mgr_light_sweep_start: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"No bound ports. Deferring sweep...\n");
 		status = IB_INVALID_STATE;
 	}
@@ -652,8 +636,7 @@ static osm_remote_sm_t *__osm_state_mgr_exists_other_master_sm(IN osm_sm_t * sm)
 	     p_sm = (osm_remote_sm_t *) cl_qmap_next(&p_sm->map_item)) {
 		/* If the sm is in MASTER state - return a pointer to it */
 		if (ib_sminfo_get_state(&p_sm->smi) == IB_SMINFO_STATE_MASTER) {
-			osm_log(sm->p_log, OSM_LOG_VERBOSE,
-				"__osm_state_mgr_exists_other_master_sm: "
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 				"Found remote master SM with guid:0x%016" PRIx64
 				" (node %s)\n", cl_ntoh64(p_sm->smi.guid),
 				p_sm->p_port->p_node ? p_sm->p_port->p_node->
@@ -714,8 +697,7 @@ static osm_remote_sm_t *__osm_state_mgr_get_highest_sm(IN osm_sm_t * sm)
 	}
 
 	if (p_highest_sm != NULL) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_state_mgr_get_highest_sm: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Found higher SM with guid: %016" PRIx64 " (node %s)\n",
 			cl_ntoh64(p_highest_sm->smi.guid),
 			p_highest_sm->p_port->p_node ?
@@ -749,16 +731,14 @@ __osm_state_mgr_send_handover(IN osm_sm_t * const sm,
 	memset(&context, 0, sizeof(context));
 	p_port = p_sm->p_port;
 	if (p_port == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_state_mgr_send_handover: ERR 3316: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3316: "
 			"No port object on given remote_sm object\n");
 		goto Exit;
 	}
 
 	/* update the master_guid in the sm_state_mgr object according to */
 	/* the guid of the port where the new Master SM should reside. */
-	osm_log(sm->p_log, OSM_LOG_VERBOSE,
-		"__osm_state_mgr_send_handover: "
+	OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 		"Handing over mastership. Updating sm_state_mgr master_guid: %016"
 		PRIx64 " (node %s)\n", cl_ntoh64(p_port->guid),
 		p_port->p_node ? p_port->p_node->print_desc : "UNKNOWN");
@@ -776,14 +756,12 @@ __osm_state_mgr_send_handover(IN osm_sm_t * const sm,
 	 * as the master SM.
 	 */
 	if (ib_sminfo_get_state(&p_sm->smi) == IB_SMINFO_STATE_MASTER) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_state_mgr_send_handover: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Responding to master SM with real sm_key\n");
 		p_smi->sm_key = sm->p_subn->opt.sm_key;
 	} else {
 		/* The requester is not authenticated as master - set sm_key to zero */
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_state_mgr_send_handover: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Responding to SM not master with zero sm_key\n");
 		p_smi->sm_key = 0;
 	}
@@ -795,8 +773,7 @@ __osm_state_mgr_send_handover(IN osm_sm_t * const sm,
 			     CL_DISP_MSGID_NONE, &context);
 
 	if (status != IB_SUCCESS) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_state_mgr_send_handover: ERR 3317: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3317: "
 			"Failure requesting SMInfo (%s)\n",
 			ib_get_err_str(status));
 	}
@@ -856,15 +833,13 @@ static void __osm_state_mgr_report_new_ports(IN osm_sm_t * sm)
 
 		status = osm_report_notice(sm->p_log, sm->p_subn, &notice);
 		if (status != IB_SUCCESS) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_state_mgr_report_new_ports: ERR 3318: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3318: "
 				"Error sending trap reports on GUID:0x%016"
 				PRIx64 " (%s)\n", port_gid.unicast.interface_id,
 				ib_get_err_str(status));
 		}
 		osm_port_get_lid_range_ho(p_port, &min_lid_ho, &max_lid_ho);
-		osm_log(sm->p_log, OSM_LOG_INFO,
-			"__osm_state_mgr_report_new_ports: "
+		OSM_LOG(sm->p_log, OSM_LOG_INFO,
 			"Discovered new port with GUID:0x%016" PRIx64
 			" LID range [0x%X,0x%X] of node:%s\n",
 			cl_ntoh64(port_gid.unicast.interface_id),
@@ -950,8 +925,7 @@ static void __osm_state_mgr_check_tbl_consistency(IN osm_sm_t * sm)
 			 * didn't get the PortInfo Set request. Due to this, the port
 			 * is updated with its original lid in our database, but with the
 			 * new lid we wanted to give it in our port_lid_tbl. */
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_state_mgr_check_tbl_consistency: ERR 3322: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3322: "
 				"lid 0x%zX is wrongly assigned to port 0x%016"
 				PRIx64 " in port_lid_tbl\n", lid,
 				cl_ntoh64(osm_port_get_guid(p_port_stored)));
@@ -960,11 +934,10 @@ static void __osm_state_mgr_check_tbl_consistency(IN osm_sm_t * sm)
 				/* There is an object in the new database, but no object in our subnet
 				 * database. This is the matching case of the prior check - the port
 				 * still has its original lid. */
-				osm_log(sm->p_log, OSM_LOG_ERROR,
-					"__osm_state_mgr_check_tbl_consistency: ERR 3323: "
-					"port 0x%016" PRIx64
-					" exists in new port_lid_tbl under "
-					"lid 0x%zX, but missing in subnet port_lid_tbl db\n",
+				OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3323: "
+					"port 0x%016" PRIx64 " exists in new "
+					"port_lid_tbl under lid 0x%zX, but "
+					"missing in subnet port_lid_tbl db\n",
 					cl_ntoh64(osm_port_get_guid
 						  (p_port_ref)), lid);
 			} else {
@@ -972,8 +945,7 @@ static void __osm_state_mgr_check_tbl_consistency(IN osm_sm_t * sm)
 				/* if we reached here then p_port_stored != p_port_ref.
 				 * We were trying to set a lid to p_port_stored, but it didn't reach it,
 				 * and p_port_ref also didn't get the lid update. */
-				osm_log(sm->p_log, OSM_LOG_ERROR,
-					"__osm_state_mgr_check_tbl_consistency: ERR 3324: "
+				OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3324: "
 					"lid 0x%zX has port 0x%016" PRIx64
 					" in new port_lid_tbl db, "
 					"and port 0x%016" PRIx64
@@ -1069,8 +1041,7 @@ _repeat_discovery:
 	/* rescan configuration updates */
 	status = osm_subn_rescan_conf_files(sm->p_subn);
 	if (status != IB_SUCCESS)
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"do_sweep: ERR 331A: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 331A: "
 			"osm_subn_rescan_conf_file failed\n");
 
 	if (sm->p_subn->sm_state != IB_SMINFO_STATE_MASTER)
@@ -1298,8 +1269,7 @@ 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,
-			"osm_state_mgr_process: "
+		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));
@@ -1315,8 +1285,7 @@ void osm_state_mgr_process(IN osm_sm_t * sm, IN osm_signal_t signal)
 
 	default:
 		CL_ASSERT(FALSE);
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_state_mgr_process: ERR 3320: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3320: "
 			"Invalid SM signal %u\n", signal);
 		break;
 	}
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index a0fbf00..03fd53a 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -234,8 +234,7 @@ osm_get_gid_by_mad_addr(IN osm_log_t * p_log,
 	const osm_port_t *p_port = NULL;
 
 	if (p_gid == NULL) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_get_gid_by_mad_addr: ERR 7505: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 7505: "
 			"Provided output GID is NULL\n");
 		return (IB_INVALID_PARAMETER);
 	}
@@ -250,22 +249,18 @@ osm_get_gid_by_mad_addr(IN osm_log_t * p_log,
 		p_port =
 		    cl_ptr_vector_get(p_tbl, cl_ntoh16(p_mad_addr->dest_lid));
 		if (p_port == NULL) {
-			osm_log(p_log, OSM_LOG_DEBUG,
-				"osm_get_gid_by_mad_addr: "
+			OSM_LOG(p_log, OSM_LOG_DEBUG,
 				"Did not find any port with LID: 0x%X\n",
-				cl_ntoh16(p_mad_addr->dest_lid)
-			    );
+				cl_ntoh16(p_mad_addr->dest_lid));
 			return (IB_INVALID_PARAMETER);
 		}
 		p_gid->unicast.interface_id = p_port->p_physp->port_guid;
 		p_gid->unicast.prefix = p_subn->opt.subnet_prefix;
 	} else {
 		/* The dest_lid is not in the subnet table - this is an error */
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_get_gid_by_mad_addr: ERR 7501: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 7501: "
 			"LID is out of range: 0x%X\n",
-			cl_ntoh16(p_mad_addr->dest_lid)
-		    );
+			cl_ntoh16(p_mad_addr->dest_lid));
 		return (IB_INVALID_PARAMETER);
 	}
 
@@ -294,22 +289,18 @@ osm_physp_t *osm_get_physp_by_mad_addr(IN osm_log_t * p_log,
 				      cl_ntoh16(p_mad_addr->dest_lid));
 		if (p_port == NULL) {
 			/* The port is not in the port_lid table - this is an error */
-			osm_log(p_log, OSM_LOG_ERROR,
-				"osm_get_physp_by_mad_addr: ERR 7502: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 7502: "
 				"Cannot locate port object by lid: 0x%X\n",
-				cl_ntoh16(p_mad_addr->dest_lid)
-			    );
+				cl_ntoh16(p_mad_addr->dest_lid));
 
 			goto Exit;
 		}
 		p_physp = p_port->p_physp;
 	} else {
 		/* The dest_lid is not in the subnet table - this is an error */
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_get_physp_by_mad_addr: ERR 7503: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 7503: "
 			"Lid is out of range: 0x%X\n",
-			cl_ntoh16(p_mad_addr->dest_lid)
-		    );
+			cl_ntoh16(p_mad_addr->dest_lid));
 	}
 
 Exit:
@@ -337,11 +328,9 @@ osm_port_t *osm_get_port_by_mad_addr(IN osm_log_t * p_log,
 				      cl_ntoh16(p_mad_addr->dest_lid));
 	} else {
 		/* The dest_lid is not in the subnet table - this is an error */
-		osm_log(p_log, OSM_LOG_ERROR,
-			"osm_get_port_by_mad_addr: ERR 7504: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 7504: "
 			"Lid is out of range: 0x%X\n",
-			cl_ntoh16(p_mad_addr->dest_lid)
-		    );
+			cl_ntoh16(p_mad_addr->dest_lid));
 	}
 
 	return p_port;
@@ -696,7 +685,7 @@ append_prefix_route(IN osm_subn_t * const p_subn, uint64_t prefix, uint64_t guid
 
 	route = malloc(sizeof *route);
 	if (! route) {
-		osm_log(&p_subn->p_osm->log, OSM_LOG_ERROR, "%s: out of memory", __FUNCTION__);
+		OSM_LOG(&p_subn->p_osm->log, OSM_LOG_ERROR, "out of memory");
 		return IB_ERROR;
 	}
 
@@ -725,8 +714,8 @@ osm_parse_prefix_routes_file(IN osm_subn_t * const p_subn)
 		if (errno == ENOENT)
 			return IB_SUCCESS;
 
-		osm_log(log, OSM_LOG_ERROR, "%s: fopen(%s) failed: %s",
-			__FUNCTION__, p_subn->opt.prefix_routes_file, strerror(errno));
+		OSM_LOG(log, OSM_LOG_ERROR, "fopen(%s) failed: %s",
+			p_subn->opt.prefix_routes_file, strerror(errno));
 		return IB_ERROR;
 	}
 
@@ -747,7 +736,7 @@ osm_parse_prefix_routes_file(IN osm_subn_t * const p_subn)
 
 		p_guid = strtok_r(NULL, " \t\n", &p_last);
 		if (! p_guid) {
-			osm_log(log, OSM_LOG_ERROR, "%s:%d: missing GUID\n",
+			OSM_LOG(log, OSM_LOG_ERROR, "%s:%d: missing GUID\n",
 				p_subn->opt.prefix_routes_file, line);
 			errors++;
 			continue;
@@ -755,7 +744,7 @@ osm_parse_prefix_routes_file(IN osm_subn_t * const p_subn)
 
 		p_extra = strtok_r(NULL, " \t\n", &p_last);
 		if (p_extra && *p_extra != '#') {
-			osm_log(log, OSM_LOG_INFO, "%s:%d: extra tokens ignored\n",
+			OSM_LOG(log, OSM_LOG_INFO, "%s:%d: extra tokens ignored\n",
 				p_subn->opt.prefix_routes_file, line);
 		}
 
@@ -764,7 +753,7 @@ osm_parse_prefix_routes_file(IN osm_subn_t * const p_subn)
 		else {
 			prefix = strtoull(p_prefix, &p_end, 16);
 			if (*p_end != '\0') {
-				osm_log(log, OSM_LOG_ERROR, "%s:%d: illegal prefix: %s\n",
+				OSM_LOG(log, OSM_LOG_ERROR, "%s:%d: illegal prefix: %s\n",
 					p_subn->opt.prefix_routes_file, line, p_prefix);
 				errors++;
 				continue;
@@ -776,7 +765,7 @@ osm_parse_prefix_routes_file(IN osm_subn_t * const p_subn)
 		else {
 			guid = strtoull(p_guid, &p_end, 16);
 			if (*p_end != '\0' && *p_end != '#') {
-				osm_log(log, OSM_LOG_ERROR, "%s:%d: illegal GUID: %s\n",
+				OSM_LOG(log, OSM_LOG_ERROR, "%s:%d: illegal GUID: %s\n",
 					p_subn->opt.prefix_routes_file, line, p_guid);
 				errors++;
 				continue;
@@ -814,7 +803,7 @@ ib_api_status_t osm_subn_rescan_conf_files(IN osm_subn_t * const p_subn)
 	if (!opts_file) {
 		if (errno == ENOENT)
 			return IB_SUCCESS;
-		osm_log(&p_subn->p_osm->log, OSM_LOG_ERROR,
+		OSM_LOG(&p_subn->p_osm->log, OSM_LOG_ERROR,
 			"cannot open file \'%s\': %s\n",
 			file_name, strerror(errno));
 		return IB_ERROR;
diff --git a/opensm/opensm/osm_sw_info_rcv.c b/opensm/opensm/osm_sw_info_rcv.c
index 06aaa91..f03f5be 100644
--- a/opensm/opensm/osm_sw_info_rcv.c
+++ b/opensm/opensm/osm_sw_info_rcv.c
@@ -114,8 +114,7 @@ __osm_si_rcv_get_port_info(IN osm_sm_t * sm,
 				     CL_DISP_MSGID_NONE, &context);
 		if (status != IB_SUCCESS) {
 			/* continue the loop despite the error */
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_si_rcv_get_port_info: ERR 3602: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3602: "
 				"Failure initiating PortInfo request (%s)\n",
 				ib_get_err_str(status));
 		}
@@ -159,8 +158,7 @@ __osm_si_rcv_get_fwd_tbl(IN osm_sm_t * sm,
 
 	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,
-				"__osm_si_rcv_get_fwd_tbl: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Retrieving FT block %u\n", block_id_ho);
 		}
 
@@ -171,8 +169,7 @@ __osm_si_rcv_get_fwd_tbl(IN osm_sm_t * sm,
 				     CL_DISP_MSGID_NONE, &context);
 		if (status != IB_SUCCESS) {
 			/* continue the loop despite the error */
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_si_rcv_get_fwd_tbl: ERR 3603: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3603: "
 				"Failure initiating PortInfo request (%s)\n",
 				ib_get_err_str(status));
 		}
@@ -209,8 +206,7 @@ __osm_si_rcv_get_mcast_fwd_tbl(IN osm_sm_t * sm,
 	CL_ASSERT(osm_node_get_type(p_node) == IB_NODE_TYPE_SWITCH);
 
 	if (osm_switch_get_mcast_fwd_tbl_size(p_sw) == 0) {
-		osm_log(sm->p_log, OSM_LOG_DEBUG,
-			"__osm_si_rcv_get_mcast_fwd_tbl: "
+		OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 			"Multicast not supported by switch 0x%016" PRIx64 "\n",
 			cl_ntoh64(osm_node_get_node_guid(p_node)));
 		goto Exit;
@@ -225,8 +221,7 @@ __osm_si_rcv_get_mcast_fwd_tbl(IN osm_sm_t * sm,
 	max_block_id_ho = osm_mcast_tbl_get_max_block(p_tbl);
 
 	if (max_block_id_ho > IB_MCAST_MAX_BLOCK_ID) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_si_rcv_get_mcast_fwd_tbl: ERR 3609: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3609: "
 			"Out-of-range mcast block size = %u on switch 0x%016"
 			PRIx64 "\n", max_block_id_ho,
 			cl_ntoh64(osm_node_get_node_guid(p_node)));
@@ -237,8 +232,7 @@ __osm_si_rcv_get_mcast_fwd_tbl(IN osm_sm_t * sm,
 
 	CL_ASSERT(max_position <= IB_MCAST_POSITION_MAX);
 
-	osm_log(sm->p_log, OSM_LOG_DEBUG,
-		"__osm_si_rcv_get_mcast_fwd_tbl: "
+	OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 		"Max MFT block = %u, Max position = %u\n", max_block_id_ho,
 		max_position);
 
@@ -246,15 +240,13 @@ __osm_si_rcv_get_mcast_fwd_tbl(IN osm_sm_t * sm,
 
 	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,
-				"__osm_si_rcv_get_mcast_fwd_tbl: "
+			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,
-					"__osm_si_rcv_get_mcast_fwd_tbl: "
+				OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 					"Retrieving MFT position %u\n",
 					position);
 			}
@@ -268,8 +260,7 @@ __osm_si_rcv_get_mcast_fwd_tbl(IN osm_sm_t * sm,
 					CL_DISP_MSGID_NONE, &context);
 			if (status != IB_SUCCESS) {
 				/* continue the loop despite the error */
-				osm_log(sm->p_log, OSM_LOG_ERROR,
-					"__osm_si_rcv_get_mcast_fwd_tbl: ERR 3607: "
+				OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3607: "
 					"Failure initiating PortInfo request (%s)\n",
 					ib_get_err_str(status));
 			}
@@ -314,8 +305,7 @@ __osm_si_rcv_process_new(IN osm_sm_t * sm,
 	 */
 	p_sw = osm_switch_new(p_node, p_madw);
 	if (p_sw == NULL) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_si_rcv_process_new: ERR 3608: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3608: "
 			"Unable to allocate new switch object\n");
 		goto Exit;
 	}
@@ -324,8 +314,7 @@ __osm_si_rcv_process_new(IN osm_sm_t * sm,
 	if (p_sw->mcast_tbl.max_mlid_ho < sm->p_subn->max_multicast_lid_ho) {
 		sm->p_subn->max_multicast_lid_ho =
 		    p_sw->mcast_tbl.max_mlid_ho;
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_si_rcv_process_new: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Subnet max multicast lid is 0x%X\n",
 			sm->p_subn->max_multicast_lid_ho);
 	}
@@ -334,8 +323,7 @@ __osm_si_rcv_process_new(IN osm_sm_t * sm,
 	if (p_sw->fwd_tbl.p_lin_tbl->size < sm->p_subn->max_unicast_lid_ho) {
 		sm->p_subn->max_unicast_lid_ho =
 		    p_sw->fwd_tbl.p_lin_tbl->size;
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"__osm_si_rcv_process_new: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Subnet max unicast lid is 0x%X\n",
 			sm->p_subn->max_unicast_lid_ho);
 	}
@@ -348,8 +336,7 @@ __osm_si_rcv_process_new(IN osm_sm_t * sm,
 		/*
 		   This shouldn't happen since we hold the lock!
 		 */
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_si_rcv_process_new: ERR 3605: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3605: "
 			"Unable to add new switch object to database\n");
 		osm_switch_delete(&p_sw);
 		goto Exit;
@@ -416,16 +403,14 @@ __osm_si_rcv_process_existing(IN osm_sm_t * sm,
 
 	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,
-				"__osm_si_rcv_process_existing: "
+			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,
-				"__osm_si_rcv_process_existing: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Received logical GetResp()\n");
 		}
 
@@ -440,8 +425,7 @@ __osm_si_rcv_process_existing(IN osm_sm_t * sm,
 			/* If the mad was returned with an error -
 			   signal a change to the state manager. */
 			if (ib_smp_get_status(p_smp) != 0) {
-				osm_log(sm->p_log, OSM_LOG_VERBOSE,
-					"__osm_si_rcv_process_existing: "
+				OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 					"GetResp() received with error in light sweep. "
 					"Commencing heavy sweep\n");
 				is_change_detected = TRUE;
@@ -463,8 +447,7 @@ __osm_si_rcv_process_existing(IN osm_sm_t * sm,
 			   of the state change bit.
 			 */
 			p_sw->discovery_count++;
-			osm_log(sm->p_log, OSM_LOG_VERBOSE,
-				"__osm_si_rcv_process_existing: "
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 				"discovery_count is:%u\n",
 				p_sw->discovery_count);
 
@@ -472,8 +455,7 @@ __osm_si_rcv_process_existing(IN osm_sm_t * sm,
 			if (p_sw->discovery_count == 1)
 				__osm_si_rcv_get_port_info(sm, p_sw, p_madw);
 			else {
-				osm_log(sm->p_log, OSM_LOG_DEBUG,
-					"__osm_si_rcv_process_existing: "
+				OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 					"Not discovering again through switch:0x%"
 					PRIx64 "\n",
 					osm_node_get_node_guid(p_sw->p_node));
@@ -515,10 +497,8 @@ 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,
-			"osm_si_rcv_process: "
-			"Switch GUID 0x%016" PRIx64
-			", TID 0x%" PRIx64 "\n",
+		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));
 	}
 
@@ -526,8 +506,7 @@ void osm_si_rcv_process(IN void *context, IN void *data)
 
 	p_node = osm_get_node_by_guid(sm->p_subn, node_guid);
 	if (!p_node) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_si_rcv_process: ERR 3606: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3606: "
 			"SwitchInfo received for nonexistent node "
 			"with GUID 0x%" PRIx64 "\n", cl_ntoh64(node_guid));
 	} else {
@@ -536,8 +515,7 @@ void osm_si_rcv_process(IN void *context, IN void *data)
 		   Hack for bad value in Mellanox switch
 		 */
 		if (cl_ntoh16(p_si->lin_top) > IB_LID_UCAST_END_HO) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"osm_si_rcv_process: ERR 3610: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3610: "
 				"\n\t\t\t\tBad LinearFDBTop value = 0x%X "
 				"on switch 0x%" PRIx64
 				"\n\t\t\t\tForcing correction to 0x%X\n",
diff --git a/opensm/opensm/osm_sweep_fail_ctrl.c b/opensm/opensm/osm_sweep_fail_ctrl.c
index 111ddf3..efe7e65 100644
--- a/opensm/opensm/osm_sweep_fail_ctrl.c
+++ b/opensm/opensm/osm_sweep_fail_ctrl.c
@@ -105,8 +105,7 @@ osm_sweep_fail_ctrl_init(IN osm_sweep_fail_ctrl_t * const p_ctrl,
 					  p_ctrl);
 
 	if (p_ctrl->h_disp == CL_DISP_INVALID_HANDLE) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_sweep_fail_ctrl_init: ERR 3501: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3501: "
 			"Dispatcher registration failed\n");
 		status = IB_INSUFFICIENT_RESOURCES;
 		goto Exit;
diff --git a/opensm/opensm/osm_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c
index 491b104..5cf5a21 100644
--- a/opensm/opensm/osm_trap_rcv.c
+++ b/opensm/opensm/osm_trap_rcv.c
@@ -131,15 +131,13 @@ osm_trap_rcv_aging_tracker_callback(IN uint64_t key,
 
 	p_physp = get_physp_by_lid_and_num(sm, lid, port_num);
 	if (!p_physp)
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"osm_trap_rcv_aging_tracker_callback: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Cannot find port num:0x%X with lid:%u\n",
 			port_num, lid);
 	/* make sure the physp is still valid */
 	/* If the health port was false - set it to true */
 	else if (!osm_physp_is_healthy(p_physp)) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"osm_trap_rcv_aging_tracker_callback: "
+		OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 			"Clearing health bit of port num:%u with lid:%u\n",
 			port_num, lid);
 
@@ -286,8 +284,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 	p_smp = osm_madw_get_smp_ptr(p_madw);
 
 	if (p_smp->method != IB_MAD_METHOD_TRAP) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_trap_rcv_process_request: ERR 3801: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3801: "
 			"Unsupported method 0x%X\n", p_smp->method);
 		goto Exit;
 	}
@@ -313,13 +310,11 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 			   the local lid wasn't configured yet. Don't send a response
 			   to the trap. */
 			if (sm->p_subn->sm_base_lid == 0) {
-				osm_log(sm->p_log, OSM_LOG_DEBUG,
-					"__osm_trap_rcv_process_request: "
+				OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 					"Received SLID=0 Trap with local LID=0. Ignoring MAD\n");
 				goto Exit;
 			}
-			osm_log(sm->p_log, OSM_LOG_DEBUG,
-				"__osm_trap_rcv_process_request: "
+			OSM_LOG(sm->p_log, OSM_LOG_DEBUG,
 				"Received SLID=0 Trap. Using local LID:0x%04X instead\n",
 				cl_ntoh16(sm->p_subn->sm_base_lid)
 			    );
@@ -336,8 +331,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 				CL_HTON16(130))
 			    || (p_ntci->g_or_v.generic.trap_num ==
 				CL_HTON16(131)))
-				osm_log(sm->p_log, OSM_LOG_ERROR,
-					"__osm_trap_rcv_process_request: "
+				OSM_LOG(sm->p_log, OSM_LOG_ERROR,
 					"Received Generic Notice type:0x%02X num:%u Producer:%u (%s) "
 					"from LID:0x%04X Port %d TID:0x%016"
 					PRIx64 "\n", ib_notice_get_type(p_ntci),
@@ -352,8 +346,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 					port_num, cl_ntoh64(p_smp->trans_id)
 				    );
 			else
-				osm_log(sm->p_log, OSM_LOG_ERROR,
-					"__osm_trap_rcv_process_request: "
+				OSM_LOG(sm->p_log, OSM_LOG_ERROR,
 					"Received Generic Notice type:0x%02X num:%u Producer:%u (%s) "
 					"from LID:0x%04X TID:0x%016" PRIx64
 					"\n", ib_notice_get_type(p_ntci),
@@ -367,8 +360,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 					cl_ntoh64(p_smp->trans_id)
 				    );
 		} else
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_trap_rcv_process_request: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR,
 				"Received Vendor Notice type:0x%02X vend:0x%06X dev:%u "
 				"from LID:0x%04X TID:0x%016" PRIx64 "\n",
 				ib_notice_get_type(p_ntci),
@@ -386,14 +378,12 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 	if (p_physp)
 		p_smp->m_key = p_physp->port_info.m_key;
 	else
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_trap_rcv_process_request: ERR 3809: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3809: "
 			"Failed to find source physical port for trap\n");
 
 	status = osm_resp_send(sm, &tmp_madw, 0, payload);
 	if (status != IB_SUCCESS) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_trap_rcv_process_request: ERR 3802: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3802: "
 			"Error sending response (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -437,8 +427,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 		/* Now we know how many times it provided this trap */
 		if (num_received > 10) {
 			if (__print_num_received(num_received))
-				osm_log(sm->p_log, OSM_LOG_ERROR,
-					"__osm_trap_rcv_process_request: ERR 3804: "
+				OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3804: "
 					"Received trap %u times consecutively\n",
 					num_received);
 			/*
@@ -456,8 +445,8 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 								   port_num);
 
 				if (!p_physp)
-					osm_log(sm->p_log, OSM_LOG_ERROR,
-						"__osm_trap_rcv_process_request: ERR 3805: "
+					OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+						"ERR 3805: "
 						"Failed to find physical port by lid:0x%02X num:%u\n",
 						cl_ntoh16(p_ntci->data_details.
 							  ntc_129_131.lid),
@@ -479,10 +468,9 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 						/* If trap 131, might want to disable peer port if available */
 						/* but peer port has been observed not to respond to SM requests */
 
-						osm_log(sm->p_log,
-							OSM_LOG_ERROR,
-							"__osm_trap_rcv_process_request: ERR 3810: "
-							" Disabling physical port lid:0x%02X num:%u\n",
+						OSM_LOG(sm->p_log, OSM_LOG_ERROR,
+							"ERR 3810: "
+							"Disabling physical port lid:0x%02X num:%u\n",
 							cl_ntoh16(p_ntci->
 								  data_details.
 								  ntc_129_131.
@@ -535,14 +523,12 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 						if (status == IB_SUCCESS)
 							goto Exit;
 
-						osm_log(sm->p_log,
-							OSM_LOG_ERROR,
-							"__osm_trap_rcv_process_request: ERR 3811: "
+						OSM_LOG(sm->p_log,
+							OSM_LOG_ERROR, "ERR 3811: "
 							"Request to set PortInfo failed\n");
 					}
 
-					osm_log(sm->p_log, OSM_LOG_VERBOSE,
-						"__osm_trap_rcv_process_request: "
+					OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 						"Marking unhealthy physical port by lid:0x%02X num:%u\n",
 						cl_ntoh16(p_ntci->data_details.
 							  ntc_129_131.lid),
@@ -584,8 +570,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 		/* If was already registered do nothing more */
 		if (num_received > 10 && run_heavy_sweep == FALSE) {
 			if (__print_num_received(num_received))
-				osm_log(sm->p_log, OSM_LOG_VERBOSE,
-					"__osm_trap_rcv_process_request: "
+				OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 					"Continuously received this trap %u times. Ignoring\n",
 					num_received);
 			goto Exit;
@@ -605,10 +590,8 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 		     (cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 144) ||
 		     (cl_ntoh16(p_ntci->g_or_v.generic.trap_num) == 145) ||
 		     run_heavy_sweep)) {
-			osm_log(sm->p_log, OSM_LOG_VERBOSE,
-				"__osm_trap_rcv_process_request: "
-				"Forcing heavy sweep. "
-				"Received trap:%u\n",
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
+				"Forcing heavy sweep. Received trap:%u\n",
 				cl_ntoh16(p_ntci->g_or_v.generic.trap_num));
 
 			sm->p_subn->force_heavy_sweep = TRUE;
@@ -627,8 +610,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 	   accordingly. See IBA 1.2 p.739 or IBA 1.1 p.653 for details. */
 	if (is_gsi) {
 		if (!tmp_madw.mad_addr.addr_type.gsi.global_route) {
-			osm_log(sm->p_log, OSM_LOG_ERROR,
-				"__osm_trap_rcv_process_request: ERR 3806: "
+			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3806: "
 				"Received gsi trap with global_route FALSE. "
 				"Cannot update issuer_gid!\n");
 			goto Exit;
@@ -645,8 +627,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 		if ((uint16_t) cl_ptr_vector_get_size(p_tbl) <=
 		    cl_ntoh16(source_lid)) {
 			/*  the source lid is out of range */
-			osm_log(sm->p_log, OSM_LOG_VERBOSE,
-				"__osm_trap_rcv_process_request: "
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 				"source lid is out of range:0x%X\n",
 				cl_ntoh16(source_lid));
 
@@ -655,8 +636,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 		p_port = cl_ptr_vector_get(p_tbl, cl_ntoh16(source_lid));
 		if (p_port == 0) {
 			/* We have the lid - but no corresponding port */
-			osm_log(sm->p_log, OSM_LOG_VERBOSE,
-				"__osm_trap_rcv_process_request: "
+			OSM_LOG(sm->p_log, OSM_LOG_VERBOSE,
 				"Cannot find port corresponding to lid:0x%X\n",
 				cl_ntoh16(source_lid));
 
@@ -673,8 +653,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
 	status = osm_report_notice(sm->p_log, sm->p_subn, p_ntci);
 	CL_PLOCK_RELEASE(sm->p_lock);
 	if (status != IB_SUCCESS) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"__osm_trap_rcv_process_request: ERR 3803: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3803: "
 			"Error sending trap reports (%s)\n",
 			ib_get_err_str(status));
 		goto Exit;
@@ -696,8 +675,7 @@ __osm_trap_rcv_process_sm(IN osm_sm_t * sm,
 
 	OSM_LOG_ENTER(sm->p_log);
 
-	osm_log(sm->p_log, OSM_LOG_ERROR,
-		"__osm_trap_rcv_process_sm: ERR 3807: "
+	OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3807: "
 		"This function is not supported yet\n");
 
 	OSM_LOG_EXIT(sm->p_log);
@@ -714,7 +692,7 @@ __osm_trap_rcv_process_response(IN osm_sm_t * sm,
 
 	OSM_LOG_ENTER(sm->p_log);
 
-	osm_log(sm->p_log, OSM_LOG_ERROR,
+	OSM_LOG(sm->p_log, OSM_LOG_ERROR,
 		"__osm_trap_rcv_process_response: ERR 3808: "
 		"This function is not supported yet\n");
 
diff --git a/opensm/opensm/osm_ucast_file.c b/opensm/opensm/osm_ucast_file.c
index ed3ca10..3b0349d 100644
--- a/opensm/opensm/osm_ucast_file.c
+++ b/opensm/opensm/osm_ucast_file.c
@@ -64,8 +64,8 @@ static uint16_t remap_lid(osm_opensm_t * p_osm, uint16_t lid, ib_net64_t guid)
 
 	p_port = osm_get_port_by_guid(&p_osm->subn, guid);
 	if (!p_port) {
-		osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-			"remap_lid: cannot find port guid 0x%016" PRIx64
+		OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
+			"cannot find port guid 0x%016" PRIx64
 			" , will use the same lid\n", cl_ntoh64(guid));
 		return lid;
 	}
@@ -88,8 +88,8 @@ static void add_path(osm_opensm_t * p_osm,
 	new_lid = port_guid ? remap_lid(p_osm, lid, port_guid) : lid;
 	old_port = osm_fwd_tbl_get(osm_switch_get_fwd_tbl_ptr(p_sw), new_lid);
 	if (old_port != OSM_NO_PATH && old_port != port_num) {
-		osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-			"add_path: LID collision is detected on switch "
+		OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
+			"LID collision is detected on switch "
 			"0x016%" PRIx64 ", will overwrite LID 0x%x entry\n",
 			cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)),
 			new_lid);
@@ -100,8 +100,8 @@ static void add_path(osm_opensm_t * p_osm,
 	      osm_get_switch_by_guid(&p_osm->subn, port_guid)))
 		osm_switch_count_path(p_sw, port_num);
 
-	osm_log(&p_osm->log, OSM_LOG_DEBUG,
-		"add_path: route 0x%04x(was 0x%04x) %u 0x%016" PRIx64
+	OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
+		"route 0x%04x(was 0x%04x) %u 0x%016" PRIx64
 		" is added to switch 0x%016" PRIx64 "\n",
 		new_lid, lid, port_num, cl_ntoh64(port_guid),
 		cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)));
@@ -136,7 +136,7 @@ static int do_ucast_file_load(void *context)
 
 	file_name = p_osm->subn.opt.ucast_dump_file;
 	if (!file_name) {
-		osm_log(&p_osm->log, OSM_LOG_VERBOSE, "do_ucast_file_load: "
+		OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
 			"ucast dump file name is not given; "
 			"using default routing algorithm\n");
 		return -1;
@@ -144,8 +144,7 @@ static int do_ucast_file_load(void *context)
 
 	file = fopen(file_name, "r");
 	if (!file) {
-		osm_log(&p_osm->log, OSM_LOG_ERROR | OSM_LOG_SYS,
-			"do_ucast_file_load: ERR 6302: "
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR | OSM_LOG_SYS, "ERR 6302: "
 			"cannot open ucast dump file \'%s\'; "
 			"using default routing algorithm\n", file_name);
 		return -1;
@@ -166,8 +165,8 @@ static int do_ucast_file_load(void *context)
 			continue;
 
 		if (!strncmp(p, "Multicast mlids", 15)) {
-			osm_log(&p_osm->log, OSM_LOG_ERROR | OSM_LOG_SYS,
-				"do_ucast_file_load: ERR 6303: "
+			OSM_LOG(&p_osm->log, OSM_LOG_ERROR | OSM_LOG_SYS,
+				"ERR 6303: "
 				"Multicast dump file detected; "
 				"skipping parsing. Using default "
 				"routing algorithm\n");
@@ -177,7 +176,7 @@ static int do_ucast_file_load(void *context)
 							    ucast_mgr, p_sw);
 			q = strstr(p, " guid 0x");
 			if (!q) {
-				osm_log(&p_osm->log, OSM_LOG_ERROR,
+				OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
 					"PARSE ERROR: %s:%u: "
 					"cannot parse switch definition\n",
 					file_name, lineno);
@@ -186,7 +185,7 @@ static int do_ucast_file_load(void *context)
 			p = q + 8;
 			sw_guid = strtoull(p, &q, 16);
 			if (q == p || !isspace(*q)) {
-				osm_log(&p_osm->log, OSM_LOG_ERROR,
+				OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
 					"PARSE ERROR: %s:%u: "
 					"cannot parse switch guid: \'%s\'\n",
 					file_name, lineno, p);
@@ -196,8 +195,7 @@ static int do_ucast_file_load(void *context)
 
 			p_sw = osm_get_switch_by_guid(&p_osm->subn, sw_guid);
 			if (!p_sw) {
-				osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-					"do_ucast_file_load: "
+				OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
 					"cannot find switch %016" PRIx64 "\n",
 					cl_ntoh64(sw_guid));
 				continue;
@@ -208,7 +206,7 @@ static int do_ucast_file_load(void *context)
 			p += 2;
 			lid = (uint16_t) strtoul(p, &q, 16);
 			if (q == p || !isspace(*q)) {
-				osm_log(&p_osm->log, OSM_LOG_ERROR,
+				OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
 					"PARSE ERROR: %s:%u: "
 					"cannot parse lid: \'%s\'\n",
 					file_name, lineno, p);
@@ -219,7 +217,7 @@ static int do_ucast_file_load(void *context)
 				p++;
 			port_num = (uint8_t) strtoul(p, &q, 10);
 			if (q == p || !isspace(*q)) {
-				osm_log(&p_osm->log, OSM_LOG_ERROR,
+				OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
 					"PARSE ERROR: %s:%u: "
 					"cannot parse port: \'%s\'\n",
 					file_name, lineno, p);
@@ -229,7 +227,7 @@ static int do_ucast_file_load(void *context)
 			/* additionally try to exract guid */
 			q = strstr(p, " portguid 0x");
 			if (!q) {
-				osm_log(&p_osm->log, OSM_LOG_VERBOSE,
+				OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
 					"PARSE WARNING: %s:%u: "
 					"cannot find port guid "
 					"(maybe broken dump): \'%s\'\n",
@@ -239,7 +237,7 @@ static int do_ucast_file_load(void *context)
 				p = q + 12;
 				port_guid = strtoull(p, &q, 16);
 				if (q == p || (!isspace(*q) && *q != ':')) {
-					osm_log(&p_osm->log, OSM_LOG_VERBOSE,
+					OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
 						"PARSE WARNING: %s:%u: "
 						"cannot parse port guid "
 						"(maybe broken dump): \'%s\'\n",
@@ -273,8 +271,7 @@ static int do_lid_matrix_file_load(void *context)
 
 	file_name = p_osm->subn.opt.lid_matrix_dump_file;
 	if (!file_name) {
-		osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-			"do_lid_matrix_file_load: "
+		OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
 			"lid matrix file name is not given; "
 			"using default lid matrix generation algorithm\n");
 		return -1;
@@ -282,8 +279,7 @@ static int do_lid_matrix_file_load(void *context)
 
 	file = fopen(file_name, "r");
 	if (!file) {
-		osm_log(&p_osm->log, OSM_LOG_ERROR | OSM_LOG_SYS,
-			"do_lid_matrix_file_load: ERR 6305: "
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR | OSM_LOG_SYS, "ERR 6305: "
 			"cannot open lid matrix file \'%s\'; "
 			"using default lid matrix generation algorithm\n",
 			file_name);
@@ -307,7 +303,7 @@ static int do_lid_matrix_file_load(void *context)
 		if (!strncmp(p, "Switch", 6)) {
 			q = strstr(p, " guid 0x");
 			if (!q) {
-				osm_log(&p_osm->log, OSM_LOG_ERROR,
+				OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
 					"PARSE ERROR: %s:%u: "
 					"cannot parse switch definition\n",
 					file_name, lineno);
@@ -316,7 +312,7 @@ static int do_lid_matrix_file_load(void *context)
 			p = q + 8;
 			guid = strtoull(p, &q, 16);
 			if (q == p || !isspace(*q)) {
-				osm_log(&p_osm->log, OSM_LOG_ERROR,
+				OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
 					"PARSE ERROR: %s:%u: "
 					"cannot parse switch guid: \'%s\'\n",
 					file_name, lineno, p);
@@ -326,8 +322,7 @@ static int do_lid_matrix_file_load(void *context)
 
 			p_sw = osm_get_switch_by_guid(&p_osm->subn, guid);
 			if (!p_sw) {
-				osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-					"do_lid_matrix_file_load: "
+				OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
 					"cannot find switch %016" PRIx64 "\n",
 					cl_ntoh64(guid));
 				continue;
@@ -342,7 +337,7 @@ static int do_lid_matrix_file_load(void *context)
 			num = strtoul(p, &q, 16);
 			if (num > 0xffff || q == p ||
 			    (*q != ':' && !isspace(*q))) {
-				osm_log(&p_osm->log, OSM_LOG_ERROR,
+				OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
 					"PARSE ERROR: %s:%u: "
 					"cannot parse lid: \'%s\'\n",
 					file_name, lineno, p);
@@ -356,7 +351,7 @@ static int do_lid_matrix_file_load(void *context)
 			while (len < 256 && *p && *p != '#') {
 				num = strtoul(p, &q, 16);
 				if (num > 0xff || q == p) {
-					osm_log(&p_osm->log, OSM_LOG_ERROR,
+					OSM_LOG(&p_osm->log, OSM_LOG_ERROR,
 						"PARSE ERROR: %s:%u: "
 						"cannot parse hops number: \'%s\'\n",
 						file_name, lineno, p);
@@ -371,7 +366,7 @@ static int do_lid_matrix_file_load(void *context)
 			/* additionally try to extract guid */
 			q = strstr(p, " portguid 0x");
 			if (!q) {
-				osm_log(&p_osm->log, OSM_LOG_VERBOSE,
+				OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
 					"PARSE WARNING: %s:%u: "
 					"cannot find port guid "
 					"(maybe broken dump): \'%s\'\n",
@@ -381,7 +376,7 @@ static int do_lid_matrix_file_load(void *context)
 				p = q + 12;
 				guid = strtoull(p, &q, 16);
 				if (q == p || !isspace(*q)) {
-					osm_log(&p_osm->log, OSM_LOG_VERBOSE,
+					OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
 						"PARSE WARNING: %s:%u: "
 						"cannot parse port guid "
 						"(maybe broken dump): \'%s\'\n",
diff --git a/opensm/opensm/osm_ucast_ftree.c b/opensm/opensm/osm_ucast_ftree.c
index 3641f94..c3759ca 100644
--- a/opensm/opensm/osm_ucast_ftree.c
+++ b/opensm/opensm/osm_ucast_ftree.c
@@ -546,8 +546,7 @@ __osm_ftree_port_group_dump(IN ftree_fabric_t * p_ftree,
 		sprintf(buff + strlen(buff), "%u", p_port->port_num);
 	}
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-		"__osm_ftree_port_group_dump:"
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 		"    Port Group of size %u, port(s): %s, direction: %s\n"
 		"                  Local <--> Remote GUID (LID):"
 		"0x%016" PRIx64 " (0x%04x) <--> 0x%016" PRIx64 " (0x%04x)\n",
@@ -684,8 +683,7 @@ static void __osm_ftree_sw_dump(IN ftree_fabric_t * p_ftree,
 	if (!osm_log_is_active(&p_ftree->p_osm->log, OSM_LOG_DEBUG))
 		return;
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-		"__osm_ftree_sw_dump: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 		"Switch index: %s, GUID: 0x%016" PRIx64
 		", Ports: %u DOWN, %u UP\n",
 		__osm_ftree_tuple_to_str(p_sw->tuple),
@@ -877,8 +875,7 @@ static void __osm_ftree_hca_dump(IN ftree_fabric_t * p_ftree,
 	if (!osm_log_is_active(&p_ftree->p_osm->log, OSM_LOG_DEBUG))
 		return;
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-		"__osm_ftree_hca_dump: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 		"CA GUID: 0x%016" PRIx64 ", Ports: %u UP\n",
 		__osm_ftree_hca_get_guid_ho(p_hca), p_hca->up_port_groups_num);
 
@@ -1189,14 +1186,12 @@ static void __osm_ftree_fabric_dump(ftree_fabric_t * p_ftree)
 	if (!osm_log_is_active(&p_ftree->p_osm->log, OSM_LOG_DEBUG))
 		return;
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-		"__osm_ftree_fabric_dump: \n"
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG, "\n"
 		"                       |-------------------------------|\n"
 		"                       |-  Full fabric topology dump  -|\n"
 		"                       |-------------------------------|\n\n");
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-		"__osm_ftree_fabric_dump: -- CAs:\n");
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG, "-- CAs:\n");
 
 	for (p_hca = (ftree_hca_t *) cl_qmap_head(&p_ftree->hca_tbl);
 	     p_hca != (ftree_hca_t *) cl_qmap_end(&p_ftree->hca_tbl);
@@ -1205,8 +1200,8 @@ static void __osm_ftree_fabric_dump(ftree_fabric_t * p_ftree)
 	}
 
 	for (i = 0; i < p_ftree->max_switch_rank; i++) {
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-			"__osm_ftree_fabric_dump: -- Rank %u switches\n", i);
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
+			"-- Rank %u switches\n", i);
 		for (p_sw = (ftree_sw_t *) cl_qmap_head(&p_ftree->sw_tbl);
 		     p_sw != (ftree_sw_t *) cl_qmap_end(&p_ftree->sw_tbl);
 		     p_sw = (ftree_sw_t *) cl_qmap_next(&p_sw->map_item)) {
@@ -1215,8 +1210,7 @@ static void __osm_ftree_fabric_dump(ftree_fabric_t * p_ftree)
 		}
 	}
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-		"__osm_ftree_fabric_dump: \n"
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG, "\n"
 		"                       |---------------------------------------|\n"
 		"                       |- Full fabric topology dump completed -|\n"
 		"                       |---------------------------------------|\n\n");
@@ -1229,22 +1223,17 @@ static void __osm_ftree_fabric_dump_general_info(IN ftree_fabric_t * p_ftree)
 	uint32_t i, j;
 	ftree_sw_t *p_sw;
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_INFO,
-		"__osm_ftree_fabric_dump_general_info: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_INFO,
 		"General fabric topology info\n");
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_INFO,
-		"__osm_ftree_fabric_dump_general_info: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_INFO,
 		"============================\n");
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_INFO,
-		"__osm_ftree_fabric_dump_general_info: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_INFO,
 		"  - FatTree rank (roots to leaf switches): %u\n",
 		p_ftree->leaf_switch_rank + 1);
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_INFO,
-		"__osm_ftree_fabric_dump_general_info: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_INFO,
 		"  - FatTree max switch rank: %u\n", p_ftree->max_switch_rank);
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_INFO,
-		"__osm_ftree_fabric_dump_general_info: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_INFO,
 		"  - Fabric has %u CAs (%u of them CNs), %u switches\n",
 		cl_qmap_count(&p_ftree->hca_tbl), p_ftree->cn_num,
 		cl_qmap_count(&p_ftree->sw_tbl));
@@ -1260,32 +1249,27 @@ static void __osm_ftree_fabric_dump_general_info(IN ftree_fabric_t * p_ftree)
 				j++;
 		}
 		if (i == 0)
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_INFO,
-				"__osm_ftree_fabric_dump_general_info: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_INFO,
 				"  - Fabric has %u switches at rank %u (roots)\n",
 				j, i);
 		else if (i == p_ftree->leaf_switch_rank)
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_INFO,
-				"__osm_ftree_fabric_dump_general_info: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_INFO,
 				"  - Fabric has %u switches at rank %u (%u of them leafs)\n",
 				j, i, p_ftree->leaf_switches_num);
 		else
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_INFO,
-				"__osm_ftree_fabric_dump_general_info: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_INFO,
 				"  - Fabric has %u switches at rank %u\n", j,
 				i);
 	}
 
 	if (osm_log_is_active(&p_ftree->p_osm->log, OSM_LOG_VERBOSE)) {
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-			"__osm_ftree_fabric_dump_general_info: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 			"  - Root switches:\n");
 		for (p_sw = (ftree_sw_t *) cl_qmap_head(&p_ftree->sw_tbl);
 		     p_sw != (ftree_sw_t *) cl_qmap_end(&p_ftree->sw_tbl);
 		     p_sw = (ftree_sw_t *) cl_qmap_next(&p_sw->map_item)) {
 			if (p_sw->rank == 0)
-				osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-					"__osm_ftree_fabric_dump_general_info: "
+				OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 					"      GUID: 0x%016" PRIx64
 					", LID: 0x%04x, Index %s\n",
 					__osm_ftree_sw_get_guid_ho(p_sw),
@@ -1293,12 +1277,10 @@ static void __osm_ftree_fabric_dump_general_info(IN ftree_fabric_t * p_ftree)
 					__osm_ftree_tuple_to_str(p_sw->tuple));
 		}
 
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-			"__osm_ftree_fabric_dump_general_info: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 			"  - Leaf switches (sorted by index):\n");
 		for (i = 0; i < p_ftree->leaf_switches_num; i++) {
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-				"__osm_ftree_fabric_dump_general_info: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 				"      GUID: 0x%016" PRIx64
 				", LID: 0x%04x, Index %s\n",
 				__osm_ftree_sw_get_guid_ho(p_ftree->
@@ -1331,8 +1313,7 @@ static void __osm_ftree_fabric_dump_hca_ordering(IN ftree_fabric_t * p_ftree)
 		 p_ftree->p_osm->subn.opt.dump_files_dir, filename);
 	p_hca_ordering_file = fopen(path, "w");
 	if (!p_hca_ordering_file) {
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-			"__osm_ftree_fabric_dump_hca_ordering: ERR AB01: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB01: "
 			"cannot open file \'%s\': %s\n", filename,
 			strerror(errno));
 		OSM_LOG_EXIT(&p_ftree->p_osm->log);
@@ -1473,8 +1454,7 @@ static int __osm_ftree_fabric_mark_leaf_switches(IN ftree_fabric_t * p_ftree)
 
 	OSM_LOG_ENTER(&p_ftree->p_osm->log);
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_fabric_mark_leaf_switches: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Marking leaf switches in fabric\n");
 
 	/* Scan all the CAs, if they have CNs - find CN port and mark switch
@@ -1504,9 +1484,8 @@ static int __osm_ftree_fabric_mark_leaf_switches(IN ftree_fabric_t * p_ftree)
 
 			/* ensure that this leaf switch is at the correct tree level */
 			if (p_sw->rank != p_ftree->leaf_switch_rank) {
-				osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-					"__osm_ftree_fabric_mark_leaf_switches: ERR AB26: "
-					"CN port 0x%" PRIx64
+				OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR,
+					"ERR AB26: CN port 0x%" PRIx64
 					" is connected to switch 0x%" PRIx64
 					" with rank %u, "
 					"while FatTree leaf rank is %u\n",
@@ -1540,8 +1519,7 @@ static void __osm_ftree_fabric_make_indexing(IN ftree_fabric_t * p_ftree)
 
 	OSM_LOG_ENTER(&p_ftree->p_osm->log);
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_fabric_make_indexing: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Starting FatTree indexing\n");
 
 	/* using the first leaf switch as a starting point for indexing algorithm. */
@@ -1560,8 +1538,8 @@ static void __osm_ftree_fabric_make_indexing(IN ftree_fabric_t * p_ftree)
 	   This fuction also adds the switch it into the switch_by_tuple table. */
 	__osm_ftree_fabric_assign_first_tuple(p_ftree, p_sw);
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_fabric_make_indexing: Indexing starting point:\n"
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
+		"Indexing starting point:\n"
 		"                                            - Switch rank  : %u\n"
 		"                                            - Switch index : %s\n"
 		"                                            - Node LID     : 0x%04x\n"
@@ -1719,8 +1697,7 @@ static int __osm_ftree_fabric_create_leaf_switch_array(IN ftree_fabric_t *
 		p_sw = p_next_sw;
 		p_next_sw = (ftree_sw_t *) cl_qmap_next(&p_sw->map_item);
 		if (p_sw->rank == p_ftree->leaf_switch_rank) {
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_create_leaf_switch_array: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				"Adding switch 0x%" PRIx64
 				" to full leaf switch array\n",
 				__osm_ftree_sw_get_guid_ho(p_sw));
@@ -1749,8 +1726,7 @@ static int __osm_ftree_fabric_create_leaf_switch_array(IN ftree_fabric_t *
 	}
 	CL_ASSERT(first_leaf_idx < last_leaf_idx);
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-		"__osm_ftree_fabric_create_leaf_switch_array: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 		"Full leaf array info: first_leaf_idx = %u, last_leaf_idx = %u\n",
 		first_leaf_idx, last_leaf_idx);
 
@@ -1773,8 +1749,7 @@ static int __osm_ftree_fabric_create_leaf_switch_array(IN ftree_fabric_t *
 
 	free(all_switches_at_leaf_level);
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-		"__osm_ftree_fabric_create_leaf_switch_array: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 		"Created array of %u leaf switches\n",
 		p_ftree->leaf_switches_num);
 
@@ -1824,8 +1799,7 @@ static boolean_t __osm_ftree_fabric_validate_topology(IN ftree_fabric_t *
 
 	OSM_LOG_ENTER(&p_ftree->p_osm->log);
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_fabric_validate_topology: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Validating fabric topology\n");
 
 	reference_sw_arr =
@@ -1851,8 +1825,7 @@ static boolean_t __osm_ftree_fabric_validate_topology(IN ftree_fabric_t *
 
 			if (reference_sw_arr[p_sw->rank]->up_port_groups_num !=
 			    p_sw->up_port_groups_num) {
-				osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-					"__osm_ftree_fabric_validate_topology: "
+				OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR,
 					"ERR AB09: Different number of upward port groups on switches:\n"
 					"       GUID 0x%016" PRIx64
 					", LID 0x%04x, Index %s - %u groups\n"
@@ -1879,8 +1852,7 @@ static boolean_t __osm_ftree_fabric_validate_topology(IN ftree_fabric_t *
 			    down_port_groups_num !=
 			    p_sw->down_port_groups_num) {
 				/* we're allowing some hca's to be missing */
-				osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-					"__osm_ftree_fabric_validate_topology: "
+				OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR,
 					"ERR AB0A: Different number of downward port groups on switches:\n"
 					"       GUID 0x%016" PRIx64
 					", LID 0x%04x, Index %s - %u port groups\n"
@@ -1913,9 +1885,8 @@ static boolean_t __osm_ftree_fabric_validate_topology(IN ftree_fabric_t *
 					    (&p_ref_group->ports) !=
 					    cl_ptr_vector_get_size(&p_group->
 								   ports)) {
-						osm_log(&p_ftree->p_osm->log,
+						OSM_LOG(&p_ftree->p_osm->log,
 							OSM_LOG_ERROR,
-							"__osm_ftree_fabric_validate_topology: "
 							"ERR AB0B: Different number of ports in an upward port group on switches:\n"
 							"       GUID 0x%016"
 							PRIx64
@@ -1961,9 +1932,8 @@ static boolean_t __osm_ftree_fabric_validate_topology(IN ftree_fabric_t *
 					    (&p_ref_group->ports) !=
 					    cl_ptr_vector_get_size(&p_group->
 								   ports)) {
-						osm_log(&p_ftree->p_osm->log,
+						OSM_LOG(&p_ftree->p_osm->log,
 							OSM_LOG_ERROR,
-							"__osm_ftree_fabric_validate_topology: "
 							"ERR AB0C: Different number of ports in an downward port group on switches:\n"
 							"       GUID 0x%016"
 							PRIx64
@@ -2000,12 +1970,10 @@ static boolean_t __osm_ftree_fabric_validate_topology(IN ftree_fabric_t *
 	}			/* end of while */
 
 	if (res == TRUE)
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-			"__osm_ftree_fabric_validate_topology: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 			"Fabric topology has been identified as FatTree\n");
 	else
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-			"__osm_ftree_fabric_validate_topology: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR,
 			"ERR AB0D: Fabric topology hasn't been identified as FatTree\n");
 
 	free(reference_sw_arr);
@@ -2125,8 +2093,7 @@ __osm_ftree_fabric_route_upgoing_by_going_down(IN ftree_fabric_t * p_ftree,
 		    OSM_NO_PATH) {
 			/* Loop in the fabric - we already routed the remote switch
 			   on our way UP, and now we see it again on our way DOWN */
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_route_upgoing_by_going_down: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				"Loop of lenght %d in the fabric:\n                             "
 				"Switch %s (LID 0x%04x) closes loop through switch %s (LID 0x%04x)\n",
 				(p_remote_sw->rank - highest_rank_in_route) * 2,
@@ -2179,8 +2146,7 @@ __osm_ftree_fabric_route_upgoing_by_going_down(IN ftree_fabric_t * p_ftree,
 							   (target_lid),
 							   p_min_port->
 							   remote_port_num);
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_route_upgoing_by_going_down: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				"Switch %s: set path to CA LID 0x%04x through port %u\n",
 				__osm_ftree_tuple_to_str(p_remote_sw->tuple),
 				cl_ntoh16(target_lid),
@@ -2343,8 +2309,7 @@ __osm_ftree_fabric_route_downgoing_by_going_up(IN ftree_fabric_t * p_ftree,
 	/* covering first half of case 1, and case 3 */
 	if (is_main_path) {
 		if (p_sw->is_leaf) {
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_route_downgoing_by_going_up: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				" - Routing MAIN path for %s CA LID 0x%04x: %s --> %s\n",
 				(is_real_lid) ? "real" : "DUMMY",
 				cl_ntoh16(target_lid),
@@ -2363,8 +2328,7 @@ __osm_ftree_fabric_route_downgoing_by_going_up(IN ftree_fabric_t * p_ftree,
 							   (target_lid),
 							   p_min_port->
 							   remote_port_num);
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_route_downgoing_by_going_up: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				"Switch %s: set path to CA LID 0x%04x through port %u\n",
 				__osm_ftree_tuple_to_str(p_remote_sw->tuple),
 				cl_ntoh16(target_lid),
@@ -2443,8 +2407,7 @@ __osm_ftree_fabric_route_downgoing_by_going_up(IN ftree_fabric_t * p_ftree,
 			continue;
 
 		if (p_sw->is_leaf) {
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_route_downgoing_by_going_up: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				" - Routing SECONDARY path for LID 0x%04x: %s --> %s\n",
 				cl_ntoh16(target_lid),
 				__osm_ftree_tuple_to_str(p_sw->tuple),
@@ -2554,8 +2517,7 @@ static void __osm_ftree_fabric_route_to_cns(IN ftree_fabric_t * p_ftree)
 			__osm_ftree_sw_set_fwd_table_block(p_sw,
 							   cl_ntoh16(hca_lid),
 							   p_port->port_num);
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_route_to_cns: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				"Switch %s: set path to CN LID 0x%04x through port %u\n",
 				__osm_ftree_tuple_to_str(p_sw->tuple),
 				cl_ntoh16(hca_lid), p_port->port_num);
@@ -2584,8 +2546,7 @@ static void __osm_ftree_fabric_route_to_cns(IN ftree_fabric_t * p_ftree)
 		   When routing to dummy HCAs we don't fill lid matrices. */
 
 		if (p_ftree->max_cn_per_leaf > routed_targets_on_leaf) {
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_route_to_cns: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				"Routing %u dummy CAs\n",
 				p_ftree->max_cn_per_leaf -
 				p_sw->down_port_groups_num);
@@ -2667,8 +2628,7 @@ static void __osm_ftree_fabric_route_to_non_cns(IN ftree_fabric_t * p_ftree)
 							   cl_ntoh16(hca_lid),
 							   port_num_on_switch);
 
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_route_to_non_cns: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				"Switch %s: set path to non-CN HCA LID 0x%04x through port %u\n",
 				__osm_ftree_tuple_to_str(p_sw->tuple),
 				cl_ntoh16(hca_lid), port_num_on_switch);
@@ -2726,8 +2686,7 @@ static void __osm_ftree_fabric_route_to_switches(IN ftree_fabric_t * p_ftree)
 						   cl_ntoh16(p_sw->base_lid),
 						   0);
 
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-			"__osm_ftree_fabric_route_to_switches: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 			"Switch %s (LID 0x%04x): routing switch-to-switch pathes\n",
 			__osm_ftree_tuple_to_str(p_sw->tuple),
 			cl_ntoh16(p_sw->base_lid));
@@ -2776,8 +2735,7 @@ static int __osm_ftree_fabric_populate_nodes(IN ftree_fabric_t * p_ftree)
 			__osm_ftree_fabric_add_sw(p_ftree, p_osm_node->sw);
 			break;
 		default:
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-				"__osm_ftree_fabric_populate_nodes: ERR AB0E: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB0E: "
 				"Node GUID 0x%016" PRIx64
 				" - Unknown node type: %s\n",
 				cl_ntoh64(osm_node_get_node_guid(p_osm_node)),
@@ -2889,8 +2847,7 @@ __osm_ftree_rank_leaf_switches(IN ftree_fabric_t * p_ftree,
 		switch (osm_node_get_type(p_remote_osm_node)) {
 		case IB_NODE_TYPE_CA:
 			/* HCA connected directly to another HCA - not FatTree */
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-				"__osm_ftree_rank_leaf_switches: ERR AB0F: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB0F: "
 				"CA conected directly to another CA: "
 				"0x%016" PRIx64 " <---> 0x%016" PRIx64 "\n",
 				__osm_ftree_hca_get_guid_ho(p_hca),
@@ -2908,9 +2865,8 @@ __osm_ftree_rank_leaf_switches(IN ftree_fabric_t * p_ftree,
 			break;
 
 		default:
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-				"__osm_ftree_rank_leaf_switches: ERR AB10: "
-				"Node GUID 0x%016" PRIx64
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR,
+				"ERR AB10: Node GUID 0x%016" PRIx64
 				" - Unknown node type: %s\n",
 				cl_ntoh64(osm_node_get_node_guid
 					  (p_remote_osm_node)),
@@ -2933,8 +2889,7 @@ __osm_ftree_rank_leaf_switches(IN ftree_fabric_t * p_ftree,
 
 		if (!__osm_ftree_sw_update_rank(p_sw, 0))
 			continue;
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-			"__osm_ftree_rank_leaf_switches: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 			"Marking rank of switch that is directly connected to CA:\n"
 			"                                            - CA guid    : 0x%016"
 			PRIx64 "\n"
@@ -3002,8 +2957,7 @@ __osm_ftree_fabric_construct_hca_ports(IN ftree_fabric_t * p_ftree,
 
 		case IB_NODE_TYPE_CA:
 			/* HCA connected directly to another HCA - not FatTree */
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-				"__osm_ftree_fabric_construct_hca_ports: ERR AB11: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB11: "
 				"CA conected directly to another CA: "
 				"0x%016" PRIx64 " <---> 0x%016" PRIx64 "\n",
 				cl_ntoh64(osm_node_get_node_guid(p_node)),
@@ -3016,9 +2970,8 @@ __osm_ftree_fabric_construct_hca_ports(IN ftree_fabric_t * p_ftree,
 			break;
 
 		default:
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-				"__osm_ftree_fabric_construct_hca_ports: ERR AB12: "
-				"Node GUID 0x%016" PRIx64
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR,
+				"ERR AB12: Node GUID 0x%016" PRIx64
 				" - Unknown node type: %s\n",
 				cl_ntoh64(remote_node_guid),
 				ib_get_node_type_str(remote_node_type));
@@ -3053,13 +3006,11 @@ __osm_ftree_fabric_construct_hca_ports(IN ftree_fabric_t * p_ftree,
 		if (is_cn) {
 			p_ftree->cn_num++;
 			p_hca->cn_num++;
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_construct_hca_ports: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				"Marking CN port GUID 0x%016" PRIx64 "\n",
 				cl_ntoh64(osm_physp_get_port_guid(p_osm_port)));
 		} else {
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_construct_hca_ports: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				"Marking non-CN port GUID 0x%016" PRIx64 "\n",
 				cl_ntoh64(osm_physp_get_port_guid(p_osm_port)));
 		}
@@ -3117,8 +3068,7 @@ static int __osm_ftree_fabric_construct_sw_ports(IN ftree_fabric_t * p_ftree,
 
 		/* ignore any loopback connection on switch */
 		if (p_node == p_remote_node) {
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_ftree_fabric_construct_sw_ports: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 				"Ignoring loopback on switch GUID 0x%016" PRIx64
 				", LID 0x%04x, rank %u\n",
 				__osm_ftree_sw_get_guid_ho(p_sw),
@@ -3161,8 +3111,8 @@ static int __osm_ftree_fabric_construct_sw_ports(IN ftree_fabric_t * p_ftree,
 			p_remote_hca_or_sw = (void *)p_remote_sw;
 
 			if (abs(p_sw->rank - p_remote_sw->rank) != 1) {
-				osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-					"__osm_ftree_fabric_construct_sw_ports: ERR AB16: "
+				OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR,
+					"ERR AB16: "
 					"Illegal link between switches with ranks %u and %u:\n"
 					"       GUID 0x%016" PRIx64
 					", LID 0x%04x, rank %u\n"
@@ -3190,9 +3140,8 @@ static int __osm_ftree_fabric_construct_sw_ports(IN ftree_fabric_t * p_ftree,
 			break;
 
 		default:
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-				"__osm_ftree_fabric_construct_sw_ports: ERR AB13: "
-				"Node GUID 0x%016" PRIx64
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR,
+				"ERR AB13: Node GUID 0x%016" PRIx64
 				" - Unknown node type: %s\n",
 				cl_ntoh64(remote_node_guid),
 				ib_get_node_type_str(remote_node_type));
@@ -3253,15 +3202,13 @@ static int __osm_ftree_fabric_rank_from_roots(IN ftree_fabric_t * p_ftree)
 						      cl_hton64(*p_guid));
 		if (!p_sw) {
 			/* the specified root guid wasn't found in the fabric */
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-				"__osm_ftree_fabric_rank_from_roots: ERR AB24: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB24: "
 				"Root switch GUID 0x%" PRIx64 " not found\n",
 				*p_guid);
 			continue;
 		}
 
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-			"__osm_ftree_fabric_rank_from_roots: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 			"Ranking root switch with GUID 0x%" PRIx64 "\n",
 			*p_guid);
 		p_sw->rank = 0;
@@ -3270,15 +3217,13 @@ static int __osm_ftree_fabric_rank_from_roots(IN ftree_fabric_t * p_ftree)
 
 	num_roots = cl_list_count(&ranking_bfs_list);
 	if (!num_roots) {
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-			"__osm_ftree_fabric_rank_from_roots: ERR AB25: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB25: "
 			"No valid roots supplied\n");
 		res = -1;
 		goto Exit;
 	}
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_fabric_rank_from_roots: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Ranked %u valid root switches\n", num_roots);
 
 	/* Now the list has all the roots.
@@ -3311,8 +3256,7 @@ static int __osm_ftree_fabric_rank_from_roots(IN ftree_fabric_t * p_ftree)
 			/* if needed, rank the remote switch and add it to the BFS list */
 			if (__osm_ftree_sw_update_rank
 			    (p_remote_sw, p_sw->rank + 1)) {
-				osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-					"__osm_ftree_fabric_rank_from_roots: "
+				OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 					"Ranking switch 0x%" PRIx64
 					" with rank %u\n",
 					__osm_ftree_sw_get_guid_ho(p_remote_sw),
@@ -3325,8 +3269,7 @@ static int __osm_ftree_fabric_rank_from_roots(IN ftree_fabric_t * p_ftree)
 		/* done with ports of this switch - go to the next switch in the list */
 	}
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_fabric_rank_from_roots: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Subnet ranking completed. Max Node Rank = %u\n", max_rank);
 
 	/* set FatTree maximal switch rank */
@@ -3362,8 +3305,7 @@ static int __osm_ftree_fabric_rank_from_hcas(IN ftree_fabric_t * p_ftree)
 		if (__osm_ftree_rank_leaf_switches
 		    (p_ftree, p_hca, &ranking_bfs_list) != 0) {
 			res = -1;
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-				"__osm_ftree_fabric_rank_from_hcas: ERR AB14: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB14: "
 				"Subnet ranking failed - subnet is not FatTree");
 			goto Exit;
 		}
@@ -3400,8 +3342,7 @@ static int __osm_ftree_fabric_rank(IN ftree_fabric_t * p_ftree)
 	if (res)
 		goto Exit;
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_INFO,
-		"__osm_ftree_fabric_rank: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_INFO,
 		"FatTree max switch rank is %u\n", p_ftree->max_switch_rank);
 
 Exit:
@@ -3442,8 +3383,7 @@ static void __osm_ftree_fabric_set_leaf_rank(IN ftree_fabric_t * p_ftree)
 		CL_ASSERT(p_next_hca !=
 			  (ftree_hca_t *) cl_qmap_end(&p_ftree->hca_tbl));
 
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-			"__osm_ftree_fabric_set_leaf_rank: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 			"Selected CN port GUID 0x%" PRIx64 "\n",
 			__osm_ftree_hca_get_guid_ho(p_hca));
 
@@ -3454,15 +3394,13 @@ static void __osm_ftree_fabric_set_leaf_rank(IN ftree_fabric_t * p_ftree)
 			  IB_NODE_TYPE_SWITCH);
 
 		p_sw = p_hca->up_port_groups[i]->remote_hca_or_sw.p_sw;
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-			"__osm_ftree_fabric_set_leaf_rank: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 			"Selected leaf switch GUID 0x%" PRIx64 ", rank %u\n",
 			__osm_ftree_sw_get_guid_ho(p_sw), p_sw->rank);
 		p_ftree->leaf_switch_rank = p_sw->rank;
 	}
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_INFO,
-		"__osm_ftree_fabric_set_leaf_rank: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_INFO,
 		"FatTree leaf switch rank is %u\n", p_ftree->leaf_switch_rank);
 	OSM_LOG_EXIT(&p_ftree->p_osm->log);
 }				/* __osm_ftree_fabric_set_leaf_rank() */
@@ -3536,8 +3474,7 @@ static int __osm_ftree_fabric_read_guid_files(IN ftree_fabric_t * p_ftree)
 	OSM_LOG_ENTER(&p_ftree->p_osm->log);
 
 	if (__osm_ftree_fabric_roots_provided(p_ftree)) {
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-			"__osm_ftree_read_guid_files: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 			"Fetching root nodes from file %s\n",
 			p_ftree->p_osm->subn.opt.root_guid_file);
 
@@ -3550,8 +3487,7 @@ static int __osm_ftree_fabric_read_guid_files(IN ftree_fabric_t * p_ftree)
 		}
 
 		if (!cl_list_count(&p_ftree->root_guid_list)) {
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-				"__osm_ftree_fabric_read_guid_files: ERR AB22: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB22: "
 				"Root guids file has no valid guids\n");
 			status = -1;
 			goto Exit;
@@ -3563,8 +3499,7 @@ static int __osm_ftree_fabric_read_guid_files(IN ftree_fabric_t * p_ftree)
 		cl_list_construct(&cn_guid_list);
 		cl_list_init(&cn_guid_list, 10);
 
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
-			"__osm_ftree_read_guid_files: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_DEBUG,
 			"Fetching compute nodes from file %s\n",
 			p_ftree->p_osm->subn.opt.cn_guid_file);
 
@@ -3576,8 +3511,7 @@ static int __osm_ftree_fabric_read_guid_files(IN ftree_fabric_t * p_ftree)
 		}
 
 		if (!cl_list_count(&cn_guid_list)) {
-			osm_log(&p_ftree->p_osm->log, OSM_LOG_ERROR,
-				"__osm_ftree_fabric_read_guid_files: ERR AB23: "
+			OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB23: "
 				"Compute node guids file has no valid guids\n");
 			status = -1;
 			goto Exit;
@@ -3634,14 +3568,12 @@ static int __osm_ftree_construct_fabric(IN void *context)
 		goto Exit;
 	}
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_construct_fabric: \n"
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE, "\n"
 		"                       |----------------------------------------|\n"
 		"                       |- Starting FatTree fabric construction -|\n"
 		"                       |----------------------------------------|\n\n");
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_construct_fabric: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Populating FatTree Switch and CA tables\n");
 	if (__osm_ftree_fabric_populate_nodes(p_ftree) != 0) {
 		osm_log(&p_ftree->p_osm->log, OSM_LOG_SYS,
@@ -3651,8 +3583,7 @@ static int __osm_ftree_construct_fabric(IN void *context)
 		goto Exit;
 	}
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_construct_fabric: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Reading guid files provided by user\n");
 	if (__osm_ftree_fabric_read_guid_files(p_ftree) != 0) {
 		osm_log(&p_ftree->p_osm->log, OSM_LOG_SYS,
@@ -3675,8 +3606,7 @@ static int __osm_ftree_construct_fabric(IN void *context)
 	   After that we will know only fabric max switch rank.
 	   We will be able to check leaf switches rank and the
 	   whole tree rank after filling ports and marking CNs. */
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_construct_fabric: Ranking FatTree\n");
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE, "Ranking FatTree\n");
 	if (__osm_ftree_fabric_rank(p_ftree) != 0) {
 		osm_log(&p_ftree->p_osm->log, OSM_LOG_SYS,
 			"Failed ranking the tree  - "
@@ -3690,8 +3620,7 @@ static int __osm_ftree_construct_fabric(IN void *context)
 	   because we want the ports to have pointers to ftree_{sw,hca}_t
 	   objects, and we need the switches to be already ranked because
 	   that's how the port direction is determined. */
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_construct_fabric: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Populating CA & switch ports\n");
 	if (__osm_ftree_fabric_populate_ports(p_ftree) != 0) {
 		osm_log(&p_ftree->p_osm->log, OSM_LOG_SYS,
@@ -3774,22 +3703,19 @@ static int __osm_ftree_construct_fabric(IN void *context)
 		goto Exit;
 	}
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_construct_fabric: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Max LID in switch LFTs (in host order): 0x%04x\n",
 		p_ftree->lft_max_lid_ho);
 
 Exit:
 	if (status != 0) {
-		osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-			"__osm_ftree_construct_fabric: "
+		OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 			"Clearing FatTree Fabric data structures\n");
 		__osm_ftree_fabric_clear(p_ftree);
 	} else
 		p_ftree->fabric_built = TRUE;
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_construct_fabric: \n"
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE, "\n"
 		"                       |--------------------------------------------------|\n"
 		"                       |- Done constructing FatTree fabric (status = %d) -|\n"
 		"                       |--------------------------------------------------|\n\n",
@@ -3814,21 +3740,18 @@ static int __osm_ftree_do_routing(IN void *context)
 		goto Exit;
 	}
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_do_routing: " "Starting FatTree routing\n");
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
+		"Starting FatTree routing\n");
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_do_routing: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Filling switch forwarding tables for Compute Nodes\n");
 	__osm_ftree_fabric_route_to_cns(p_ftree);
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_do_routing: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Filling switch forwarding tables for non-CN targets\n");
 	__osm_ftree_fabric_route_to_non_cns(p_ftree);
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_do_routing: "
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
 		"Filling switch forwarding tables for switch-to-switch pathes\n");
 	__osm_ftree_fabric_route_to_switches(p_ftree);
 
@@ -3839,8 +3762,8 @@ static int __osm_ftree_do_routing(IN void *context)
 	/* write out hca ordering file */
 	__osm_ftree_fabric_dump_hca_ordering(p_ftree);
 
-	osm_log(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_ftree_do_routing: " "FatTree routing is done\n");
+	OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_VERBOSE,
+		"FatTree routing is done\n");
 
 Exit:
 	OSM_LOG_EXIT(&p_ftree->p_osm->log);
diff --git a/opensm/opensm/osm_ucast_lash.c b/opensm/opensm/osm_ucast_lash.c
index 43e6526..0735aed 100644
--- a/opensm/opensm/osm_ucast_lash.c
+++ b/opensm/opensm/osm_ucast_lash.c
@@ -135,8 +135,8 @@ static void connect_switches(lash_t * p_lash, int sw1, int sw2, int phy_port_1)
 	p_lash->switches[sw1]->virtual_physical_port_table[num] = phy_port_1;
 	p_lash->switches[sw1]->num_connections++;
 
-	osm_log(p_log, OSM_LOG_VERBOSE,
-		"connect_switches: " "LASH connect: %d, %d, %d\n", sw1, sw2,
+	OSM_LOG(p_log, OSM_LOG_VERBOSE,
+		"LASH connect: %d, %d, %d\n", sw1, sw2,
 		phy_port_1);
 
 }
@@ -921,8 +921,7 @@ static int init_lash_structures(lash_t * p_lash)
 
 Exit_Mem_Error:
 	status = IB_ERROR;
-	osm_log(p_log, OSM_LOG_ERROR,
-		"lash_init_structures: ERR 4D01: "
+	OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 4D01: "
 		"Could not allocate required memory for LASH errno %d, errno %d for lack of memory\n",
 		errno, ENOMEM);
 
@@ -952,8 +951,7 @@ static int lash_core(lash_t * p_lash)
 	switch_bitmap =
 	    (int *)malloc(num_switches * num_switches * sizeof(int));
 	if (!switch_bitmap) {
-		osm_log(p_log, OSM_LOG_ERROR,
-			"lash_core: ERR 4D04: "
+		OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 4D04: "
 			"Failed allocating switch_bitmap - out of memory\n");
 		goto Exit;
 	}
@@ -1080,29 +1078,26 @@ static int lash_core(lash_t * p_lash)
 		}
 	}
 
-	osm_log(p_log, OSM_LOG_INFO,
-		"lash_core: " "Lanes needed: %d, Balancing\n", lanes_needed);
+	OSM_LOG(p_log, OSM_LOG_INFO,
+		"Lanes needed: %d, Balancing\n", lanes_needed);
 
 	for (i = 0; i < lanes_needed; i++) {
-		osm_log(p_log, OSM_LOG_INFO,
-			"lash_core: " "Lanes in layer %d: %d\n", i,
-			p_lash->num_mst_in_lane[i]);
+		OSM_LOG(p_log, OSM_LOG_INFO, "Lanes in layer %d: %d\n",
+			i, p_lash->num_mst_in_lane[i]);
 	}
 
 	balance_virtual_lanes(p_lash, lanes_needed);
 
 	for (i = 0; i < lanes_needed; i++) {
-		osm_log(p_log, OSM_LOG_INFO,
-			"lash_core: " "Lanes in layer %d: %d\n", i,
-			p_lash->num_mst_in_lane[i]);
+		OSM_LOG(p_log, OSM_LOG_INFO, "Lanes in layer %d: %d\n",
+			i, p_lash->num_mst_in_lane[i]);
 	}
 
 	goto Exit;
 
 Error_Not_Enough_Lanes:
 	status = IB_ERROR;
-	osm_log(p_log, OSM_LOG_ERROR,
-		"lash_core: ERR 4D02: "
+	OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 4D02: "
 		"Lane requirements (%d) exceed available lanes (%d)\n",
 		p_lash->vl_min, lanes_needed);
 Exit:
@@ -1147,8 +1142,7 @@ static void populate_fwd_tbls(lash_t * p_lash)
 			p_dst_sw = get_osm_switch_from_lid(p_lash->p_osm, lid);
 
 			if (p_dst_sw == NULL) {
-				osm_log(p_log, OSM_LOG_ERROR,
-					"populate_fwd_tbls: ERR 4D03: "
+				OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 4D03: "
 					"LASH fwd NULL Cannot find GUID 0x%016"
 					PRIx64
 					" src lash id (%d), src lid no (0x%04X)\n",
@@ -1157,8 +1151,7 @@ static void populate_fwd_tbls(lash_t * p_lash)
 				uint8_t egress_port =
 				    find_port_from_lid(cl_hton16(lid), p_sw);
 				p_osm->sm.ucast_mgr.lft_buf[lid] = egress_port;
-				osm_log(p_log, OSM_LOG_VERBOSE,
-					"populate_fwd_tbls: "
+				OSM_LOG(p_log, OSM_LOG_VERBOSE,
 					"LASH fwd MY SRC SRC GUID 0x%016" PRIx64
 					" src lash id (%d), src lid no (0x%04X) src lash port (%d) "
 					"DST GUID 0x%016" PRIx64
@@ -1179,8 +1172,7 @@ static void populate_fwd_tbls(lash_t * p_lash)
 
 				p_osm->sm.ucast_mgr.lft_buf[lid] =
 				    physical_egress_port;
-				osm_log(p_log, OSM_LOG_VERBOSE,
-					"populate_fwd_tbls: "
+				OSM_LOG(p_log, OSM_LOG_VERBOSE,
 					"LASH fwd SRC GUID 0x%016" PRIx64
 					" src lash id (%d), "
 					"src lid no ( 0x%04X ) src lash port (%d) "
@@ -1228,8 +1220,7 @@ static void osm_lash_process_switch(lash_t * p_lash, osm_switch_t * p_sw)
 				connect_switches(p_lash, switch_a_lash_id,
 						 switch_b_lash_id,
 						 physical_port_a_num);
-				osm_log(p_log, OSM_LOG_VERBOSE,
-					"osm_lash_process_switch: "
+				OSM_LOG(p_log, OSM_LOG_VERBOSE,
 					"LASH SUCCESS connected G 0x%016" PRIx64
 					" , lash_id(%u), P(%u) " " to G 0x%016"
 					PRIx64 " , lash_id(%u) , P(%u)\n",
@@ -1330,8 +1321,7 @@ static int discover_network_properties(lash_t * p_lash)
 
 	p_lash->vl_min = vl_min;
 
-	osm_log(p_log, OSM_LOG_INFO,
-		"lash discover_network_properties: "
+	OSM_LOG(p_log, OSM_LOG_INFO,
 		"min operational vl(%d) max_switches(%d)\n", p_lash->vl_min,
 		p_lash->num_switches);
 	return 0;
diff --git a/opensm/opensm/osm_ucast_mgr.c b/opensm/opensm/osm_ucast_mgr.c
index 0813a23..27a206f 100644
--- a/opensm/opensm/osm_ucast_mgr.c
+++ b/opensm/opensm/osm_ucast_mgr.c
@@ -155,8 +155,7 @@ __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,
-			"__osm_ucast_mgr_process_neighbor: "
+		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)),
@@ -179,8 +178,7 @@ __osm_ucast_mgr_process_neighbor(IN osm_ucast_mgr_t * const p_mgr,
 		    osm_switch_get_hop_count(p_this_sw, lid_ho, port_num)) {
 			if (osm_switch_set_hops
 			    (p_this_sw, lid_ho, port_num, hops) != 0)
-				osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-					"__osm_ucast_mgr_process_neighbor: "
+				OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR,
 					"cannot set hops for lid %u at switch 0x%"
 					PRIx64 "\n", lid_ho,
 					cl_ntoh64(osm_node_get_node_guid
@@ -221,8 +219,7 @@ __osm_ucast_mgr_process_port(IN osm_ucast_mgr_t * const p_mgr,
 	if (lids_per_port > 1) {
 		remote_sys_guids = malloc(sizeof(uint64_t) * lids_per_port);
 		if (remote_sys_guids == NULL) {
-			osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-				"__osm_ucast_mgr_process_port: ERR 3A09: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 3A09: "
 				"Cannot allocate array. Insufficient memory\n");
 			goto Exit;
 		}
@@ -231,8 +228,7 @@ __osm_ucast_mgr_process_port(IN osm_ucast_mgr_t * const p_mgr,
 
 		remote_node_guids = malloc(sizeof(uint64_t) * lids_per_port);
 		if (remote_node_guids == NULL) {
-			osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-				"__osm_ucast_mgr_process_port: ERR 3A0A: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 3A0A: "
 				"Cannot allocate array. Insufficient memory\n");
 			goto Exit;
 		}
@@ -245,8 +241,7 @@ __osm_ucast_mgr_process_port(IN osm_ucast_mgr_t * const p_mgr,
 	/* If the lids are zero - then there was some problem with the initialization.
 	   Don't handle this port. */
 	if (min_lid_ho == 0 || max_lid_ho == 0) {
-		osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-			"__osm_ucast_mgr_process_port: ERR 3A04: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 3A04: "
 			"Port 0x%" PRIx64 " has LID 0. An initialization "
 			"error occurred. Ignoring port\n",
 			cl_ntoh64(osm_port_get_guid(p_port)));
@@ -254,10 +249,8 @@ __osm_ucast_mgr_process_port(IN osm_ucast_mgr_t * const p_mgr,
 	}
 
 	if (osm_log_is_active(p_mgr->p_log, OSM_LOG_DEBUG)) {
-		osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-			"__osm_ucast_mgr_process_port: "
-			"Processing port 0x%" PRIx64
-			", LIDs [0x%X,0x%X]\n",
+		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
+			"Processing port 0x%" PRIx64 ", LIDs [0x%X,0x%X]\n",
 			cl_ntoh64(osm_port_get_guid(p_port)),
 			min_lid_ho, max_lid_ho);
 	}
@@ -306,8 +299,7 @@ __osm_ucast_mgr_process_port(IN osm_ucast_mgr_t * const p_mgr,
 			/* Up/Down routing can cause unreachable routes between some
 			   switches so we do not report that as an error in that case */
 			if (!p_routing_eng->build_lid_matrices) {
-				osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-					"__osm_ucast_mgr_process_port: ERR 3A08: "
+				OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 3A08: "
 					"No path to get to LID 0x%X from switch 0x%"
 					PRIx64 "\n", lid_ho,
 					cl_ntoh64(node_guid));
@@ -315,14 +307,12 @@ __osm_ucast_mgr_process_port(IN osm_ucast_mgr_t * const p_mgr,
 				p_mgr->p_subn->subnet_initialization_error =
 				    TRUE;
 			} else
-				osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-					"__osm_ucast_mgr_process_port: "
+				OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 					"No path to get to LID 0x%X from switch 0x%"
 					PRIx64 "\n", lid_ho,
 					cl_ntoh64(node_guid));
 		} else {
-			osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-				"__osm_ucast_mgr_process_port: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 				"Routing LID 0x%X to port 0x%X"
 				" for switch 0x%" PRIx64 "\n",
 				lid_ho, port, cl_ntoh64(node_guid));
@@ -420,8 +410,7 @@ 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,
-				"osm_ucast_mgr_set_fwd_table: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 				"Setting switch FT top to LID 0x%X\n",
 				p_sw->max_lid_ho);
 		}
@@ -436,8 +425,7 @@ osm_ucast_mgr_set_fwd_table(IN osm_ucast_mgr_t * const p_mgr,
 				     0, CL_DISP_MSGID_NONE, &context);
 
 		if (status != IB_SUCCESS) {
-			osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-				"osm_ucast_mgr_set_fwd_table: ERR 3A06: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 3A06: "
 				"Sending SwitchInfo attribute failed (%s)\n",
 				ib_get_err_str(status));
 		} else
@@ -461,8 +449,7 @@ osm_ucast_mgr_set_fwd_table(IN osm_ucast_mgr_t * const p_mgr,
 			continue;
 
 		if (osm_log_is_active(p_mgr->p_log, OSM_LOG_DEBUG)) {
-			osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-				"osm_ucast_mgr_set_fwd_table: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 				"Writing FT block %u\n", block_id_ho);
 		}
 
@@ -474,8 +461,7 @@ osm_ucast_mgr_set_fwd_table(IN osm_ucast_mgr_t * const p_mgr,
 				     CL_DISP_MSGID_NONE, &context);
 
 		if (status != IB_SUCCESS) {
-			osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-				"osm_ucast_mgr_set_fwd_table: ERR 3A05: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 3A05: "
 				"Sending linear fwd. tbl. block failed (%s)\n",
 				ib_get_err_str(status));
 		} else {
@@ -506,8 +492,7 @@ __osm_ucast_mgr_process_tbl(IN cl_map_item_t * const p_map_item,
 	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,
-			"__osm_ucast_mgr_process_tbl: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 			"Processing switch 0x%" PRIx64 "\n",
 			cl_ntoh64(osm_node_get_node_guid(p_node)));
 	}
@@ -556,8 +541,7 @@ __osm_ucast_mgr_process_neighbors(IN cl_map_item_t * const p_map_item,
 	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,
-			"__osm_ucast_mgr_process_neighbors: "
+		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)));
 	}
@@ -601,8 +585,7 @@ void osm_ucast_mgr_build_lid_matrices(IN osm_ucast_mgr_t * const p_mgr)
 
 	p_sw_guid_tbl = &p_mgr->p_subn->sw_guid_tbl;
 
-	osm_log(p_mgr->p_log, OSM_LOG_VERBOSE,
-		"osm_ucast_mgr_build_lid_matrices: "
+	OSM_LOG(p_mgr->p_log, OSM_LOG_VERBOSE,
 		"Starting switches' Min Hop Table Assignment\n");
 
 	/*
@@ -654,8 +637,7 @@ void osm_ucast_mgr_build_lid_matrices(IN osm_ucast_mgr_t * const p_mgr)
 					   __osm_ucast_mgr_process_neighbors,
 					   p_mgr);
 		}
-		osm_log(p_mgr->p_log, OSM_LOG_DEBUG,
-			"osm_ucast_mgr_build_lid_matrices: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_DEBUG,
 			"Min-hop propagated in %d steps\n", i);
 	}
 }
@@ -674,8 +656,7 @@ static int ucast_mgr_setup_all_switches(osm_subn_t * p_subn)
 	     p_sw != (osm_switch_t *) cl_qmap_end(&p_subn->sw_guid_tbl);
 	     p_sw = (osm_switch_t *) cl_qmap_next(&p_sw->map_item))
 		if (osm_switch_prepare_path_rebuild(p_sw, lids)) {
-			osm_log(&p_subn->p_osm->log, OSM_LOG_ERROR,
-				"ucast_mgr_setup_all_switches: ERR 3A0B: "
+			OSM_LOG(&p_subn->p_osm->log, OSM_LOG_ERROR, "ERR 3A0B: "
 				"cannot setup switch 0x%016" PRIx64 "\n",
 				cl_ntoh64(osm_node_get_node_guid
 					  (p_sw->p_node)));
@@ -702,8 +683,7 @@ osm_ucast_mgr_read_guid_file(IN osm_ucast_mgr_t * const p_mgr,
 
 	guid_file = fopen(guid_file_name, "r");
 	if (guid_file == NULL) {
-		osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-			"osm_ucast_mgr_read_guid_file: ERR 3A13: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 3A13: "
 			"Failed to open guid list file (%s)\n", guid_file_name);
 		status = IB_NOT_FOUND;
 		goto Exit;
@@ -711,8 +691,7 @@ osm_ucast_mgr_read_guid_file(IN osm_ucast_mgr_t * const p_mgr,
 
 	while (fgets(line, sizeof(line), guid_file)) {
 		if (strcspn(line, " ,;.") != strlen(line)) {
-			osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-				"osm_ucast_mgr_read_guid_file: ERR 3A14: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 3A14: "
 				"Poorly formatted guid in file (%s): %s\n",
 				guid_file_name, line);
 			status = IB_NOT_FOUND;
@@ -734,8 +713,7 @@ osm_ucast_mgr_read_guid_file(IN osm_ucast_mgr_t * const p_mgr,
 
 		/* check that the string is a number */
 		if (!(*p_guid) && (*endptr != '\0')) {
-			osm_log(p_mgr->p_log, OSM_LOG_ERROR,
-				"osm_ucast_mgr_read_guid_file: ERR 3A15: "
+			OSM_LOG(p_mgr->p_log, OSM_LOG_ERROR, "ERR 3A15: "
 				"Poorly formatted guid in file (%s): %s\n",
 				guid_file_name, line);
 			status = IB_NOT_FOUND;
@@ -808,20 +786,17 @@ osm_signal_t osm_ucast_mgr_process(IN osm_ucast_mgr_t * const p_mgr)
 	else
 		p_osm->routing_engine_used = OSM_ROUTING_ENGINE_TYPE_MINHOP;
 
-	osm_log(p_mgr->p_log, OSM_LOG_INFO,
-		"osm_ucast_mgr_process: "
+	OSM_LOG(p_mgr->p_log, OSM_LOG_INFO,
 		"%s tables configured on all switches\n",
 		osm_routing_engine_type_str(p_osm->routing_engine_used));
 
 	if (p_mgr->any_change) {
 		signal = OSM_SIGNAL_DONE_PENDING;
-		osm_log(p_mgr->p_log, OSM_LOG_VERBOSE,
-			"osm_ucast_mgr_process: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_VERBOSE,
 			"LFT Tables configured on all switches\n");
 	} else {
 		signal = OSM_SIGNAL_DONE;
-		osm_log(p_mgr->p_log, OSM_LOG_VERBOSE,
-			"osm_ucast_mgr_process: "
+		OSM_LOG(p_mgr->p_log, OSM_LOG_VERBOSE,
 			"No need to set any LFT Tables on any switches\n");
 	}
 
diff --git a/opensm/opensm/osm_ucast_updn.c b/opensm/opensm/osm_ucast_updn.c
index 3058038..76b94cb 100644
--- a/opensm/opensm/osm_ucast_updn.c
+++ b/opensm/opensm/osm_ucast_updn.c
@@ -140,8 +140,7 @@ __updn_bfs_by_node(IN osm_log_t * p_log,
 	lid = cl_ntoh16(lid);
 	osm_switch_set_hops(p_sw, lid, 0, 0);
 
-	osm_log(p_log, OSM_LOG_DEBUG,
-		"__updn_bfs_by_node: "
+	OSM_LOG(p_log, OSM_LOG_DEBUG,
 		"Starting from switch - port GUID 0x%" PRIx64 " lid %u\n",
 		cl_ntoh64(p_sw->p_node->node_info.port_guid), lid);
 
@@ -186,8 +185,7 @@ __updn_bfs_by_node(IN osm_log_t * p_log,
 			/* Check if this is a legal step : the only illegal step is going
 			   from DOWN to UP */
 			if ((current_dir == DOWN) && (next_dir == UP)) {
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"__updn_bfs_by_node: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Avoiding move from 0x%016" PRIx64
 					" to 0x%016" PRIx64 "\n",
 					cl_ntoh64(current_guid),
@@ -207,8 +205,7 @@ __updn_bfs_by_node(IN osm_log_t * p_log,
 							pn_rem,
 							current_min_hop + 1);
 				if (set_hop_return_value) {
-					osm_log(p_log, OSM_LOG_ERROR,
-						"__updn_bfs_by_node (less) ERR AA01: "
+					OSM_LOG(p_log, OSM_LOG_ERROR, "ERR AA01: "
 						"Invalid value returned from set min hop is: %d\n",
 						set_hop_return_value);
 				}
@@ -303,14 +300,12 @@ static cl_status_t updn_init(IN updn_t * const p_updn, IN osm_opensm_t * p_osm)
 			goto Exit;
 
 		/* For Debug Purposes ... */
-		osm_log(&p_osm->log, OSM_LOG_DEBUG,
-			"updn_init: "
+		OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
 			"UPDN - Fetching root nodes from file %s\n",
 			p_osm->subn.opt.root_guid_file);
 		guid_iterator = cl_list_head(p_updn->p_root_nodes);
 		while (guid_iterator != cl_list_end(p_updn->p_root_nodes)) {
-			osm_log(&p_osm->log, OSM_LOG_DEBUG,
-				"updn_init: "
+			OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
 				"Inserting GUID 0x%" PRIx64 " as root node\n",
 				*((uint64_t *) cl_list_obj(guid_iterator)));
 			guid_iterator = cl_list_next(guid_iterator);
@@ -353,16 +348,14 @@ updn_subn_rank(IN unsigned num_guids,
 		    osm_get_switch_by_guid(&p_updn->p_osm->subn,
 					   cl_hton64(guid_list[idx]));
 		if (!p_sw) {
-			osm_log(p_log, OSM_LOG_ERROR,
-				"updn_subn_rank: ERR AA05: "
+			OSM_LOG(p_log, OSM_LOG_ERROR, "ERR AA05: "
 				"Root switch GUID 0x%" PRIx64 " not found\n",
 				guid_list[idx]);
 			continue;
 		}
 
 		u = p_sw->priv;
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"updn_subn_rank: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"Ranking root port GUID 0x%" PRIx64 "\n",
 			guid_list[idx]);
 		u->rank = 0;
@@ -375,8 +368,7 @@ updn_subn_rank(IN unsigned num_guids,
 		/* Go over all remote nodes and rank them (if not already visited) */
 		p_sw = u->sw;
 		num_ports = p_sw->num_ports;
-		osm_log(p_log, OSM_LOG_DEBUG,
-			"updn_subn_rank: "
+		OSM_LOG(p_log, OSM_LOG_DEBUG,
 			"Handling switch GUID 0x%" PRIx64 "\n",
 			cl_ntoh64(osm_node_get_node_guid(p_sw->p_node)));
 		for (port_num = 1; port_num < num_ports; port_num++) {
@@ -403,8 +395,7 @@ updn_subn_rank(IN unsigned num_guids,
 							     &remote_u->list);
 				}
 
-				osm_log(p_log, OSM_LOG_DEBUG,
-					"updn_subn_rank: "
+				OSM_LOG(p_log, OSM_LOG_DEBUG,
 					"Rank of port GUID 0x%" PRIx64
 					" = %u\n", cl_ntoh64(port_guid),
 					remote_u->rank);
@@ -414,8 +405,7 @@ updn_subn_rank(IN unsigned num_guids,
 	}
 
 	/* Print Summary of ranking */
-	osm_log(p_log, OSM_LOG_VERBOSE,
-		"updn_subn_rank: "
+	OSM_LOG(p_log, OSM_LOG_VERBOSE,
 		"Subnet ranking completed. Max Node Rank = %d\n", max_rank);
 	OSM_LOG_EXIT(p_log);
 	return 0;
@@ -453,8 +443,7 @@ static int __osm_subn_set_up_down_min_hop_table(IN updn_t * p_updn)
 
 	/* Go over all the switches in the subnet - for each init their Min Hop
 	   Table */
-	osm_log(p_log, OSM_LOG_VERBOSE,
-		"__osm_subn_set_up_down_min_hop_table: "
+	OSM_LOG(p_log, OSM_LOG_VERBOSE,
 		"Init Min Hop Table of all switches [\n");
 
 	p_next_sw = (osm_switch_t *) cl_qmap_head(&p_subn->sw_guid_tbl);
@@ -469,13 +458,11 @@ static int __osm_subn_set_up_down_min_hop_table(IN updn_t * p_updn)
 			osm_switch_clear_hops(p_sw);
 	}
 
-	osm_log(p_log, OSM_LOG_VERBOSE,
-		"__osm_subn_set_up_down_min_hop_table: "
+	OSM_LOG(p_log, OSM_LOG_VERBOSE,
 		"Init Min Hop Table of all switches ]\n");
 
 	/* Now do the BFS for each port  in the subnet */
-	osm_log(p_log, OSM_LOG_VERBOSE,
-		"__osm_subn_set_up_down_min_hop_table: "
+	OSM_LOG(p_log, OSM_LOG_VERBOSE,
 		"BFS through all port guids in the subnet [\n");
 
 	p_next_sw = (osm_switch_t *) cl_qmap_head(&p_subn->sw_guid_tbl);
@@ -485,8 +472,7 @@ static int __osm_subn_set_up_down_min_hop_table(IN updn_t * p_updn)
 		__updn_bfs_by_node(p_log, p_subn, p_sw);
 	}
 
-	osm_log(p_log, OSM_LOG_VERBOSE,
-		"__osm_subn_set_up_down_min_hop_table: "
+	OSM_LOG(p_log, OSM_LOG_VERBOSE,
 		"BFS through all port guids in the subnet ]\n");
 	/* Cleanup */
 	OSM_LOG_EXIT(p_log);
@@ -503,12 +489,10 @@ updn_build_lid_matrices(IN uint32_t num_guids,
 
 	OSM_LOG_ENTER(&p_updn->p_osm->log);
 
-	osm_log(&p_updn->p_osm->log, OSM_LOG_VERBOSE,
-		"updn_build_lid_matrices: "
+	OSM_LOG(&p_updn->p_osm->log, OSM_LOG_VERBOSE,
 		"Ranking all port guids in the list\n");
 	if (num_guids == 0) {
-		osm_log(&p_updn->p_osm->log, OSM_LOG_ERROR,
-			"updn_build_lid_matrices: ERR AA0A: "
+		OSM_LOG(&p_updn->p_osm->log, OSM_LOG_ERROR, "ERR AA0A: "
 			"No guids were provided or number of guids is 0\n");
 		status = -1;
 		goto _exit;
@@ -516,8 +500,7 @@ updn_build_lid_matrices(IN uint32_t num_guids,
 
 	/* Check if it's not a switched subnet */
 	if (cl_is_qmap_empty(&p_updn->p_osm->subn.sw_guid_tbl)) {
-		osm_log(&p_updn->p_osm->log, OSM_LOG_ERROR,
-			"updn_build_lid_matrices: ERR AAOB: "
+		OSM_LOG(&p_updn->p_osm->log, OSM_LOG_ERROR, "ERR AAOB: "
 			"This is not a switched subnet, cannot perform UPDN algorithm\n");
 		status = -1;
 		goto _exit;
@@ -527,8 +510,7 @@ updn_build_lid_matrices(IN uint32_t num_guids,
 	updn_subn_rank(num_guids, guid_list, p_updn);
 
 	/* After multiple ranking need to set Min Hop Table by UpDn algorithm  */
-	osm_log(&p_updn->p_osm->log, OSM_LOG_VERBOSE,
-		"updn_build_lid_matrices: "
+	OSM_LOG(&p_updn->p_osm->log, OSM_LOG_VERBOSE,
 		"Setting all switches' Min Hop Table\n");
 	status = __osm_subn_set_up_down_min_hop_table(p_updn);
 
@@ -576,9 +558,8 @@ static int __osm_updn_call(void *ctx)
 		p_item = cl_qmap_next(p_item);
 		p_sw->priv = create_updn_node(p_sw);
 		if (!p_sw->priv) {
-			osm_log(&(p_updn->p_osm->log), OSM_LOG_ERROR,
-				"__osm_updn_call: ERR AA0C: "
-				" cannot create updn node\n");
+			OSM_LOG(&(p_updn->p_osm->log), OSM_LOG_ERROR, "ERR AA0C: "
+				"cannot create updn node\n");
 			OSM_LOG_EXIT(&p_updn->p_osm->log);
 			return -1;
 		}
@@ -595,15 +576,14 @@ static int __osm_updn_call(void *ctx)
 	/* printf ("-V- after osm_updn_find_root_nodes_by_min_hop\n"); */
 	/* Only if there are assigned root nodes do the algorithm, otherwise perform do nothing */
 	if (p_updn->updn_ucast_reg_inputs.num_guids > 0) {
-		osm_log(&(p_updn->p_osm->log), OSM_LOG_DEBUG,
-			"__osm_updn_call: " "activating UPDN algorithm\n");
+		OSM_LOG(&p_updn->p_osm->log, OSM_LOG_DEBUG,
+			"activating UPDN algorithm\n");
 		ret = updn_build_lid_matrices(p_updn->updn_ucast_reg_inputs.
 					      num_guids,
 					      p_updn->updn_ucast_reg_inputs.
 					      guid_list, p_updn);
 	} else {
-		osm_log(&p_updn->p_osm->log, OSM_LOG_INFO,
-			"__osm_updn_call: "
+		OSM_LOG(&p_updn->p_osm->log, OSM_LOG_INFO,
 			"disabling UPDN algorithm, no root nodes were found\n");
 		ret = 1;
 	}
@@ -650,8 +630,7 @@ static void __osm_updn_convert_list2array(IN updn_t * p_updn)
 		}
 		max_num = i;
 		for (i = 0; i < max_num; i++)
-			osm_log(&p_updn->p_osm->log, OSM_LOG_DEBUG,
-				"__osm_updn_convert_list2array: "
+			OSM_LOG(&p_updn->p_osm->log, OSM_LOG_DEBUG,
 				"Map GUID 0x%" PRIx64 " into UPDN array\n",
 				p_updn->updn_ucast_reg_inputs.guid_list[i]);
 	}
@@ -677,23 +656,20 @@ static void __osm_updn_find_root_nodes_by_min_hop(OUT updn_t * p_updn)
 
 	OSM_LOG_ENTER(&p_osm->log);
 
-	osm_log(&p_osm->log, OSM_LOG_DEBUG,
-		"__osm_updn_find_root_nodes_by_min_hop: "
+	OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
 		"Current number of ports in the subnet is %d\n",
 		cl_qmap_count(&p_osm->subn.port_guid_tbl));
 
 	cas_per_sw = malloc((IB_LID_UCAST_END_HO + 1) * sizeof(*cas_per_sw));
 	if (!cas_per_sw) {
-		osm_log(&p_osm->log, OSM_LOG_ERROR,
-			"__osm_updn_find_root_nodes_by_min_hop: ERR AA14: "
+		OSM_LOG(&p_osm->log, OSM_LOG_ERROR, "ERR AA14: "
 			"cannot alloc mem for CAs per switch counter array\n");
 		goto _exit;
 	}
 	memset(cas_per_sw, 0, (IB_LID_UCAST_END_HO + 1) * sizeof(*cas_per_sw));
 
 	/* Find the Maximum number of CAs (and routers) for histogram normalization */
-	osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_updn_find_root_nodes_by_min_hop: "
+	OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
 		"Finding the number of CAs and storing them in cl_map\n");
 	p_next_port = (osm_port_t *) cl_qmap_head(&p_osm->subn.port_guid_tbl);
 	while (p_next_port !=
@@ -707,8 +683,7 @@ static void __osm_updn_find_root_nodes_by_min_hop(OUT updn_t * p_updn)
 				continue;
 			lid_ho = osm_node_get_base_lid(p_physp->p_node, 0);
 			lid_ho = cl_ntoh16(lid_ho);
-			osm_log(&p_osm->log, OSM_LOG_DEBUG,
-				"__osm_updn_find_root_nodes_by_min_hop: "
+			OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
 				"Inserting GUID 0x%" PRIx64
 				", sw lid: 0x%X into array\n",
 				cl_ntoh64(osm_port_get_guid(p_port)), lid_ho);
@@ -719,15 +694,13 @@ static void __osm_updn_find_root_nodes_by_min_hop(OUT updn_t * p_updn)
 
 	thd1 = cas_num * 0.9;
 	thd2 = cas_num * 0.05;
-	osm_log(&p_osm->log, OSM_LOG_DEBUG,
-		"__osm_updn_find_root_nodes_by_min_hop: "
+	OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
 		"Found %u CAs and RTRs, %u SWs in the subnet. "
 		"Thresholds are thd1 = %f && thd2 = %f\n",
 		cas_num, cl_qmap_count(&p_osm->subn.sw_guid_tbl), thd1, thd2);
 
 	p_next_sw = (osm_switch_t *) cl_qmap_head(&p_osm->subn.sw_guid_tbl);
-	osm_log(&p_osm->log, OSM_LOG_VERBOSE,
-		"__osm_updn_find_root_nodes_by_min_hop: "
+	OSM_LOG(&p_osm->log, OSM_LOG_VERBOSE,
 		"Passing through all switches to collect Min Hop info\n");
 	while (p_next_sw !=
 	       (osm_switch_t *) cl_qmap_end(&p_osm->subn.sw_guid_tbl)) {
@@ -745,8 +718,7 @@ static void __osm_updn_find_root_nodes_by_min_hop(OUT updn_t * p_updn)
 
 		max_lid_ho = p_sw->max_lid_ho;
 		/* Get base lid of switch by retrieving port 0 lid of node pointer */
-		osm_log(&p_osm->log, OSM_LOG_DEBUG,
-			"__osm_updn_find_root_nodes_by_min_hop: "
+		OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
 			"Passing through switch lid 0x%X\n",
 			cl_ntoh16(osm_node_get_base_lid(p_sw->p_node, 0)));
 		for (lid_ho = 1; lid_ho <= max_lid_ho; lid_ho++)
@@ -775,14 +747,12 @@ static void __osm_updn_find_root_nodes_by_min_hop(OUT updn_t * p_updn)
 				*p_guid =
 				    cl_ntoh64(osm_node_get_node_guid
 					      (p_sw->p_node));
-				osm_log(&p_osm->log, OSM_LOG_DEBUG,
-					"__osm_updn_find_root_nodes_by_min_hop: "
+				OSM_LOG(&p_osm->log, OSM_LOG_DEBUG,
 					"Inserting GUID 0x%" PRIx64
 					" as root node\n", *p_guid);
 				cl_list_insert_tail(p_root_nodes_list, p_guid);
 			} else {
-				osm_log(&p_osm->log, OSM_LOG_ERROR,
-					"__osm_updn_find_root_nodes_by_min_hop: ERR AA13: "
+				OSM_LOG(&p_osm->log, OSM_LOG_ERROR, "ERR AA13: "
 					"No memory for p_guid\n");
 			}
 		}
diff --git a/opensm/opensm/osm_vl15intf.c b/opensm/opensm/osm_vl15intf.c
index 5a5c7a3..faff2fa 100644
--- a/opensm/opensm/osm_vl15intf.c
+++ b/opensm/opensm/osm_vl15intf.c
@@ -89,8 +89,7 @@ static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)
 
 	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,
-				"__osm_vl15_poller: "
+			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,
@@ -100,8 +99,7 @@ static void vl15_send_mad(osm_vl15_t * p_vl, osm_madw_t * p_madw)
 		return;
 	}
 
-	osm_log(p_vl->p_log, OSM_LOG_ERROR,
-		"__osm_vl15_poller: ERR 3E03: "
+	OSM_LOG(p_vl->p_log, OSM_LOG_ERROR, "ERR 3E03: "
 		"MAD send failed (%s)\n", ib_get_err_str(status));
 
 	/*
@@ -151,8 +149,7 @@ static void __osm_vl15_poller(IN void *p_ptr)
 
 		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,
-					"__osm_vl15_poller: "
+				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))
@@ -174,8 +171,7 @@ static void __osm_vl15_poller(IN void *p_ptr)
 			status = cl_event_wait_on(&p_vl->signal,
 						  EVENT_NO_TIMEOUT, TRUE);
 			if (status != CL_SUCCESS) {
-				osm_log(p_vl->p_log, OSM_LOG_ERROR,
-					"__osm_vl15_poller: ERR 3E02: "
+				OSM_LOG(p_vl->p_log, OSM_LOG_ERROR, "ERR 3E02: "
 					"Event wait failed (%s)\n",
 					CL_STATUS_MSG(status));
 				break;
@@ -314,8 +310,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,
-				"osm_vl15_poll: " "Signalling poller thread\n");
+			OSM_LOG(p_vl->p_log, OSM_LOG_DEBUG,
+				"Signalling poller thread\n");
 
 		cl_event_signal(&p_vl->signal);
 	}
@@ -332,8 +328,8 @@ 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,
-			"osm_vl15_post: " "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.
@@ -347,8 +343,7 @@ void osm_vl15_post(IN osm_vl15_t * const p_vl, IN osm_madw_t * const p_madw)
 	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,
-			"osm_vl15_post: "
+		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);
@@ -378,8 +373,7 @@ osm_vl15_shutdown(IN osm_vl15_t * const p_vl,
 	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,
-				"osm_vl15_shutdown: "
+			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);
@@ -391,8 +385,7 @@ osm_vl15_shutdown(IN osm_vl15_t * const p_vl,
 	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,
-				"osm_vl15_shutdown: "
+			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);
diff --git a/opensm/opensm/osm_vl_arb_rcv.c b/opensm/opensm/osm_vl_arb_rcv.c
index fac4f94..c45d805 100644
--- a/opensm/opensm/osm_vl_arb_rcv.c
+++ b/opensm/opensm/osm_vl_arb_rcv.c
@@ -99,8 +99,7 @@ void osm_vla_rcv_process(IN void *context, IN void *data)
 	p_port = osm_get_port_by_guid(sm->p_subn, port_guid);
 	if (!p_port) {
 		cl_plock_release(sm->p_lock);
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_vla_rcv_process: ERR 3F06: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3F06: "
 			"No port object for port with GUID 0x%" PRIx64
 			"\n\t\t\t\tfor parent node GUID 0x%" PRIx64
 			", TID 0x%" PRIx64 "\n",
@@ -127,8 +126,7 @@ void osm_vla_rcv_process(IN void *context, IN void *data)
 	   the subnet.
 	 */
 	if (osm_log_is_active(sm->p_log, OSM_LOG_VERBOSE)) {
-		osm_log(sm->p_log, OSM_LOG_VERBOSE,
-			"osm_vla_rcv_process: "
+		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),
@@ -140,8 +138,7 @@ void osm_vla_rcv_process(IN void *context, IN void *data)
 	   If so, Ignore it.
 	 */
 	if (!p_physp) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_vla_rcv_process: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
 			"Got invalid port number 0x%X\n", port_num);
 		goto Exit;
 	}
@@ -151,8 +148,7 @@ void osm_vla_rcv_process(IN void *context, IN void *data)
 			      port_num, p_vla_tbl, OSM_LOG_DEBUG);
 
 	if ((block_num < 1) || (block_num > 4)) {
-		osm_log(sm->p_log, OSM_LOG_ERROR,
-			"osm_vla_rcv_process: "
+		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
 			"Got invalid block number 0x%X\n", block_num);
 		goto Exit;
 	}
-- 
1.5.4.1.122.gaa8d




More information about the general mailing list