All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Raju Rangoju <rajur@chelsio.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	nirranjan@chelsio.com, indranil@chelsio.com,
	venkatesh@chelsio.com, swise@opengridcomputing.com,
	bharat@chelsio.com, Ganesh Goudar <ganeshgr@chelsio.com>
Subject: Re: [PATCH v2 net-next 2/5] cxgb4: Add support to initialise/read SRQ entries
Date: Tue, 20 Mar 2018 07:58:39 +0100	[thread overview]
Message-ID: <20180320075839.69dd90d4@epycfail> (raw)
In-Reply-To: <20180320061337.19296-3-rajur@chelsio.com>

On Tue, 20 Mar 2018 11:43:34 +0530
Raju Rangoju <rajur@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	other threads:[~2018-03-20  6:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20  6:13 [PATCH v2 net-next 0/5] Add support for RDMA enhancements in cxgb4 Raju Rangoju
2018-03-20  6:13 ` [PATCH v2 net-next 1/5] cxgb4: Adds CPL support for Shared Receive Queues Raju Rangoju
2018-03-20  6:13 ` [PATCH v2 net-next 2/5] cxgb4: Add support to initialise/read SRQ entries Raju Rangoju
2018-03-20  6:58   ` Stefano Brivio [this message]
2018-03-20  6:59     ` Stefano Brivio
2018-03-20 10:11       ` Raju Rangoju
2018-03-20  6:13 ` [PATCH v2 net-next 3/5] cxgb4: Add support to query HW SRQ parameters Raju Rangoju
2018-03-20  6:13 ` [PATCH v2 net-next 4/5] cxgb4: Support firmware rdma write with immediate work request Raju Rangoju
2018-03-20  6:13 ` [PATCH v2 net-next 5/5] cxgb4: Support firmware rdma write completion " Raju Rangoju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180320075839.69dd90d4@epycfail \
    --to=sbrivio@redhat.com \
    --cc=bharat@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=ganeshgr@chelsio.com \
    --cc=indranil@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=nirranjan@chelsio.com \
    --cc=rajur@chelsio.com \
    --cc=swise@opengridcomputing.com \
    --cc=venkatesh@chelsio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.