Skip to content

Commit

Permalink
drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs()
Browse files Browse the repository at this point in the history
vc4->purgeable.size and vc4->purgeable.purged_size are size_t fields
and should be printed with a %zd specifier.

Fixes: b9f1925 ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Gustavo Padovan <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
Boris BREZILLON committed Nov 2, 2017
1 parent 7fb50b9 commit 50f365c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/vc4/vc4_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 50f365c

Please sign in to comment.