From patchwork Fri Sep 8 16:36:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 9944667 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 8352660224 for ; Fri, 8 Sep 2017 16:37:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CD0E1FFB7 for ; Fri, 8 Sep 2017 16:37:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 308FF2883E; Fri, 8 Sep 2017 16:37:03 +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=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CDE152883B for ; Fri, 8 Sep 2017 16:37:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B9C5721D492D3; Fri, 8 Sep 2017 09:34:09 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5856021959CAD for ; Fri, 8 Sep 2017 09:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Subject:From:To:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/OR+nR0/bqUB4G1b6bZLUN32JiQbiq3bMRga/jKrpzE=; b=rTttfay/E28OG5yMx4j+L0k7c EQCmfF5l/EPRTooxAxnny1WOevepKMsqqf3LN4GOSXFMfBfg846ShiqxiODES+B3WtPvw1GpwKG9w F3VCF16fDLrd0Kzv1IQnsxfw4M2WgoPTyj9J1u8rs2vvzjfrU2dLP9zoHDsla+/TWcnmZzEmpKQV3 EbzqNra15KK2FvvcrF/wAgS3zZ3J9A6WF8aOEpElc7Gz89u2X5wAsAl0Z9jK+uf6XWNF7ny5RxHdo 9u6skFB4sN5m7la7YD2Bh8XWL8lMrz0AKHbKTFSL9iCOSIl0S9W5u5cqJsIKPorCMKAJEMvrSeKuU vHQ8a/rmA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlap) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dqMH5-00075P-Jh; Fri, 08 Sep 2017 16:36:59 +0000 To: LKML , Vishal Verma , linux-nvdimm@lists.01.org From: Randy Dunlap Subject: [PATCH -next] nvdimm: btt.c: fix format string warnings Message-ID: Date: Fri, 8 Sep 2017 09:36:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap Fix format warnings (seen on i386) in nvdimm/btt.c: ../drivers/nvdimm/btt.c: In function ‘btt_map_init’: ../drivers/nvdimm/btt.c:430:3: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat=] dev_WARN_ONCE(to_dev(arena), size < 512, ^ ../drivers/nvdimm/btt.c: In function ‘btt_log_init’: ../drivers/nvdimm/btt.c:474:3: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat=] dev_WARN_ONCE(to_dev(arena), size < 512, ^ Signed-off-by: Randy Dunlap Cc: Vishal Verma Cc: linux-nvdimm@lists.01.org --- drivers/nvdimm/btt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-next-20170908.orig/drivers/nvdimm/btt.c +++ linux-next-20170908/drivers/nvdimm/btt.c @@ -428,7 +428,7 @@ static int btt_map_init(struct arena_inf size_t size = min(mapsize, chunk_size); dev_WARN_ONCE(to_dev(arena), size < 512, - "chunk size: %#lx is unaligned\n", size); + "chunk size: %#zx is unaligned\n", size); ret = arena_write_bytes(arena, arena->mapoff + offset, zerobuf, size, 0); if (ret) @@ -472,7 +472,7 @@ static int btt_log_init(struct arena_inf size_t size = min(logsize, chunk_size); dev_WARN_ONCE(to_dev(arena), size < 512, - "chunk size: %#lx is unaligned\n", size); + "chunk size: %#zx is unaligned\n", size); ret = arena_write_bytes(arena, arena->logoff + offset, zerobuf, size, 0); if (ret)