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: 117791 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2032442qgn; Thu, 2 Nov 2017 04:21:24 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RCUw5oaURlI5y6pDpoYsb5wTLz4pq6mk32sHp1X+OiVD1cBHWALBu/8Txj+zovFgVlyPmQ X-Received: by 10.99.4.129 with SMTP id 123mr3191899pge.20.1509621683940; Thu, 02 Nov 2017 04:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509621683; cv=none; d=google.com; s=arc-20160816; b=zYR1e9o4KpYll2rN6Xo1p90GCbHbMGTmfEP1b6gpKZnuv8PHMM7oGfYgaXmfTmZXd0 wtTRNgTQxNTxdUy307KyJP+Zkvi2uCo0EmsmVYk2DCSmdeBNbpWTMBtBw/fyPV19/IMA IRyL9Nc9EDkIehrE5wt6h7qv/Zh8oso5MmHHQSE4Q7whB/f6Fob/5LfqneUrhQ9aYghJ rhVmv+N2k7hOY4TdSJlRrB/Nbg2o/nHy5FT6qhJbgvffW4Owq2rhNZ08wmGj+Tg/NZZs JQnj8uQi7Y7CNmsOGrZsc6ABjx6dfVBKGxklS4omxrSSbx09E1yqmxAD11MVy2Byen+E l7dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=82USR0mgdYQ2tanoRaMtByj0anmUwrrqjkva++BTrUU=; b=fbn355cRyzria8tdm98OnDZ6VYBpjWwqfKHb2wjWUMef1qCwonwQ7LJnJER7y/3BqW uYWlHYhJ1JgoLoLMuCPsJY3DH5qSQ8qqjcx6RhRwaiKAIuNmg9Qk7hkXaoZYkHHBGyxx fatWAIeivKgQhDaz3W8wW+jVZPeQpFwWEoVwGHPqd5YQdGVj99Zlz1J5IJnX2yTyp1JC wVwMSTXu5yLjlHMNPTA6ImuIxM1T1VcNqLSEnpd7j7PauLIBt/qL3kfOoRFIv7/k5aFn AVgNRgzK6Q7WjrujyLI8zBk6VHFiae+Fi1YJkjwTCl2mUvHLXYMm0C868fwbEbjNk0Ot uFwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id n9si2233616pll.526.2017.11.02.04.21.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Nov 2017 04:21:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org 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" 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);