[openib-general] [PATCH][TRIVIAL] osmtest/osmt_multicast.c: Eliminate superfluous clearing of some variables

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Sun Oct 22 00:24:05 PDT 2006


Looks good, thanks.

-- Yevgeny

Hal Rosenstock wrote:
> osmtest/osmt_multicast.c: Eliminate superfluous clearing of some
> variables
> 
> Also, some other cosmetic changes
> 
> Signed-off-by: Hal Rosenstock <halr at voltaire.com>
> 
> Index: osmtest/osmt_multicast.c
> ===================================================================
> --- osmtest/osmt_multicast.c	(revision 9918)
> +++ osmtest/osmt_multicast.c	(working copy)
> @@ -84,8 +84,7 @@ __osmt_print_all_multicast_records(
>     req.pfn_query_cb = osmtest_query_res_cb;
>     req.p_query_input = &user;
>  
> -   /* UnTrusted - get the multicast groups */
> -   req.sm_key = 0;
> +   /* UnTrusted (SMKey of 0)  - get the multicast groups */
>     status = osmv_query_sa(p_osmt->h_bind, &req);
>  
>     if (status != IB_SUCCESS || context.result.status != IB_SUCCESS) 
> @@ -187,7 +186,6 @@ osmt_query_mcast( IN osmtest_t * const p
>    context.p_osmt = p_osmt;
>    user.attr_id = IB_MAD_ATTR_MCMEMBER_RECORD;
>    user.attr_offset = ib_get_attr_offset( sizeof( ib_member_rec_t ) );
> -  user.comp_mask = 0;
>  
>    req.query_type = OSMV_QUERY_USER_DEFINED;
>    req.timeout_ms = p_osmt->opt.transaction_timeout;
> @@ -196,7 +194,6 @@ osmt_query_mcast( IN osmtest_t * const p
>    req.query_context = &context;
>    req.pfn_query_cb = osmtest_query_res_cb;
>    req.p_query_input = &user;
> -  req.sm_key = 0;
>  
>    status = osmv_query_sa( p_osmt->h_bind, &req );
>  
> @@ -325,7 +322,7 @@ osmt_send_mcast_request( IN osmtest_t * 
>    memset( &req, 0, sizeof( req ) );
>    memset( &user, 0, sizeof( user ) );
>    memset( &context, 0, sizeof( context ) );
> -  memset( p_res, 0, sizeof(ib_sa_mad_t ) );
> +  memset( p_res, 0, sizeof( ib_sa_mad_t ) );
>  
>    context.p_osmt = p_osmt;
>  
> @@ -371,7 +368,6 @@ osmt_send_mcast_request( IN osmtest_t * 
>    req.query_context = &context;
>    req.pfn_query_cb = osmtest_query_res_cb;
>    req.p_query_input = &user;
> -  req.sm_key = 0;
>  
>    status = osmv_query_sa( p_osmt->h_bind, &req );
>  
> @@ -417,7 +413,6 @@ osmt_send_mcast_request( IN osmtest_t * 
>  
>    OSM_LOG_EXIT( &p_osmt->log );
>    return ( status );
> -
>  }
>  
>  /**********************************************************************
> @@ -3251,7 +3246,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>    if (p_osmt->opt.mmode > 2)
>    {
>      /* Check invalid Join with max mlid which is more than the
> -       Mellanox switches support  0xC000+0x1000 = 0xd000 */
> +       Mellanox switches support 0xC000+0x1000 = 0xd000 */
>      osm_log( &p_osmt->log, OSM_LOG_INFO,
>               "osmt_run_mcast_flow: "
>               "Checking Creation of Maximum avaliable Groups (MulticastFDBCap)...\n"
> @@ -3260,6 +3255,7 @@ osmt_run_mcast_flow( IN osmtest_t * cons
>  
>      while (tmp_mlid > 0 && !ReachedMlidLimit) {
>        uint16_t cur_mlid = 0;
> +
>        /* Request Set */
>        ib_member_set_join_state(&mc_req_rec, IB_MC_REC_STATE_FULL_MEMBER);
>        /* Good Flow - mgid is 0 while giving all required fields for
> 
> 
> 
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> 




More information about the general mailing list