From: Arnd Bergmann <arnd@arndb.de>
To: Eric Anholt <eric@anholt.net>, David Airlie <airlied@linux.ie>
Cc: Arnd Bergmann <arnd@arndb.de>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Cihangir Akturk <cakturk@gmail.com>,
Dave Airlie <airlied@redhat.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm/vc4: use %z format string for size_t
Date: Thu, 2 Nov 2017 12:20:43 +0100 [thread overview]
Message-ID: <20171102112107.4058917-1-arnd@arndb.de> (raw)
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 <arnd@arndb.de>
---
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);
--
2.9.0
next reply other threads:[~2017-11-02 11:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 11:20 Arnd Bergmann [this message]
2017-11-02 11:56 ` Boris Brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171102112107.4058917-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=boris.brezillon@free-electrons.com \
--cc=cakturk@gmail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®