Re: [PATCH 2/2] mtk-vcodec: fix compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2016-07-09 at 09:32 +0200, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> 
> 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@xxxxxxxxx>
> ---
>  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@xxxxxxxxxxxx>

>  	mtk_vcodec_debug(vpu, "msg_id %x inst %p status %d",
>  			 msg->msg_id, vpu, msg->status);


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux