Skip to content

Commit

Permalink
drm: gem-cma: Fix warnings due to improper printk formats
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Laurent Pinchart authored and Dave Airlie committed Apr 4, 2014
1 parent b65e64f commit f4d1b02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/drm_gem_cma_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,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");
}
Expand Down Expand Up @@ -332,7 +332,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;
}
Expand Down

0 comments on commit f4d1b02

Please sign in to comment.