Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759925AbcLSPUX (ORCPT ); Mon, 19 Dec 2016 10:20:23 -0500 Received: from mga03.intel.com ([134.134.136.65]:45553 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755303AbcLSPUQ (ORCPT ); Mon, 19 Dec 2016 10:20:16 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,374,1477983600"; d="scan'208";a="204561297" Date: Mon, 19 Dec 2016 08:20:14 -0700 From: Jon Derrick To: Stephen Bates 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 Message-ID: <20161219152013.GA3512@localhost.localdomain> References: <1481914491-21456-1-git-send-email-sbates@raithlin.com> <1481914491-21456-2-git-send-email-sbates@raithlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1481914491-21456-2-git-send-email-sbates@raithlin.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1255 Lines: 38 Looks good. Thanks Stephen. Reviewed-by Jon Derrick: 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 > --- > 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 >