> @@ -178,6 +178,7 @@ struct ib_cq *mlx4_ib_create_cq(struct i
 >      if (!cq)
 >              return ERR_PTR(-ENOMEM);
 >  
 > +    memset(cq, 0, sizeof *cq);
 >      entries      = roundup_pow_of_two(entries + 1);
 >      cq->ibcq.cqe = entries - 1;
 >      mutex_init(&cq->resize_mutex);

Why is this change necessary?

If it is necessary it would be more sensible to use kzalloc() to
allocate the structure (and get rid of the initialization to NULL of
some members too) -- that would actually shrink the code rather than
bloating it.

 - R.
_______________________________________________
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

Reply via email to