linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Derrick <jonathan.derrick@intel.com>
To: Stephen Bates <sbates@raithlin.com>
Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
	linux-block@vger.kernel.org, axboe@fb.com, sagi@grimberg.me,
	james_p_freyensee@linux.intel.com
Subject: Re: [PATCH 1/2] nvme : Use correct scnprintf in cmb show
Date: Mon, 19 Dec 2016 08:20:14 -0700	[thread overview]
Message-ID: <20161219152013.GA3512@localhost.localdomain> (raw)
In-Reply-To: <1481914491-21456-2-git-send-email-sbates@raithlin.com>

Looks good. Thanks Stephen.

Reviewed-by Jon Derrick: <jonathan.derrick@intel.com>

On Fri, Dec 16, 2016 at 11:54:50AM -0700, Stephen Bates wrote:
> Make sure we are using the correct scnprintf in the sysfs show
> function for the CMB.
> 
> Signed-off-by: Stephen Bates <sbates@raithlin.com>
> ---
>  drivers/nvme/host/pci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 5e52034..be10860 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -50,7 +50,7 @@
>  #define NVME_AQ_DEPTH		256
>  #define SQ_SIZE(depth)		(depth * sizeof(struct nvme_command))
>  #define CQ_SIZE(depth)		(depth * sizeof(struct nvme_completion))
> -		
> +
>  /*
>   * We handle AEN commands ourselves and don't even let the
>   * block layer know about them.
> @@ -1332,7 +1332,7 @@ static ssize_t nvme_cmb_show(struct device *dev,
>  {
>  	struct nvme_dev *ndev = to_nvme_dev(dev_get_drvdata(dev));
>  
> -	return snprintf(buf, PAGE_SIZE, "cmbloc : x%08x\ncmbsz  : x%08x\n",
> +	return scnprintf(buf, PAGE_SIZE, "cmbloc : x%08x\ncmbsz  : x%08x\n",
>  		       ndev->cmbloc, ndev->cmbsz);
>  }
>  static DEVICE_ATTR(cmb, S_IRUGO, nvme_cmb_show, NULL);
> -- 
> 2.1.4
> 

  reply	other threads:[~2016-12-19 15:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 18:54 [PATCH 0/2] nvme: Improvements in sysfs entry for NVMe CMBs Stephen Bates
2016-12-16 18:54 ` [PATCH 1/2] nvme : Use correct scnprintf in cmb show Stephen Bates
2016-12-19 15:20   ` Jon Derrick [this message]
2016-12-16 18:54 ` [PATCH 2/2] nvme: improve cmb sysfs reporting Stephen Bates
2016-12-19 15:42   ` Jon Derrick
2017-01-09 19:37     ` Stephen Bates
2016-12-16 19:23 ` [PATCH 0/2] nvme: Improvements in sysfs entry for NVMe CMBs Jens Axboe
2016-12-16 19:37   ` Stephen Bates
2016-12-19 15:36 ` Jens Axboe
2017-01-09 19:35   ` Stephen Bates

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=20161219152013.GA3512@localhost.localdomain \
    --to=jonathan.derrick@intel.com \
    --cc=axboe@fb.com \
    --cc=james_p_freyensee@linux.intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=sbates@raithlin.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;
as well as URLs for NNTP newsgroup(s).