Hi Mauro, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.16 next-20180406] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/Make-all-media-drivers-build-with-COMPILE_TEST/20180406-163048 base: git://linuxtv.org/media_tree.git master config: x86_64-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): drivers/media//platform/omap3isp/ispccdc.c: In function 'ccdc_config': >> drivers/media//platform/omap3isp/ispccdc.c:738:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (__force void __user *)fpc.fpcaddr, ^ sparse warnings: (new ones prefixed by >>) >> drivers/media/platform/omap3isp/isppreview.c:893:45: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:1>*from @@ got void [noderef] <asn:1>*from @@ drivers/media/platform/omap3isp/isppreview.c:893:45: expected void [noderef] <asn:1>*from drivers/media/platform/omap3isp/isppreview.c:893:45: got void *[noderef] <asn:1><noident> >> drivers/media/platform/omap3isp/isppreview.c:893:47: sparse: dereference of noderef expression vim +738 drivers/media//platform/omap3isp/ispccdc.c de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 656 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 657 /* de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 658 * ccdc_config - Set CCDC configuration from userspace de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 659 * @ccdc: Pointer to ISP CCDC device. 872aba51 drivers/media/platform/omap3isp/ispccdc.c Lad, Prabhakar 2014-02-21 660 * @ccdc_struct: Structure containing CCDC configuration sent from userspace. de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 661 * de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 662 * Returns 0 if successful, -EINVAL if the pointer to the configuration de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 663 * structure is null, or the copy_from_user function fails to copy user space de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 664 * memory to kernel space memory. de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 665 */ de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 666 static int ccdc_config(struct isp_ccdc_device *ccdc, de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 667 struct omap3isp_ccdc_update_config *ccdc_struct) de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 668 { de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 669 struct isp_device *isp = to_isp_device(ccdc); de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 670 unsigned long flags; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 671 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 672 spin_lock_irqsave(&ccdc->lock, flags); de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 673 ccdc->shadow_update = 1; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 674 spin_unlock_irqrestore(&ccdc->lock, flags); de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 675 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 676 if (OMAP3ISP_CCDC_ALAW & ccdc_struct->update) { de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 677 ccdc->alaw = !!(OMAP3ISP_CCDC_ALAW & ccdc_struct->flag); de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 678 ccdc->update |= OMAP3ISP_CCDC_ALAW; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 679 } de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 680 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 681 if (OMAP3ISP_CCDC_LPF & ccdc_struct->update) { de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 682 ccdc->lpf = !!(OMAP3ISP_CCDC_LPF & ccdc_struct->flag); de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 683 ccdc->update |= OMAP3ISP_CCDC_LPF; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 684 } de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 685 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 686 if (OMAP3ISP_CCDC_BLCLAMP & ccdc_struct->update) { de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 687 if (copy_from_user(&ccdc->clamp, ccdc_struct->bclamp, de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 688 sizeof(ccdc->clamp))) { de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 689 ccdc->shadow_update = 0; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 690 return -EFAULT; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 691 } de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 692 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 693 ccdc->obclamp = !!(OMAP3ISP_CCDC_BLCLAMP & ccdc_struct->flag); de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 694 ccdc->update |= OMAP3ISP_CCDC_BLCLAMP; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 695 } de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 696 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 697 if (OMAP3ISP_CCDC_BCOMP & ccdc_struct->update) { de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 698 if (copy_from_user(&ccdc->blcomp, ccdc_struct->blcomp, de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 699 sizeof(ccdc->blcomp))) { de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 700 ccdc->shadow_update = 0; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 701 return -EFAULT; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 702 } de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 703 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 704 ccdc->update |= OMAP3ISP_CCDC_BCOMP; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 705 } de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 706 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 707 ccdc->shadow_update = 0; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 708 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 709 if (OMAP3ISP_CCDC_FPC & ccdc_struct->update) { c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 710 struct omap3isp_ccdc_fpc fpc; c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 711 struct ispccdc_fpc fpc_old = { .addr = NULL, }; c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 712 struct ispccdc_fpc fpc_new; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 713 u32 size; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 714 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 715 if (ccdc->state != ISP_PIPELINE_STREAM_STOPPED) de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 716 return -EBUSY; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 717 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 718 ccdc->fpc_en = !!(OMAP3ISP_CCDC_FPC & ccdc_struct->flag); de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 719 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 720 if (ccdc->fpc_en) { c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 721 if (copy_from_user(&fpc, ccdc_struct->fpc, sizeof(fpc))) de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 722 return -EFAULT; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 723 c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 724 size = fpc.fpnum * 4; c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 725 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 726 /* c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 727 * The table address must be 64-bytes aligned, which is c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 728 * guaranteed by dma_alloc_coherent(). de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 729 */ c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 730 fpc_new.fpnum = fpc.fpnum; c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 731 fpc_new.addr = dma_alloc_coherent(isp->dev, size, c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 732 &fpc_new.dma, c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 733 GFP_KERNEL); c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 734 if (fpc_new.addr == NULL) de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 735 return -ENOMEM; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 736 c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 737 if (copy_from_user(fpc_new.addr, c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 @738 (__force void __user *)fpc.fpcaddr, c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 739 size)) { c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 740 dma_free_coherent(isp->dev, size, fpc_new.addr, c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 741 fpc_new.dma); de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 742 return -EFAULT; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 743 } de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 744 c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 745 fpc_old = ccdc->fpc; c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 746 ccdc->fpc = fpc_new; de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 747 } de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 748 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 749 ccdc_configure_fpc(ccdc); c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 750 c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 751 if (fpc_old.addr != NULL) c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 752 dma_free_coherent(isp->dev, fpc_old.fpnum * 4, c60e153d drivers/media/platform/omap3isp/ispccdc.c Laurent Pinchart 2014-01-02 753 fpc_old.addr, fpc_old.dma); de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 754 } de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 755 de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 756 return ccdc_lsc_config(ccdc, ccdc_struct); de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 757 } de1135d4 drivers/media/video/omap3isp/ispccdc.c Laurent Pinchart 2011-02-12 758 :::::: The code at line 738 was first introduced by commit :::::: c60e153d3407b5a94b72ebfcf274fae98979eed9 [media] omap3isp: ccdc: Use the DMA API for FPC :::::: TO: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> :::::: CC: Mauro Carvalho Chehab <m.chehab@xxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip