/* A list of QPs will be attached to this structure.  */
static struct ipath_mcast* ipath_mcast_alloc(union ib_gid *mgid)
/* A list of QPs will be attached to this structure.  */
static struct ipath_mcast* ipath_mcast_alloc(union ib_gid *mgid)
{
	struct ipath_mcast *mcast;
	mcast = kmalloc(sizeof *mcast, GFP_KERNEL);
	if (!mcast)
		goto bail;
	mcast->mgid = *mgid;
	INIT_LIST_HEAD(&mcast->qp_list);
	init_waitqueue_head(&mcast->wait);
	atomic_set(&mcast->refcount, 0);
	mcast->n_attached = 0;
bail:
	return mcast;
}