All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs()
@ 2017-11-01  9:57 Boris Brezillon
  2017-11-01 11:55 ` Gustavo Padovan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Boris Brezillon @ 2017-11-01  9:57 UTC (permalink / raw)
  To: Eric Anholt; +Cc: David Airlie, Stephen Rothwell, dri-devel, Boris Brezillon

vc4->purgeable.size and vc4->purgeable.purged_size are size_t fields
and should be printed with a %zd specifier.

Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 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.11.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs()
  2017-11-01  9:57 [PATCH] drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs() Boris Brezillon
@ 2017-11-01 11:55 ` Gustavo Padovan
  2017-11-01 16:43 ` Eric Anholt
  2017-11-02 10:47 ` Boris Brezillon
  2 siblings, 0 replies; 4+ messages in thread
From: Gustavo Padovan @ 2017-11-01 11:55 UTC (permalink / raw)
  To: Boris Brezillon; +Cc: David Airlie, dri-devel, Stephen Rothwell

Hi Boris,

2017-11-01 Boris Brezillon <boris.brezillon@free-electrons.com>:

> vc4->purgeable.size and vc4->purgeable.purged_size are size_t fields
> and should be printed with a %zd specifier.
> 
> Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
>  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);

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>

Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs()
  2017-11-01  9:57 [PATCH] drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs() Boris Brezillon
  2017-11-01 11:55 ` Gustavo Padovan
@ 2017-11-01 16:43 ` Eric Anholt
  2017-11-02 10:47 ` Boris Brezillon
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Anholt @ 2017-11-01 16:43 UTC (permalink / raw)
  Cc: David Airlie, Stephen Rothwell, dri-devel, Boris Brezillon


[-- Attachment #1.1: Type: text/plain, Size: 370 bytes --]

Boris Brezillon <boris.brezillon@free-electrons.com> writes:

> vc4->purgeable.size and vc4->purgeable.purged_size are size_t fields
> and should be printed with a %zd specifier.
>
> Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>

Reviewed-by: Eric Anholt <eric@anholt.net>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs()
  2017-11-01  9:57 [PATCH] drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs() Boris Brezillon
  2017-11-01 11:55 ` Gustavo Padovan
  2017-11-01 16:43 ` Eric Anholt
@ 2017-11-02 10:47 ` Boris Brezillon
  2 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2017-11-02 10:47 UTC (permalink / raw)
  To: Eric Anholt; +Cc: David Airlie, Stephen Rothwell, dri-devel

On Wed,  1 Nov 2017 10:57:31 +0100
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> vc4->purgeable.size and vc4->purgeable.purged_size are size_t fields
> and should be printed with a %zd specifier.

Applied to drm-misc-next.

> 
> Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
>  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);

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-02 10:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01  9:57 [PATCH] drm/vc4: Fix wrong printk format in vc4_bo_stats_debugfs() Boris Brezillon
2017-11-01 11:55 ` Gustavo Padovan
2017-11-01 16:43 ` Eric Anholt
2017-11-02 10:47 ` Boris Brezillon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.