From: Laurent Pinchart Date: Tue, 4 Mar 2014 18:10:17 +0000 (+0100) Subject: drm: gem-cma: Fix warnings due to improper printk formats X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f4d1b02129d3045c20ebadda8865db2cc7ce2cb5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm: gem-cma: Fix warnings due to improper printk formats 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 Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_gem_cma_helper.c b/drivers/gpu/drm/drm_gem_cma_helper.c index fbb9df6becb0..05c97c5350a1 100644 --- a/drivers/gpu/drm/drm_gem_cma_helper.c +++ b/drivers/gpu/drm/drm_gem_cma_helper.c @@ -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"); } @@ -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; }