From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH v5 1/1] nvme: Add support for FW activation without reset
Date: Wed, 12 Jul 2017 09:34:21 +0200 [thread overview]
Message-ID: <20170712073421.GA6469@lst.de> (raw)
In-Reply-To: <1499780912-10253-1-git-send-email-a.dawn@samsung.com>
> }
>
> +
> +static bool nvme_ctrl_pp_status(struct nvme_ctrl *ctrl)
This adds a duplicate empty line.
> +{
> +
> + u32 csts;
> +
> + if (ctrl->ops->reg_read32(ctrl, NVME_REG_CSTS, &csts))
> + return false;
> +
> + if (csts == ~0)
> + return false;
> +
> + return ((ctrl->ctrl_config & NVME_CC_ENABLE)
> + && (csts & NVME_CSTS_PP));
These should be on one line, and if if they weren't the "&&" placement
is wrong.
> +}
> +static __le32 nvme_get_log_dw10(u8 lid, int size)
> +{
> + return cpu_to_le32((((size / 4) - 1) << 16) | lid);
> +}
Can you move this up the file a bit so that it's not hidden inside
the FW activation bits. Also size should be of type size_t.
> + c.common.nsid = cpu_to_le32(0xFFFFFFFF);
Except for one weird spot we use lower-cases hex numbers. But in
the longer run we really should have an NVME_NSID_ALL define for this
constant..
Otherwise this looks fine to me:
Reviewed-by: Christoph Hellwig <hch at lst.de>
next prev parent reply other threads:[~2017-07-12 7:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170707114112epcas1p293dc44953b942eab9d24fcba69d0fb33@epcas1p2.samsung.com>
[not found] ` <1497078304-5440-1-git-send-email-a.dawn@samsung.com>
2017-07-07 11:41 ` [PATCH v4 0/1]Add Support for FW activation without reset Arnav Dawn
2017-07-07 11:42 ` [PATCH v4 1/1] nvme: Add support " Arnav Dawn
2017-07-07 14:22 ` Christoph Hellwig
2017-07-07 15:19 ` Keith Busch
2017-07-11 13:44 ` [PATCH v5 0/1] Add Support " Arnav Dawn
2017-07-11 13:48 ` [PATCH v5 1/1] nvme: Add support " Arnav Dawn
2017-07-11 14:36 ` Keith Busch
2017-07-12 7:34 ` Christoph Hellwig [this message]
2017-07-12 10:32 ` Sagi Grimberg
2017-07-12 10:44 ` Arnav Dawn
2017-07-12 10:39 ` [PATCH v5 0/2] Add Support " Arnav Dawn
2017-07-12 10:44 ` Sagi Grimberg
2017-07-12 10:40 ` [PATCH v5 1/2] nvme: Add support " Arnav Dawn
2017-07-12 10:41 ` [PATCH v5 2/2] nvme: Define NVME_NSID_ALL Arnav Dawn
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=20170712073421.GA6469@lst.de \
--to=hch@lst.de \
/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