On Tue, 20 Mar 2018 11:43:34 +0530
Raju Rangoju <ra...@chelsio.com> 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

Reply via email to