From: Jens Axboe <axboe@fb.com>
To: Xianting Tian <tian.xianting@h3c.com>, <kbusch@kernel.org>,
<hch@lst.de>, <sagi@grimberg.me>
Cc: <linux-kernel@vger.kernel.org>, <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH] nvme: use kobj_to_dev() to get device
Date: Fri, 4 Sep 2020 09:17:29 -0600 [thread overview]
Message-ID: <de7cca47-16ea-c0f9-6c48-ef71b51f3554@fb.com> (raw)
In-Reply-To: <20200904150140.12717-1-tian.xianting@h3c.com>
On 9/4/20 9:01 AM, Xianting Tian wrote:
> We already has the interface kobj_to_dev(), which can be used to get
> 'struct device *' from kobj, so use it.
Let's please not, this is immediately obvious what it does:
struct device *dev = container_of(kobj, struct device, kobj);
while this one is totally not:
struct device *dev = kobj_to_dev(kobj);
Any sort of privte whatever_to_foo() should be removed from the tree,
imho.
--
Jens Axboe
prev parent reply other threads:[~2020-09-04 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 15:01 Xianting Tian
2020-09-04 15:17 ` Jens Axboe [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=de7cca47-16ea-c0f9-6c48-ef71b51f3554@fb.com \
--to=axboe@fb.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=tian.xianting@h3c.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
all inboxes | Powered by JetHome®