From patchwork Mon Jan 30 11:25:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 9544875 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 3FC2C604A8 for ; Mon, 30 Jan 2017 11:26:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47D9320265 for ; Mon, 30 Jan 2017 11:26:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AFA026E48; Mon, 30 Jan 2017 11:26:34 +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 C42D420265 for ; Mon, 30 Jan 2017 11:26:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751408AbdA3L0b (ORCPT ); Mon, 30 Jan 2017 06:26:31 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:55261 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206AbdA3L0a (ORCPT ); Mon, 30 Jan 2017 06:26:30 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1cYA6I-00019J-DQ; Mon, 30 Jan 2017 11:26:22 +0000 From: Colin King To: "Rafael J . Wysocki" , Len Brown , Dan Williams , Vishal Verma , joeyli.kernel@gmail.com, Toshi Kani , linux-acpi@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] acpi: nfit: use %u format string specifier for unsigned ints Date: Mon, 30 Jan 2017 11:25:02 +0000 Message-Id: <20170130112502.24426-1-colin.king@canonical.com> X-Mailer: git-send-email 2.10.2 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King scrub_mode and scrub_count are both unsigned ints, however, the %d format string specifier is being used instead of %u. Trivial fix, use %u. Signed-off-by: Colin Ian King --- drivers/acpi/nfit/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 2f82b8e..093b768 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -906,7 +906,7 @@ static ssize_t hw_error_scrub_show(struct device *dev, struct nvdimm_bus_descriptor *nd_desc = to_nd_desc(nvdimm_bus); struct acpi_nfit_desc *acpi_desc = to_acpi_desc(nd_desc); - return sprintf(buf, "%d\n", acpi_desc->scrub_mode); + return sprintf(buf, "%u\n", acpi_desc->scrub_mode); } /* @@ -967,7 +967,7 @@ static ssize_t scrub_show(struct device *dev, if (nd_desc) { struct acpi_nfit_desc *acpi_desc = to_acpi_desc(nd_desc); - rc = sprintf(buf, "%d%s", acpi_desc->scrub_count, + rc = sprintf(buf, "%u%s", acpi_desc->scrub_count, (work_busy(&acpi_desc->work)) ? "+\n" : "\n"); } device_unlock(dev);