On 07:31 Thu 18 Jun , Hal Rosenstock wrote: > > lash's num_mst_in_lane array is indexed by lane nuber, not by switch index. > Since it's a small number, get rid of extra memory allocation. > > Signed-off-by: Robert Pearson <[email protected]> > Signed-off-by: Hal Rosenstock <[email protected]>
Applied. Thanks. Tiny comment is below. > @@ -778,11 +776,8 @@ static int init_lash_structures(lash_t * p_lash) > } > > /* initialise num_mst_in_lane[num_switches], default 0 */ > - p_lash->num_mst_in_lane = (int *)malloc(num_switches * sizeof(int)); > - if (p_lash->num_mst_in_lane == NULL) > - goto Exit_Mem_Error; > memset(p_lash->num_mst_in_lane, 0, > - num_switches * sizeof(p_lash->num_mst_in_lane[0])); > + IB_MAX_NUM_VLS * sizeof(p_lash->num_mst_in_lane[0])); sizeof(p_lash->num_mst_in_line) would be even simpler, but it is minor. Sasha _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
