public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Insu Yun <wuninsu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	taesoo-/4noJB3qBVQ3uPMLIKxrzw@public.gmane.org,
	yeongjin.jang-/4noJB3qBVQ3uPMLIKxrzw@public.gmane.org,
	insu-/4noJB3qBVQ3uPMLIKxrzw@public.gmane.org,
	changwoo-/4noJB3qBVQ3uPMLIKxrzw@public.gmane.org
Subject: Re: [PATCH] nes: handling failed allocation when creating workqueue
Date: Thu, 18 Feb 2016 12:45:43 -0500	[thread overview]
Message-ID: <56C60347.7040506@redhat.com> (raw)
In-Reply-To: <20160218045905.GF30450-2ukJVAZIZ/Y@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

On 2/17/2016 11:59 PM, Leon Romanovsky wrote:
> Please see my minor comments below.
> Reviewed-by: Leon Romanovsky <leon-2ukJVAZIZ/Y@public.gmane.org>
> 
> On Wed, Feb 17, 2016 at 01:06:33PM -0500, Insu Yun wrote:
>> Since create_singlethread_workqueue uses kzalloc internally, 
>> it can be failed in memory pressure, so need to handle it.
> 
> s/can be failed/can fail/
> 
>>
>> Signed-off-by: Insu Yun <wuninsu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>>  drivers/infiniband/hw/nes/nes_cm.c | 13 ++++++++++++-
>>  1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
>> index cb9f0f2..23afad6 100644
>> --- a/drivers/infiniband/hw/nes/nes_cm.c
>> +++ b/drivers/infiniband/hw/nes/nes_cm.c
>> @@ -2833,7 +2833,7 @@ static struct nes_cm_core *nes_cm_alloc_core(void)
>>  	/* alloc top level core control structure */
>>  	cm_core = kzalloc(sizeof(*cm_core), GFP_KERNEL);
>>  	if (!cm_core)
>> -		return NULL;
>> +		goto enomem_3;
> 
> IMHO, there is no need to define goto label for one return.

I made the touchups Leon suggested, and a touchup of my own, but it is
now applied, thanks.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

      parent reply	other threads:[~2016-02-18 17:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 18:06 [PATCH] nes: handling failed allocation when creating workqueue Insu Yun
     [not found] ` <1455732393-11029-1-git-send-email-wuninsu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-02-18  4:59   ` Leon Romanovsky
     [not found]     ` <20160218045905.GF30450-2ukJVAZIZ/Y@public.gmane.org>
2016-02-18 17:45       ` Doug Ledford [this message]

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=56C60347.7040506@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=changwoo-/4noJB3qBVQ3uPMLIKxrzw@public.gmane.org \
    --cc=faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=insu-/4noJB3qBVQ3uPMLIKxrzw@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=taesoo-/4noJB3qBVQ3uPMLIKxrzw@public.gmane.org \
    --cc=wuninsu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=yeongjin.jang-/4noJB3qBVQ3uPMLIKxrzw@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox