From patchwork Fri Dec 16 18:54:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Bates X-Patchwork-Id: 9478469 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D30A6607EE for ; Fri, 16 Dec 2016 19:50:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C48781FE6A for ; Fri, 16 Dec 2016 19:50:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B733A286EE; Fri, 16 Dec 2016 19:50:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BC2C1FE6A for ; Fri, 16 Dec 2016 19:50:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758189AbcLPTt7 (ORCPT ); Fri, 16 Dec 2016 14:49:59 -0500 Received: from gateway30.websitewelcome.com ([192.185.150.24]:37484 "EHLO gateway30.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754556AbcLPTt7 (ORCPT ); Fri, 16 Dec 2016 14:49:59 -0500 X-Greylist: delayed 1787 seconds by postgrey-1.27 at vger.kernel.org; Fri, 16 Dec 2016 14:49:59 EST Received: from cm6.websitewelcome.com (cm6.websitewelcome.com [108.167.139.19]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 6A14360D8F for ; Fri, 16 Dec 2016 12:54:58 -0600 (CST) Received: from estate.websitewelcome.com ([192.185.83.90]) by cm6.websitewelcome.com with id Liux1u0071wvuag01iuylc; Fri, 16 Dec 2016 12:54:58 -0600 Received: from lambic.deltatee.com ([207.54.116.65]:53010 helo=cgy1-donard.priv.deltatee.com) by estate.websitewelcome.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.87) (envelope-from ) id 1cHxei-000MJb-57; Fri, 16 Dec 2016 12:54:56 -0600 From: Stephen Bates To: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, axboe@fb.com Cc: sagi@grimberg.me, james_p_freyensee@linux.intel.com, jonathan.derrick@intel.com, Stephen Bates Subject: [PATCH 1/2] nvme : Use correct scnprintf in cmb show Date: Fri, 16 Dec 2016 11:54:50 -0700 Message-Id: <1481914491-21456-2-git-send-email-sbates@raithlin.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1481914491-21456-1-git-send-email-sbates@raithlin.com> References: <1481914491-21456-1-git-send-email-sbates@raithlin.com> 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: X-Source-Args: X-Source-Dir: 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: 12 X-Source-Cap: cmFpdGhsaW47c2NvdHQ7ZXN0YXRlLndlYnNpdGV3ZWxjb21lLmNvbQ== Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);