From: Tejun Heo <tj@kernel.org>
To: Xiongwei Song <sxwjean@me.com>
Cc: guro@fb.com, longman@redhat.com, davem@davemloft.net,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
sxwjean@gmail.com
Subject: Re: [PATCH] cgroup: remove incorrect check on the return value of css_alloc
Date: Mon, 22 Jan 2018 07:55:59 -0800 [thread overview]
Message-ID: <20180122155559.GC1096857@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <20180122133851.19772-1-sxwjean@me.com>
Hello,
On Mon, Jan 22, 2018 at 09:38:51PM +0800, Xiongwei Song wrote:
> The function css_alloc never return NULL, it may return normal pointer or
It's a calling a controller implemented method. I'd much rather keep
the extra protection.
> error codes that made by ERR_PTR, so !css is always false, we need use
> IS_ERR to check it, and if this is true, we should use ERR_CAST handle it.
It's of the same type. Why would it need casting?
Thanks.
--
tejun
next prev parent reply other threads:[~2018-01-22 15:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 13:38 Xiongwei Song
2018-01-22 15:55 ` Tejun Heo [this message]
2018-01-22 23:21 ` Xiongwei Song
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=20180122155559.GC1096857@devbig577.frc2.facebook.com \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=guro@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=sxwjean@gmail.com \
--cc=sxwjean@me.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome