Subject: Re: [PATCH v2 net-next 2/5] cxgb4: Add support to initialise/read SRQ entries

From: Stefano Brivio <[email-masked]>
Date: Tue, 20 Mar 2018 07:58:39 +0100

On Tue, 20 Mar 2018 11:43:34 +0530
Raju Rangoju <[email-masked]> wrote:

> +struct srq_data *t4_init_srq(int srq_size)
> +{
> +	struct srq_data *s;
> +
> +	s = kzalloc(sizeof(*s), GFP_KERNEL | __GFP_NOWARN);
> +	if (!s)
> +		s = kvzalloc(sizeof(*s), GFP_KERNEL);
> +	if (!s)
> +		return NULL;

I meant: you can replace this whole fragment by kzalloc(), which does
what you want, in the right way. LWN has a nice write-up at:
https://lwn.net/Articles/711653/

-- 
Stefano