diff mbox

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

Message ID 1393956617-10616-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com (mailing list archive)
State New, archived
Headers show

Commit Message

Laurent Pinchart March 4, 2014, 6:10 p.m. UTC
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@ideasonboard.com>
---
 drivers/gpu/drm/drm_gem_cma_helper.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Laurent Pinchart April 3, 2014, 12:21 a.m. UTC | #1
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@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;
>  }
Dave Airlie April 3, 2014, 10:01 p.m. UTC | #2
On Thu, Apr 3, 2014 at 10:21 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> 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 ?

I generally pick up things with reviewed tags if I can, other stuff I
pick up in cycles from patchwork, but since patchwork is mostly
unmaintained sometimes things fall through the cracks,

so pull reqs of reviewed patches generally always win, but for fixes
like this I don't mind pull reqs if they've hit the list and haven't
cause much discussion.

Dave.
Laurent Pinchart April 3, 2014, 10:13 p.m. UTC | #3
Hi Dave,

On Friday 04 April 2014 08:01:15 Dave Airlie wrote:
> On Thu, Apr 3, 2014 at 10:21 AM, Laurent Pinchart wrote:
> > 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 ?
> 
> I generally pick up things with reviewed tags if I can, other stuff I
> pick up in cycles from patchwork, but since patchwork is mostly
> unmaintained sometimes things fall through the cracks,
> 
> so pull reqs of reviewed patches generally always win, but for fixes
> like this I don't mind pull reqs if they've hit the list and haven't
> cause much discussion.

Thank you for the clarification. I assume you'll take this one manually, I'll 
send pull requests in the future.
diff mbox

Patch

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;
 }