mediatek decoder: compiler/sparse warnings

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

 



Hi Tiffany,

I get a bunch of warnings when I compile the decoder driver in my daily build setup:

/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c: In function 'put_fb_to_free':
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c:242:47: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
   list->fb_list[list->write_idx].vdec_fb_va = (u64)fb;
                                               ^
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c: In function 'vdec_h264_decode':
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c:353:24: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
  uint64_t vdec_fb_va = (u64)fb;
                        ^
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c: In function 'vdec_h264_get_fb':
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c:446:7: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
  fb = (struct vdec_fb *)list->fb_list[list->read_idx].vdec_fb_va;
       ^
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c: In function 'vdec_vp9_decode':
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c:794:37: warning: format '%ld' expects argument of type
'long int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=]
  mtk_vcodec_debug(inst, "Input BS Size = %ld", bs->size);
                                     ^

^^^^^^ Should be %zu.

/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c: In function 'handle_init_ack_msg':
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c:22:30: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
  struct vdec_vpu_inst *vpu = (struct vdec_vpu_inst *)msg->ap_inst_addr;
                              ^
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c: In function 'vpu_dec_ipi_handler':
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c:41:30: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
  struct vdec_vpu_inst *vpu = (struct vdec_vpu_inst *)msg->ap_inst_addr;
                              ^

sparse: ERRORS
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c:404:16: error: undefined identifier 'kzalloc'
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c:436:9: error: undefined identifier 'kfree'
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c:618:9: error: undefined identifier 'kfree'
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c:404:9: error: implicit declaration of function
'kzalloc' [-Werror=implicit-function-declaration]
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c:404:7: warning: assignment makes pointer from integer
without a cast [-Wint-conversion]
/home/hans/work/build/media-git/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c:436:2: error: implicit declaration of function 'kfree'
[-Werror=implicit-function-declaration]

^^^^ Apparently a slab.h include is missing here that breaks building it with sparse.

Can you look at these and provide a patch fixing these? I'll fold it in the patch series.

Regards,

	Hans
--
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