From: Keith Busch <kbusch@kernel.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-nvme@lists.infradead.org, linux-pm@vger.kernel.org,
Keith Busch <keith.busch@intel.com>,
Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
Jens Axboe <axboe@fb.com>,
Kenneth Heitke <kenneth.heitke@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Eduardo Valentin <edubezval@gmail.com>,
Minwoo Im <minwoo.im.dev@gmail.com>,
Zhang Rui <rui.zhang@intel.com>, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v2 2/4] nvme: add thermal zone infrastructure
Date: Tue, 21 May 2019 10:15:32 -0600 [thread overview]
Message-ID: <20190521161532.GD1639@localhost.localdomain> (raw)
In-Reply-To: <1558454649-28783-3-git-send-email-akinobu.mita@gmail.com>
On Wed, May 22, 2019 at 01:04:07AM +0900, Akinobu Mita wrote:
> +int nvme_thermal_zones_register(struct nvme_ctrl *ctrl)
> +{
> + struct nvme_smart_log *log;
> + int ret;
> + int i;
> +
> + log = kzalloc(sizeof(*log), GFP_KERNEL);
> + if (!log)
> + return 0; /* non-fatal error */
> +
> + ret = nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_SMART, 0,
> + log, sizeof(*log), 0);
> + if (ret) {
> + dev_err(ctrl->device, "Failed to get SMART log: %d\n", ret);
> + ret = ret > 0 ? -EINVAL : ret;
A ret > 0 means the device provided a response, so don't return a
negative for that condition, please. That's just going to break
controllers that don't provide smart data, like qemu.
next prev parent reply other threads:[~2019-05-21 16:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 16:04 [PATCH v2 0/4] nvme: add thermal zone devices Akinobu Mita
2019-05-21 16:04 ` [PATCH v2 1/4] nvme: Export get and set features Akinobu Mita
2019-05-21 17:23 ` Chaitanya Kulkarni
2019-05-22 15:24 ` Akinobu Mita
2019-05-21 16:04 ` [PATCH v2 2/4] nvme: add thermal zone infrastructure Akinobu Mita
2019-05-21 16:15 ` Keith Busch [this message]
2019-05-22 15:44 ` Akinobu Mita
2019-05-22 15:44 ` Keith Busch
2019-05-22 15:52 ` Akinobu Mita
2019-05-21 21:05 ` Heitke, Kenneth
2019-05-22 15:23 ` Akinobu Mita
2019-05-24 2:35 ` Eduardo Valentin
2019-05-24 13:57 ` Akinobu Mita
2019-06-03 2:18 ` Eduardo Valentin
2019-06-03 15:03 ` Akinobu Mita
2019-05-21 16:04 ` [PATCH v2 3/4] nvme: notify thermal framework when temperature threshold events occur Akinobu Mita
2019-05-21 16:04 ` [PATCH v2 4/4] nvme-pci: support thermal zone Akinobu Mita
2019-05-22 17:46 ` Christoph Hellwig
2019-05-23 14:21 ` Akinobu Mita
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=20190521161532.GD1639@localhost.localdomain \
--to=kbusch@kernel.org \
--cc=Chaitanya.Kulkarni@wdc.com \
--cc=akinobu.mita@gmail.com \
--cc=axboe@fb.com \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=hch@lst.de \
--cc=keith.busch@intel.com \
--cc=kenneth.heitke@intel.com \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=minwoo.im.dev@gmail.com \
--cc=rui.zhang@intel.com \
--cc=sagi@grimberg.me \
/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;
as well as URLs for NNTP newsgroup(s).