Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1543716 > unrolled thread

[PATCH 1/2] nvme : Use correct scnprintf in cmb show

Started byStephen Bates <sbates@raithlin.com>
First post2016-12-16 20:50 +0100
Last post2016-12-19 16:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/2] nvme : Use correct scnprintf in cmb show Stephen Bates <sbates@raithlin.com> - 2016-12-16 20:50 +0100
    Re: [PATCH 1/2] nvme : Use correct scnprintf in cmb show Jon Derrick <jonathan.derrick@intel.com> - 2016-12-19 16:30 +0100

#1543716 — [PATCH 1/2] nvme : Use correct scnprintf in cmb show

FromStephen Bates <sbates@raithlin.com>
Date2016-12-16 20:50 +0100
Subject[PATCH 1/2] nvme : Use correct scnprintf in cmb show
Message-ID<sP6FY-7TO-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1544616

FromJon Derrick <jonathan.derrick@intel.com>
Date2016-12-19 16:30 +0100
Message-ID<sQ830-1eW-3@gated-at.bofh.it>
In reply to#1543716
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
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web