[PATCH] drm: gem-cma: Fix warnings due to improper printk formats

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Apr 2 17:21:10 PDT 2014


Hi Dave,

Could you please take this patch in your tree ?

What's the expected process when sending patches to the mailing list by the 
way ? Do you track them somehow, or always expect pull requests ?

On Tuesday 04 March 2014 19:10:17 Laurent Pinchart wrote:
> Use the %pad printk specifier to print dma_addr_t variables. This fixes
> warnings on platforms where dma_addr_t has a different size than int or
> size_t.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>
> ---
>  drivers/gpu/drm/drm_gem_cma_helper.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c
> b/drivers/gpu/drm/drm_gem_cma_helper.c index 6b51bf9..c049e5b 100644
> --- a/drivers/gpu/drm/drm_gem_cma_helper.c
> +++ b/drivers/gpu/drm/drm_gem_cma_helper.c
> @@ -292,9 +292,9 @@ void drm_gem_cma_describe(struct drm_gem_cma_object
> *cma_obj, struct seq_file *m
> 
>  	off = drm_vma_node_start(&obj->vma_node);
> 
> -	seq_printf(m, "%2d (%2d) %08llx %08Zx %p %d",
> +	seq_printf(m, "%2d (%2d) %08llx %pad %p %d",
>  			obj->name, obj->refcount.refcount.counter,
> -			off, cma_obj->paddr, cma_obj->vaddr, obj->size);
> +			off, &cma_obj->paddr, cma_obj->vaddr, obj->size);
> 
>  	seq_printf(m, "\n");
>  }
> @@ -342,7 +342,7 @@ drm_gem_cma_prime_import_sg_table(struct drm_device
> *dev, size_t size, cma_obj->paddr = sg_dma_address(sgt->sgl);
>  	cma_obj->sgt = sgt;
> 
> -	DRM_DEBUG_PRIME("dma_addr = 0x%x, size = %zu\n", cma_obj->paddr, size);
> +	DRM_DEBUG_PRIME("dma_addr = %pad, size = %zu\n", &cma_obj->paddr, size);
> 
>  	return &cma_obj->base;
>  }

-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list