Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] mtk-vcodec: fix compiler warning

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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
65ad26cd f7cf0362

+2 -1
+2 -1
drivers/media/platform/mtk-vcodec/venc_vpu_if.c
··· 37 37 static void vpu_enc_ipi_handler(void *data, unsigned int len, void *priv) 38 38 { 39 39 struct venc_vpu_ipi_msg_common *msg = data; 40 - struct venc_vpu_inst *vpu = (struct venc_vpu_inst *)msg->venc_inst; 40 + struct venc_vpu_inst *vpu = 41 + (struct venc_vpu_inst *)(unsigned long)msg->venc_inst; 41 42 42 43 mtk_vcodec_debug(vpu, "msg_id %x inst %p status %d", 43 44 msg->msg_id, vpu, msg->status);