[ewg] [PATCHv8 02/11] ib_core: IBoE support only QP1

Eli Cohen eli at dev.mellanox.co.il
Thu May 6 07:28:49 PDT 2010


On Wed, May 05, 2010 at 04:12:15PM -0700, Roland Dreier wrote:
>  > @@ -795,11 +799,12 @@ static void mcast_add_one(struct ib_device *device)
>  >  	struct mcast_device *dev;
>  >  	struct mcast_port *port;
>  >  	int i;
>  > +	int count = 0;
>  >  
>  >  	if (rdma_node_get_transport(device->node_type) != RDMA_TRANSPORT_IB)
>  >  		return;
>  >  
>  > -	dev = kmalloc(sizeof *dev + device->phys_port_cnt * sizeof *port,
>  > +	dev = kzalloc(sizeof *dev + device->phys_port_cnt * sizeof *port,
> 
>  > @@ -1007,7 +1010,7 @@ static void ib_sa_add_one(struct ib_device *device)
>  >  		e = device->phys_port_cnt;
>  >  	}
>  >  
>  > -	sa_dev = kmalloc(sizeof *sa_dev +
>  > +	sa_dev = kzalloc(sizeof *sa_dev +
> 
> Do you happen to remember why you needed these kmalloc -> kzalloc conversions?

I can't remember why. I do have this habbit of prefering kzalloc
over kmalloc because it saves troubles sometimes.



More information about the ewg mailing list