[opensuse-kernel] [PATCH 1/2] Factory: Use %pad format for values of the dma_addr_t type
From: "Matwey V. Kornilov" <matwey@sai.msu.ru> The format change is to fix the following compilation issue: ../drivers/gpu/drm/omapdrm/omap_plane.c: In function 'omap_plane_pre_apply': ../drivers/gpu/drm/omapdrm/omap_plane.c:145:2: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Werror=format=] DBG("%d,%d %08x %08x", info->pos_x, info->pos_y, ^ ../drivers/gpu/drm/omapdrm/omap_plane.c:145:2: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Werror=format=] cc1: all warnings being treated as errors ../scripts/Makefile.build:273: recipe for target 'drivers/gpu/drm/omapdrm/omap_plane.o' failed Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru> Patch-mainline: Submitted, 1406309856 - dri-devel@lists.freedesktop.org Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com> --- drivers/gpu/drm/omapdrm/omap_gem.c | 10 +++++----- drivers/gpu/drm/omapdrm/omap_plane.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index 95dbce2..d9f5e524 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -791,7 +791,7 @@ int omap_gem_get_paddr(struct drm_gem_object *obj, omap_obj->paddr = tiler_ssptr(block); omap_obj->block = block; - DBG("got paddr: %08x", omap_obj->paddr); + DBG("got paddr: %pad", &omap_obj->paddr); } omap_obj->paddr_cnt++; @@ -985,9 +985,9 @@ void omap_gem_describe(struct drm_gem_object *obj, struct seq_file *m) off = drm_vma_node_start(&obj->vma_node); - seq_printf(m, "%08x: %2d (%2d) %08llx %08Zx (%2d) %p %4d", + seq_printf(m, "%08x: %2d (%2d) %08llx %pad (%2d) %p %4d", omap_obj->flags, obj->name, obj->refcount.refcount.counter, - off, omap_obj->paddr, omap_obj->paddr_cnt, + off, &omap_obj->paddr, omap_obj->paddr_cnt, omap_obj->vaddr, omap_obj->roll); if (omap_obj->flags & OMAP_BO_TILED) { @@ -1467,8 +1467,8 @@ void omap_gem_init(struct drm_device *dev) entry->paddr = tiler_ssptr(block); entry->block = block; - DBG("%d:%d: %dx%d: paddr=%08x stride=%d", i, j, w, h, - entry->paddr, + DBG("%d:%d: %dx%d: paddr=%pad stride=%d", i, j, w, h, + &entry->paddr, usergart[i].stride_pfn << PAGE_SHIFT); } } diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index 3cf31ee..6af3398 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c @@ -142,8 +142,8 @@ static void omap_plane_pre_apply(struct omap_drm_apply *apply) DBG("%dx%d -> %dx%d (%d)", info->width, info->height, info->out_width, info->out_height, info->screen_width); - DBG("%d,%d %08x %08x", info->pos_x, info->pos_y, - info->paddr, info->p_uv_addr); + DBG("%d,%d %pad %pad", info->pos_x, info->pos_y, + &info->paddr, &info->p_uv_addr); /* TODO: */ ilace = false; -- 1.8.1.4 -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
From: "Matwey V. Kornilov" <matwey@sai.msu.ru> The single one use-case for data_pa member of the struct pat is to carry a value of dma_addr_t type. This patch solves the following compilation error: ../drivers/gpu/drm/omapdrm/omap_dmm_tiler.c: In function 'dmm_txn_append': ../drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:226:2: error: passing argument 3 of 'alloc_dma' from incompatible pointer type [-Werror] data = alloc_dma(txn, 4*i, &pat->data_pa); ^ ../drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:77:14: note: expected 'dma_addr_t *' but argument is of type 'uint32_t *' static void *alloc_dma(struct dmm_txn *txn, size_t sz, dma_addr_t *pa) ^ Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru> Patch-mainline: Submitted, 1406309856 - dri-devel@lists.freedesktop.org Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com> --- drivers/gpu/drm/omapdrm/omap_dmm_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_priv.h b/drivers/gpu/drm/omapdrm/omap_dmm_priv.h index 58bcd6a..4142525 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_priv.h +++ b/drivers/gpu/drm/omapdrm/omap_dmm_priv.h @@ -105,7 +105,7 @@ struct pat { uint32_t next_pa; struct pat_area area; struct pat_ctrl ctrl; - uint32_t data_pa; + dma_addr_t data_pa; }; #define DMM_FIXED_RETRY_COUNT 1000 -- 1.8.1.4 -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
participants (1)
-
Matwey V. Kornilov