public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ed Cashin <ed.cashin@acm.org>
To: Insu Yun <wuninsu@gmail.com>, linux-kernel@vger.kernel.org
Cc: taesoo@gatech.edu, yeongjin.jang@gatech.edu, insu@gatech.edu,
	changwoo@gatech.edu
Subject: Re: [PATCH] aoe: remove unnecessary check for failing kthread creation
Date: Tue, 2 Feb 2016 20:31:29 -0500	[thread overview]
Message-ID: <56B15871.8020206@acm.org> (raw)
In-Reply-To: <1454342039-14068-1-git-send-email-wuninsu@gmail.com>

On 02/01/2016 10:53 AM, Insu Yun wrote:
> When kthread_run fails, it returns ERR, not NULL.
> Therefore, NULL checking is redundant.
> (https://www.kernel.org/doc/htmldocs/device-drivers/API-kthread-run.html)

Thanks, the change looks reasonable.

...
>   	task = kthread_run(kthread, k, "%s", k->name);
> -	if (task == NULL || IS_ERR(task))
> +	if (IS_ERR(task))
>   		return -ENOMEM;

Interestingly, after this change, it's more clear that returning
-ENOMEM is a bit misleading when the underlying kernel/kthread.c
function, kthread_create_on_node returns ERR_PTR(-EINTR).  But because
that would happen when the process we need to have the driver working
gets killed, I'm not sure it matters.

-- 
   Ed

      reply	other threads:[~2016-02-03  1:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 15:53 [PATCH] aoe: remove unnecessary check for failing kthread creation Insu Yun
2016-02-03  1:31 ` Ed Cashin [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=56B15871.8020206@acm.org \
    --to=ed.cashin@acm.org \
    --cc=changwoo@gatech.edu \
    --cc=insu@gatech.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=taesoo@gatech.edu \
    --cc=wuninsu@gmail.com \
    --cc=yeongjin.jang@gatech.edu \
    /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