[media] mtk-vcodec: fix more type mismatches

The newly added mtk-vcodec driver produces a number of warnings in an
ARM allmodconfig build, mainly since it assumes that dma_addr_t is
32-bit wide:

mtk-vcodec/venc/venc_vp8_if.c: In function 'vp8_enc_alloc_work_buf':
mtk-vcodec/venc/venc_vp8_if.c:212:191: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
mtk-vcodec/venc/venc_h264_if.c: In function 'h264_enc_alloc_work_buf':
mtk-vcodec/venc/venc_h264_if.c:297:190: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

This rearranges the format strings and type casts to what they should
have been in order to avoid the warnings. e0f80d8d62 ("[media]
mtk-vcodec: fix two compiler warnings") fixed some of the problems that
were introduced at the same time, but missed two others.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Arnd Bergmann 2016-07-13 05:47:40 -03:00 committed by Mauro Carvalho Chehab
parent 4f253cecf8
commit 19e476c7b0
2 changed files with 4 additions and 4 deletions

View File

@ -295,9 +295,9 @@ static int h264_enc_alloc_work_buf(struct venc_h264_inst *inst)
wb[i].iova = inst->work_bufs[i].dma_addr;
mtk_vcodec_debug(inst,
"work_buf[%d] va=0x%p iova=0x%p size=%zu",
"work_buf[%d] va=0x%p iova=%pad size=%zu",
i, inst->work_bufs[i].va,
(void *)inst->work_bufs[i].dma_addr,
&inst->work_bufs[i].dma_addr,
inst->work_bufs[i].size);
}

View File

@ -210,9 +210,9 @@ static int vp8_enc_alloc_work_buf(struct venc_vp8_inst *inst)
wb[i].iova = inst->work_bufs[i].dma_addr;
mtk_vcodec_debug(inst,
"work_bufs[%d] va=0x%p,iova=0x%p,size=%zu",
"work_bufs[%d] va=0x%p,iova=%pad,size=%zu",
i, inst->work_bufs[i].va,
(void *)inst->work_bufs[i].dma_addr,
&inst->work_bufs[i].dma_addr,
inst->work_bufs[i].size);
}