@@ -945,14 +945,14 @@ int ompi_osc_ucx_dynamic_lock(ompi_osc_ucx_module_t *module, int target) {
945945 uint64_t remote_addr = (module -> state_addrs )[target ] + OSC_UCX_STATE_DYNAMIC_LOCK_OFFSET ;
946946 ucp_ep_h * ep ;
947947 OSC_UCX_GET_DEFAULT_EP (ep , module , target );
948- int ret = OMPI_SUCCESS ;
948+ int ret ;
949949
950950 for (;;) {
951951 ret = opal_common_ucx_wpmem_cmpswp (module -> state_mem ,
952952 TARGET_LOCK_UNLOCKED , TARGET_LOCK_EXCLUSIVE ,
953953 target , & result_value , sizeof (result_value ),
954954 remote_addr , ep );
955- if (ret != OMPI_SUCCESS ) {
955+ if (OPAL_SUCCESS != ret ) {
956956 OSC_UCX_VERBOSE (1 , "opal_common_ucx_mem_cmpswp failed: %d" , ret );
957957 return OMPI_ERROR ;
958958 }
@@ -963,18 +963,18 @@ int ompi_osc_ucx_dynamic_lock(ompi_osc_ucx_module_t *module, int target) {
963963 opal_common_ucx_wpool_progress (mca_osc_ucx_component .wpool );
964964 }
965965
966- return ret ;
966+ return OMPI_SUCCESS ;
967967}
968968
969969int ompi_osc_ucx_dynamic_unlock (ompi_osc_ucx_module_t * module , int target ) {
970970 uint64_t result_value = -1 ;
971971 uint64_t remote_addr = (module -> state_addrs )[target ] + OSC_UCX_STATE_DYNAMIC_LOCK_OFFSET ;
972972 ucp_ep_h * ep ;
973973 OSC_UCX_GET_DEFAULT_EP (ep , module , target );
974- int ret = OMPI_SUCCESS ;
974+ int ret ;
975975
976976 ret = opal_common_ucx_wpmem_fence (module -> mem );
977- if (ret != OMPI_SUCCESS ) {
977+ if (OPAL_SUCCESS != ret ) {
978978 OSC_UCX_VERBOSE (1 , "opal_common_ucx_mem_fence failed: %d" , ret );
979979 return OMPI_ERROR ;
980980 }
@@ -983,8 +983,12 @@ int ompi_osc_ucx_dynamic_unlock(ompi_osc_ucx_module_t *module, int target) {
983983 UCP_ATOMIC_FETCH_OP_SWAP , TARGET_LOCK_UNLOCKED ,
984984 target , & result_value , sizeof (result_value ),
985985 remote_addr , ep );
986+ if (OPAL_SUCCESS != ret ) {
987+ return OMPI_ERROR ;
988+ }
989+
986990 assert (result_value == TARGET_LOCK_EXCLUSIVE );
987- return ret ;
991+ return OMPI_SUCCESS ;
988992}
989993
990994int ompi_osc_ucx_win_attach (struct ompi_win_t * win , void * base , size_t len ) {
0 commit comments