From patchwork Thu Nov 2 11:20:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10038521 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 7997B6032D for ; Thu, 2 Nov 2017 11:21:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E83C285CC for ; Thu, 2 Nov 2017 11:21:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 632B528618; Thu, 2 Nov 2017 11:21:24 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 09D17285CC for ; Thu, 2 Nov 2017 11:21:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 51E9F6E076; Thu, 2 Nov 2017 11:21:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E2006E05E for ; Thu, 2 Nov 2017 11:21:19 +0000 (UTC) Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0MTL2h-1dkX9m1aFz-00SLV7; Thu, 02 Nov 2017 12:21:09 +0100 From: Arnd Bergmann To: Eric Anholt , David Airlie Subject: [PATCH] drm/vc4: use %z format string for size_t Date: Thu, 2 Nov 2017 12:20:43 +0100 Message-Id: <20171102112107.4058917-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:C/BNayU9EHXYgYcCTIIB3oy0zxJWs40qGHag4xOspm9a5tYAXSJ wIqMBUf22nqqIopQeHRHaeSrar6WQoWklSccqNaK1wHpKwGyMyGiBYBzojMDW7z9vq8qyDH ROixewbzLraQCqvOec/KCkww47lh0+4yJBiwSty8QGUjbvVoN6dhtXPhh1iCie9TSOokKTs I6aNurFTTXJGjzI5+X2Vw== X-UI-Out-Filterresults: notjunk:1; V01:K0:O7B1SYAYvJ4=:cMIKZbaIN5uEYSIY1Rq8ei tXNdUFZSABeEdKeevZQNZ9FEorT0DROnLipQoQBPagRE00xhyRlp88Jnb+jxab4WGvt2gdWid 929Kfq9QQjRyWSDuxFy/nOwIn0xf1c9e1YYvIZSCMLPeyWQWLSgfuToPfpHHdp33EjsrN0ecP 9BzdbRhwOMNP/glZVfWIjPYAMW3pbrh5fQPKNiHzCOdCk7nt09/QR/YHsRHBBnzbuFGThyJRt thZr8bZK32S0wi9prsd/BMgr7weNiF9HQuddVK/ttylHYf6n6FCE4KiBbT/gaZFdjB8phzU2O Jhno0dmcNCHPeqPvv2Lc5K725AJtoTni3b1hWT5Rs9rFO3tpIptvi4Po8Hc65JSB1WFi22jF+ ewAf0nRLHgmuNzDIOzkLtf3tXLkB/jttKtvS8udUOt2TsQsVGKd7m5nbRPdTPAhOpETbNf9Y3 qY3waVWieimd8jT2izhiXMG1gJyCwEaJ2pmxn1WrrGlA47EEDPGMUlxEwAYjD43lGWHVYJ9kT +9N9NljcpSbjvYWAXa874T4IB+zoBzNafiaihavZHHCWc2wAa+l7rNC2CghuQHCaKQ27HuKI1 ClYPvPNp4QcLHnMdbolyS5nO1/4Ou4kTDvd94IxhfGmF0soBxyXDO8x/VYaVPmeQMTUzJfek/ GHF46F0YDtHJ1evGhPDoI8yRAs3LGcHZovuML0C0wXsF/Q1dr/IE9Zyvi+H79wRJSTZYT194P 31tlmqZYqDROg3d9uHB7BgDp8j2n2cnKMEtoFw== Cc: Boris Brezillon , Arnd Bergmann , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Cihangir Akturk , Dave Airlie X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Printing a size_t variable needs to use the %z format string modifier rather than %l, otherwise we get this warning on 64-bit architectures: drivers/gpu/drm/vc4/vc4_bo.c: In function 'vc4_bo_stats_debugfs': drivers/gpu/drm/vc4/vc4_bo.c:91:26: error: format '%d' expects argument of type 'int', but argument 4 has type 'size_t {aka long unsigned int}' [-Werror=format=] Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/vc4/vc4_bo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c index 3c3d11236910..4ae45d7dac42 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -88,11 +88,11 @@ int vc4_bo_stats_debugfs(struct seq_file *m, void *unused) mutex_lock(&vc4->purgeable.lock); if (vc4->purgeable.num) - seq_printf(m, "%30s: %6dkb BOs (%d)\n", "userspace BO cache", + seq_printf(m, "%30s: %6zdkb BOs (%d)\n", "userspace BO cache", vc4->purgeable.size / 1024, vc4->purgeable.num); if (vc4->purgeable.purged_num) - seq_printf(m, "%30s: %6dkb BOs (%d)\n", "total purged BO", + seq_printf(m, "%30s: %6zdkb BOs (%d)\n", "total purged BO", vc4->purgeable.purged_size / 1024, vc4->purgeable.purged_num); mutex_unlock(&vc4->purgeable.lock);