From patchwork Fri Sep 8 21:08:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9945057 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 B85F260224 for ; Fri, 8 Sep 2017 21:08:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A557E2891B for ; Fri, 8 Sep 2017 21:08:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A0AA2891D; Fri, 8 Sep 2017 21:08:51 +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.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham 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 40A122891B for ; Fri, 8 Sep 2017 21:08:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EC2E521E8796D; Fri, 8 Sep 2017 14:05:57 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7886921A143F5 for ; Fri, 8 Sep 2017 14:05:56 -0700 (PDT) Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0MQNsy-1e2dJt0YWa-00TjQp; Fri, 08 Sep 2017 23:08:33 +0200 From: Arnd Bergmann To: Vishal Verma , Dan Williams Subject: [PATCH] libnvdimm, btt: use %z format string modifier for size_t Date: Fri, 8 Sep 2017 23:08:08 +0200 Message-Id: <20170908210830.525785-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:fN4EAlCNY+QEprVZmGDb1922aSyQ6q8Avr+T5tiqty6Y/B/5Q6S fxr8Zi+weM32JGpq/JE99UO/Ul6FOuQXZyV0p+2KLuRVb9qObEsBiNM4vBVMJBSnqarjvZ/ xMyGRnqoZUI9mOElgNWIN8LMvjz5rAjEk8TcfLMBu+XLu0HcJanELDfCXCwPlsy2DhVjNI1 vJsKV6gdrWNoCrFnWhwCA== X-UI-Out-Filterresults: notjunk:1; V01:K0:2lk8TC7daW8=:eWSvTeEPbWDmSuo4E40YUF pCkKfiyy6rd3488HBOBBu12XhrPO3kKXJx/ztMmTqpz2jYHJuwyA/heZ8E0g/7s2J269w6z05 iH3J+jh8dLbfpc5Iu8BiCneUjm/MEWU6OGjrkSB460VCanr8YepUJS90WVbA7ckLGeMMEZyDG D+igVZHktJ61GJ00mWoj1jNBNIYV8LAe6a+l9JwK90PcZSEJJ0SK+DiSyucilPMjVXxyzUPGM t8xQQHomegPhs4eKBAMoY2RFlN5Q9mm0606DlU3QeOcKLIK1Rb/EHYPP8ov3iuPBv8HxLTRK3 yH4Ry5Aix6dnfrFgBC4ZgYGsbL+yhSNNYb9DIZTf2/Gq0YBxJzTI554ZShKt+i+m/naFZYZzP YJyalkgRcwTXAStEOop0RuPEFxuLxonSuSfZDNTBlZUTDnrGTH1tsVnKueHRJrlD6nhYisnxj OeOCiQ7ZK83+mKDtuHiDibH7hJkUNTkZh5GpKdpAcg+NPmPGzUXH6+uwV8LeWNv25hrhfuold zDk+t/M2ssAEPqxkvnTG7bK6tQAKfkOTUDMXWyPP6g0IlbhcHPa1KmLXD5HCpXcFNl8JO1iOF fO/z2NuoO3oj0uJfLOEAj6uGJk98PjNfMbFoShyZwOeDJ90iOVurR1XBr3jkeot/13Zz5VmWa ad3AZO6Dd2jlIzPCA1eRaSrPEHH+TBMIpMbW7iOnMfchaMztYQ/C7gRsBofs95yND6NZ88b+0 zEXYcKYE5Sy7w/81F+18tAHUEFy8KLgNgWROnQ== 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: , Cc: Jens Axboe , Arnd Bergmann , linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, Dmitry Monakhov MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP We get a warning about an two incorrect format strings: drivers/nvdimm/btt.c: In function 'btt_map_init': include/linux/device.h:1472:23: error: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'size_t {aka unsigned int}' [-Werror=format=] This changes the %lx to %zx as it should be. Fixes: 86652d2eb347 ("libnvdimm, btt: clean up warning and error messages") Signed-off-by: Arnd Bergmann --- drivers/nvdimm/btt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 5bc686e9195a..d5612bd1cc81 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -428,7 +428,7 @@ static int btt_map_init(struct arena_info *arena) 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_info *arena) 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)