All of lore.kernel.org
 help / color / mirror / Atom feed
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>

  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] <1497078304-5440-1-git-send-email-a.dawn@samsung.com>
     [not found] ` <CGME20170707114112epcas1p293dc44953b942eab9d24fcba69d0fb33@epcas1p2.samsung.com>
2017-07-07 11:41   ` [PATCH v4 0/1]Add Support for FW activation without reset Arnav Dawn
     [not found]     ` <CGME20170707114212epcas5p20d9752501fcfb6a06c460c25a593b0e6@epcas5p2.samsung.com>
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
     [not found]     ` <CGME20170711134400epcas5p305b45833e74d9189db6cc863e1c3abd7@epcas5p3.samsung.com>
2017-07-11 13:44       ` [PATCH v5 0/1] Add Support " Arnav Dawn
     [not found]         ` <CGME20170711134755epcas1p1d699b8c70dab6fcde72ea92d03f76079@epcas1p1.samsung.com>
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
     [not found]         ` <CGME20170712103833epcas1p27a75eeadc18428fc5c94c00b64933898@epcas1p2.samsung.com>
2017-07-12 10:39           ` [PATCH v5 0/2] Add Support " Arnav Dawn
2017-07-12 10:44             ` Sagi Grimberg
     [not found]         ` <CGME20170712103908epcas5p26400969af8d15bc84c72cf2ef6c3f8d7@epcas5p2.samsung.com>
2017-07-12 10:40           ` [PATCH v5 1/2] nvme: Add support " Arnav Dawn
     [not found]         ` <CGME20170712104016epcas5p2f0a41b2c647aac7008f340d5b0c1ee0f@epcas5p2.samsung.com>
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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.