[openib-general] [PATCH] [TRIVIAL] OpenSM/Remote SM: Eliminate some unneeded status checking
Hal Rosenstock
halr at voltaire.com
Thu Jun 29 08:19:03 PDT 2006
OpenSM/Remote SM: Eliminate some unneeded status checking
Since osm_remote_sm.c:osm_remote_sm_init cannot fail, don't return any
status and don't check in an consumers of this API
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
Index: include/opensm/osm_remote_sm.h
===================================================================
--- include/opensm/osm_remote_sm.h (revision 8288)
+++ include/opensm/osm_remote_sm.h (working copy)
@@ -188,7 +188,7 @@ osm_remote_sm_destroy(
*
* SYNOPSIS
*/
-ib_api_status_t
+void
osm_remote_sm_init(
IN osm_remote_sm_t* const p_sm,
IN const osm_port_t* const p_port,
@@ -205,7 +205,7 @@ osm_remote_sm_init(
* [in] Pointer to the SMInfo attribute for this SM.
*
* RETURN VALUES
-* IB_SUCCESS if the SM object was initialized successfully.
+* This function does not return a value.
*
* NOTES
* Allows calling other Remote SM methods.
Index: opensm/osm_remote_sm.c
===================================================================
--- opensm/osm_remote_sm.c (revision 8277)
+++ opensm/osm_remote_sm.c (working copy)
@@ -74,7 +74,7 @@ osm_remote_sm_destroy(
/**********************************************************************
**********************************************************************/
-ib_api_status_t
+void
osm_remote_sm_init(
IN osm_remote_sm_t* const p_sm,
IN const osm_port_t* const p_port,
@@ -87,5 +87,5 @@ osm_remote_sm_init(
p_sm->p_port = p_port;
p_sm->smi = *p_smi;
- return( IB_SUCCESS );
+ return;
}
Index: opensm/osm_sminfo_rcv.c
===================================================================
--- opensm/osm_sminfo_rcv.c (revision 8287)
+++ opensm/osm_sminfo_rcv.c (working copy)
@@ -568,7 +568,6 @@ __osm_sminfo_rcv_process_get_response(
osm_port_t* p_port;
ib_net64_t port_guid;
osm_remote_sm_t* p_sm;
- ib_api_status_t status;
osm_signal_t process_get_sm_ret_val = OSM_SIGNAL_NONE;
OSM_LOG_ENTER( p_rcv->p_log, __osm_sminfo_rcv_process_get_response );
@@ -647,15 +646,7 @@ __osm_sminfo_rcv_process_get_response(
goto Exit;
}
- status = osm_remote_sm_init( p_sm, p_port, p_smi );
- if( status != IB_SUCCESS )
- {
- osm_log( p_rcv->p_log, OSM_LOG_ERROR,
- "__osm_sminfo_rcv_process_get_response: ERR 2F15: "
- "Other SM object initialization failed (%s)\n",
- ib_get_err_str( status ) );
- goto Exit;
- }
+ osm_remote_sm_init( p_sm, p_port, p_smi );
cl_qmap_insert( p_sm_tbl, port_guid, &p_sm->map_item );
}
More information about the general
mailing list