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


Groups > linux.kernel > #1543716

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

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!feeds.phibee-telecom.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Stephen Bates <sbates@raithlin.com>
Newsgroups linux.kernel
Subject [PATCH 1/2] nvme : Use correct scnprintf in cmb show
Date Fri, 16 Dec 2016 20:50:02 +0100
Message-ID <sP6FY-7TO-3@gated-at.bofh.it> (permalink)
References <sP6mB-7Nv-9@gated-at.bofh.it>
X-Original-To linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, axboe@fb.com
X-Mailer git-send-email 2.1.4
X-Antiabuse This header was added to track abuse, please include it with any abuse report
X-Antiabuse Primary Hostname - estate.websitewelcome.com
X-Antiabuse Original Domain - vger.kernel.org
X-Antiabuse Originator/Caller UID/GID - [47 12] / [47 12]
X-Antiabuse Sender Address Domain - raithlin.com
X-Bwhitelist no
X-Source-IP 207.54.116.65
X-Exim-ID 1cHxei-000MJb-57
X-Source-Sender lambic.deltatee.com (cgy1-donard.priv.deltatee.com) [207.54.116.65]:53010
X-Source-Auth sbates@raithlin.com
X-Email-Count 14
X-Source-Cap cmFpdGhsaW47c2NvdHQ7ZXN0YXRlLndlYnNpdGV3ZWxjb21lLmNvbQ==
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 32
Organization linux.* mail to news gateway
X-Original-Cc sagi@grimberg.me, james_p_freyensee@linux.intel.com, jonathan.derrick@intel.com, Stephen Bates <sbates@raithlin.com>
X-Original-Date Fri, 16 Dec 2016 11:54:50 -0700
X-Original-Message-ID <1481914491-21456-2-git-send-email-sbates@raithlin.com>
X-Original-References <1481914491-21456-1-git-send-email-sbates@raithlin.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1543716

Show key headers only | View raw


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

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[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

csiph-web