* [PATCH 1/2] mtk-vcodec: fix two compiler warnings
@ 2016-07-09 7:32 Hans Verkuil
2016-07-09 7:32 ` [PATCH 2/2] mtk-vcodec: fix compiler warning Hans Verkuil
2016-07-11 3:07 ` [PATCH 1/2] mtk-vcodec: fix two compiler warnings tiffany lin
0 siblings, 2 replies; 4+ messages in thread
From: Hans Verkuil @ 2016-07-09 7:32 UTC (permalink / raw)
To: linux-media; +Cc: tiffany.lin, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
mtk-vcodec/mtk_vcodec_enc.c: In function 'mtk_venc_worker':
mtk-vcodec/mtk_vcodec_enc.c:1030:43: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'size_t {aka unsigned int}' [-Wformat=]
mtk-vcodec/mtk_vcodec_enc.c:1030:43: warning: format '%lx' expects argument of type 'long unsigned int', but argument 10 has type 'size_t {aka unsigned int}' [-Wformat=]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
index 6dcae0a..907a6d1 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
@@ -1028,7 +1028,7 @@ static void mtk_venc_worker(struct work_struct *work)
bs_buf.size = (size_t)dst_buf->planes[0].length;
mtk_v4l2_debug(2,
- "Framebuf VA=%p PA=%llx Size=0x%lx;VA=%p PA=0x%llx Size=0x%lx;VA=%p PA=0x%llx Size=%zu",
+ "Framebuf VA=%p PA=%llx Size=0x%zx;VA=%p PA=0x%llx Size=0x%zx;VA=%p PA=0x%llx Size=%zu",
frm_buf.fb_addr[0].va,
(u64)frm_buf.fb_addr[0].dma_addr,
frm_buf.fb_addr[0].size,
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] mtk-vcodec: fix compiler warning
2016-07-09 7:32 [PATCH 1/2] mtk-vcodec: fix two compiler warnings Hans Verkuil
@ 2016-07-09 7:32 ` Hans Verkuil
2016-07-11 3:06 ` tiffany lin
2016-07-11 3:07 ` [PATCH 1/2] mtk-vcodec: fix two compiler warnings tiffany lin
1 sibling, 1 reply; 4+ messages in thread
From: Hans Verkuil @ 2016-07-09 7:32 UTC (permalink / raw)
To: linux-media; +Cc: tiffany.lin, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
mtk-vcodec/venc_vpu_if.c:40:30: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
struct venc_vpu_inst *vpu = (struct venc_vpu_inst *)msg->venc_inst;
^
Note: venc_inst is u64.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/platform/mtk-vcodec/venc_vpu_if.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c
index b92c6d2..a01c759 100644
--- a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c
+++ b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c
@@ -37,7 +37,8 @@ static void handle_enc_encode_msg(struct venc_vpu_inst *vpu, void *data)
static void vpu_enc_ipi_handler(void *data, unsigned int len, void *priv)
{
struct venc_vpu_ipi_msg_common *msg = data;
- struct venc_vpu_inst *vpu = (struct venc_vpu_inst *)msg->venc_inst;
+ struct venc_vpu_inst *vpu =
+ (struct venc_vpu_inst *)(unsigned long)msg->venc_inst;
mtk_vcodec_debug(vpu, "msg_id %x inst %p status %d",
msg->msg_id, vpu, msg->status);
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] mtk-vcodec: fix compiler warning
2016-07-09 7:32 ` [PATCH 2/2] mtk-vcodec: fix compiler warning Hans Verkuil
@ 2016-07-11 3:06 ` tiffany lin
0 siblings, 0 replies; 4+ messages in thread
From: tiffany lin @ 2016-07-11 3:06 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, Hans Verkuil
On Sat, 2016-07-09 at 09:32 +0200, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> mtk-vcodec/venc_vpu_if.c:40:30: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> struct venc_vpu_inst *vpu = (struct venc_vpu_inst *)msg->venc_inst;
> ^
>
> Note: venc_inst is u64.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
> drivers/media/platform/mtk-vcodec/venc_vpu_if.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c
> index b92c6d2..a01c759 100644
> --- a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c
> +++ b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c
> @@ -37,7 +37,8 @@ static void handle_enc_encode_msg(struct venc_vpu_inst *vpu, void *data)
> static void vpu_enc_ipi_handler(void *data, unsigned int len, void *priv)
> {
> struct venc_vpu_ipi_msg_common *msg = data;
> - struct venc_vpu_inst *vpu = (struct venc_vpu_inst *)msg->venc_inst;
> + struct venc_vpu_inst *vpu =
> + (struct venc_vpu_inst *)(unsigned long)msg->venc_inst;
>
reviewed-by: Tiffany Lin <tiffany.lin@mediatek.com>
> mtk_vcodec_debug(vpu, "msg_id %x inst %p status %d",
> msg->msg_id, vpu, msg->status);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] mtk-vcodec: fix two compiler warnings
2016-07-09 7:32 [PATCH 1/2] mtk-vcodec: fix two compiler warnings Hans Verkuil
2016-07-09 7:32 ` [PATCH 2/2] mtk-vcodec: fix compiler warning Hans Verkuil
@ 2016-07-11 3:07 ` tiffany lin
1 sibling, 0 replies; 4+ messages in thread
From: tiffany lin @ 2016-07-11 3:07 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, Hans Verkuil
On Sat, 2016-07-09 at 09:32 +0200, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> mtk-vcodec/mtk_vcodec_enc.c: In function 'mtk_venc_worker':
> mtk-vcodec/mtk_vcodec_enc.c:1030:43: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'size_t {aka unsigned int}' [-Wformat=]
> mtk-vcodec/mtk_vcodec_enc.c:1030:43: warning: format '%lx' expects argument of type 'long unsigned int', but argument 10 has type 'size_t {aka unsigned int}' [-Wformat=]
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
> drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
> index 6dcae0a..907a6d1 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
> @@ -1028,7 +1028,7 @@ static void mtk_venc_worker(struct work_struct *work)
> bs_buf.size = (size_t)dst_buf->planes[0].length;
>
> mtk_v4l2_debug(2,
> - "Framebuf VA=%p PA=%llx Size=0x%lx;VA=%p PA=0x%llx Size=0x%lx;VA=%p PA=0x%llx Size=%zu",
> + "Framebuf VA=%p PA=%llx Size=0x%zx;VA=%p PA=0x%llx Size=0x%zx;VA=%p PA=0x%llx Size=%zu",
> frm_buf.fb_addr[0].va,
> (u64)frm_buf.fb_addr[0].dma_addr,
> frm_buf.fb_addr[0].size,
reviewed-by: Tiffany Lin <tiffany.lin@mediatek.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-11 3:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-09 7:32 [PATCH 1/2] mtk-vcodec: fix two compiler warnings Hans Verkuil
2016-07-09 7:32 ` [PATCH 2/2] mtk-vcodec: fix compiler warning Hans Verkuil
2016-07-11 3:06 ` tiffany lin
2016-07-11 3:07 ` [PATCH 1/2] mtk-vcodec: fix two compiler warnings tiffany lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox