57b4d1cc5a14410473e218d9dc8bd3e04633da84
[openwrt/staging/yousong.git] /
1 From aff2333a8ffe1dffd7b843872682278d335ee60c Mon Sep 17 00:00:00 2001
2 From: Boris BREZILLON <boris.brezillon@free-electrons.com>
3 Date: Wed, 1 Nov 2017 10:57:31 +0100
4 Subject: [PATCH 178/454] drm/vc4: Fix wrong printk format in
5 vc4_bo_stats_debugfs()
6
7 vc4->purgeable.size and vc4->purgeable.purged_size are size_t fields
8 and should be printed with a %zd specifier.
9
10 Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
11 Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
12 Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
13 Reviewed-by: Eric Anholt <eric@anholt.net>
14 Link: https://patchwork.freedesktop.org/patch/msgid/20171101095731.14878-1-boris.brezillon@free-electrons.com
15 (cherry picked from commit 50f365cde4ffb5ae70c3f02384bbb46698aba65c)
16 ---
17 drivers/gpu/drm/vc4/vc4_bo.c | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20 --- a/drivers/gpu/drm/vc4/vc4_bo.c
21 +++ b/drivers/gpu/drm/vc4/vc4_bo.c
22 @@ -88,11 +88,11 @@ int vc4_bo_stats_debugfs(struct seq_file
23
24 mutex_lock(&vc4->purgeable.lock);
25 if (vc4->purgeable.num)
26 - seq_printf(m, "%30s: %6dkb BOs (%d)\n", "userspace BO cache",
27 + seq_printf(m, "%30s: %6zdkb BOs (%d)\n", "userspace BO cache",
28 vc4->purgeable.size / 1024, vc4->purgeable.num);
29
30 if (vc4->purgeable.purged_num)
31 - seq_printf(m, "%30s: %6dkb BOs (%d)\n", "total purged BO",
32 + seq_printf(m, "%30s: %6zdkb BOs (%d)\n", "total purged BO",
33 vc4->purgeable.purged_size / 1024,
34 vc4->purgeable.purged_num);
35 mutex_unlock(&vc4->purgeable.lock);