[linuxtv-media:master 310/383] drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c:360:19: error: implicit declaration of function 'vb2_dma_contig_init_ctx'

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

 



tree:   git://linuxtv.org/media_tree.git master
head:   9ad52b4db79d168867a2ca105eca00fb9cb28fe5
commit: 36c0f8b32c4bd4f668cedfba6d97afaa84f055fb [310/383] [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 36c0f8b32c4bd4f668cedfba6d97afaa84f055fb
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

Note: the linuxtv-media/master HEAD 9ad52b4db79d168867a2ca105eca00fb9cb28fe5 builds fine.
      It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

>> drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c:870:18: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .queue_setup  = vb2ops_venc_queue_setup,
                     ^
   drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c:870:18: note: (near initialization for 'mtk_venc_vb2_ops.queue_setup')
   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:13,
                    from include/linux/list.h:8,
                    from include/linux/preempt.h:10,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/videodev2.h:59,
                    from include/media/v4l2-event.h:29,
                    from drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c:16:
   drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c: In function 'mtk_venc_worker':
   include/linux/kern_levels.h:4:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type 'size_t {aka unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^
   include/linux/printk.h:271:9: note: in expansion of macro 'KERN_INFO'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
            ^
   drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h:40:4: note: in expansion of macro 'pr_info'
       pr_info("[MTK_V4L2] level=%d %s(),%d: " fmt "\n",\
       ^
   drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c:1033:2: note: in expansion of macro 'mtk_v4l2_debug'
     mtk_v4l2_debug(2,
     ^
   include/linux/kern_levels.h:4:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 10 has type 'size_t {aka unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^
   include/linux/printk.h:271:9: note: in expansion of macro 'KERN_INFO'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
            ^
   drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h:40:4: note: in expansion of macro 'pr_info'
       pr_info("[MTK_V4L2] level=%d %s(),%d: " fmt "\n",\
       ^
   drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c:1033:2: note: in expansion of macro 'mtk_v4l2_debug'
     mtk_v4l2_debug(2,
     ^
   cc1: some warnings being treated as errors
--
   drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c: In function 'mtk_vcodec_probe':
>> drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c:360:19: error: implicit declaration of function 'vb2_dma_contig_init_ctx' [-Werror=implicit-function-declaration]
     dev->alloc_ctx = vb2_dma_contig_init_ctx(&pdev->dev);
                      ^
>> drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c:360:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     dev->alloc_ctx = vb2_dma_contig_init_ctx(&pdev->dev);
                    ^
>> drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c:404:2: error: implicit declaration of function 'vb2_dma_contig_cleanup_ctx' [-Werror=implicit-function-declaration]
     vb2_dma_contig_cleanup_ctx(dev->alloc_ctx);
     ^
   cc1: some warnings being treated as errors

vim +/vb2_dma_contig_init_ctx +360 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c

4e855a6e Tiffany Lin 2016-05-03  354  	snprintf(vfd_enc->name, sizeof(vfd_enc->name), "%s",
4e855a6e Tiffany Lin 2016-05-03  355  		 MTK_VCODEC_ENC_NAME);
4e855a6e Tiffany Lin 2016-05-03  356  	video_set_drvdata(vfd_enc, dev);
4e855a6e Tiffany Lin 2016-05-03  357  	dev->vfd_enc = vfd_enc;
4e855a6e Tiffany Lin 2016-05-03  358  	platform_set_drvdata(pdev, dev);
4e855a6e Tiffany Lin 2016-05-03  359  
4e855a6e Tiffany Lin 2016-05-03 @360  	dev->alloc_ctx = vb2_dma_contig_init_ctx(&pdev->dev);
4e855a6e Tiffany Lin 2016-05-03  361  	if (IS_ERR((__force void *)dev->alloc_ctx)) {
4e855a6e Tiffany Lin 2016-05-03  362  		mtk_v4l2_err("Failed to alloc vb2 dma context 0");
4e855a6e Tiffany Lin 2016-05-03  363  		ret = PTR_ERR((__force void *)dev->alloc_ctx);
4e855a6e Tiffany Lin 2016-05-03  364  		dev->alloc_ctx = NULL;
4e855a6e Tiffany Lin 2016-05-03  365  		goto err_vb2_ctx_init;
4e855a6e Tiffany Lin 2016-05-03  366  	}
4e855a6e Tiffany Lin 2016-05-03  367  
4e855a6e Tiffany Lin 2016-05-03  368  	dev->m2m_dev_enc = v4l2_m2m_init(&mtk_venc_m2m_ops);
4e855a6e Tiffany Lin 2016-05-03  369  	if (IS_ERR((__force void *)dev->m2m_dev_enc)) {
4e855a6e Tiffany Lin 2016-05-03  370  		mtk_v4l2_err("Failed to init mem2mem enc device");
4e855a6e Tiffany Lin 2016-05-03  371  		ret = PTR_ERR((__force void *)dev->m2m_dev_enc);
4e855a6e Tiffany Lin 2016-05-03  372  		goto err_enc_mem_init;
4e855a6e Tiffany Lin 2016-05-03  373  	}
4e855a6e Tiffany Lin 2016-05-03  374  
4e855a6e Tiffany Lin 2016-05-03  375  	dev->encode_workqueue =
4e855a6e Tiffany Lin 2016-05-03  376  			alloc_ordered_workqueue(MTK_VCODEC_ENC_NAME,
4e855a6e Tiffany Lin 2016-05-03  377  						WQ_MEM_RECLAIM |
4e855a6e Tiffany Lin 2016-05-03  378  						WQ_FREEZABLE);
4e855a6e Tiffany Lin 2016-05-03  379  	if (!dev->encode_workqueue) {
4e855a6e Tiffany Lin 2016-05-03  380  		mtk_v4l2_err("Failed to create encode workqueue");
4e855a6e Tiffany Lin 2016-05-03  381  		ret = -EINVAL;
4e855a6e Tiffany Lin 2016-05-03  382  		goto err_event_workq;
4e855a6e Tiffany Lin 2016-05-03  383  	}
4e855a6e Tiffany Lin 2016-05-03  384  
4e855a6e Tiffany Lin 2016-05-03  385  	ret = video_register_device(vfd_enc, VFL_TYPE_GRABBER, 1);
4e855a6e Tiffany Lin 2016-05-03  386  	if (ret) {
4e855a6e Tiffany Lin 2016-05-03  387  		mtk_v4l2_err("Failed to register video device");
4e855a6e Tiffany Lin 2016-05-03  388  		goto err_enc_reg;
4e855a6e Tiffany Lin 2016-05-03  389  	}
4e855a6e Tiffany Lin 2016-05-03  390  
4e855a6e Tiffany Lin 2016-05-03  391  	/* Avoid the iommu eat big hunks */
4e855a6e Tiffany Lin 2016-05-03  392  	dma_set_attr(DMA_ATTR_ALLOC_SINGLE_PAGES, &attrs);
4e855a6e Tiffany Lin 2016-05-03  393  
4e855a6e Tiffany Lin 2016-05-03  394  	mtk_v4l2_debug(0, "encoder registered as /dev/video%d",
4e855a6e Tiffany Lin 2016-05-03  395  			vfd_enc->num);
4e855a6e Tiffany Lin 2016-05-03  396  
4e855a6e Tiffany Lin 2016-05-03  397  	return 0;
4e855a6e Tiffany Lin 2016-05-03  398  
4e855a6e Tiffany Lin 2016-05-03  399  err_enc_reg:
4e855a6e Tiffany Lin 2016-05-03  400  	destroy_workqueue(dev->encode_workqueue);
4e855a6e Tiffany Lin 2016-05-03  401  err_event_workq:
4e855a6e Tiffany Lin 2016-05-03  402  	v4l2_m2m_release(dev->m2m_dev_enc);
4e855a6e Tiffany Lin 2016-05-03  403  err_enc_mem_init:
4e855a6e Tiffany Lin 2016-05-03 @404  	vb2_dma_contig_cleanup_ctx(dev->alloc_ctx);
4e855a6e Tiffany Lin 2016-05-03  405  err_vb2_ctx_init:
4e855a6e Tiffany Lin 2016-05-03  406  	video_unregister_device(vfd_enc);
4e855a6e Tiffany Lin 2016-05-03  407  err_enc_alloc:

:::::: The code at line 360 was first introduced by commit
:::::: 4e855a6efa5470d87d6148e3eb0d881255876c74 [media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver

:::::: TO: Tiffany Lin <tiffany.lin@xxxxxxxxxxxx>
:::::: CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[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