drivers/media/platform/cadence/cdns-csi2rx.c:421:11: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?

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

 



Hi Maxime,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1abd8a8f39cd9a2925149000056494523c85643a
commit: 1fc3b37f34f69ee3fd61ca624fc005fb0bfe3984 media: v4l: cadence: Add Cadence MIPI-CSI2 RX driver
date:   5 weeks ago
config: x86_64-randconfig-s4-06211558 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 1fc3b37f34f69ee3fd61ca624fc005fb0bfe3984
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/media/platform/cadence/cdns-csi2rx.c: In function 'csi2rx_probe':
>> drivers/media/platform/cadence/cdns-csi2rx.c:421:11: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration]
     csi2rx = kzalloc(sizeof(*csi2rx), GFP_KERNEL);
              ^~~~~~~
              vzalloc
   drivers/media/platform/cadence/cdns-csi2rx.c:421:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     csi2rx = kzalloc(sizeof(*csi2rx), GFP_KERNEL);
            ^
>> drivers/media/platform/cadence/cdns-csi2rx.c:466:2: error: implicit declaration of function 'kfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
     kfree(csi2rx);
     ^~~~~
     vfree
   cc1: some warnings being treated as errors

vim +421 drivers/media/platform/cadence/cdns-csi2rx.c

   414	
   415	static int csi2rx_probe(struct platform_device *pdev)
   416	{
   417		struct csi2rx_priv *csi2rx;
   418		unsigned int i;
   419		int ret;
   420	
 > 421		csi2rx = kzalloc(sizeof(*csi2rx), GFP_KERNEL);
   422		if (!csi2rx)
   423			return -ENOMEM;
   424		platform_set_drvdata(pdev, csi2rx);
   425		csi2rx->dev = &pdev->dev;
   426		mutex_init(&csi2rx->lock);
   427	
   428		ret = csi2rx_get_resources(csi2rx, pdev);
   429		if (ret)
   430			goto err_free_priv;
   431	
   432		ret = csi2rx_parse_dt(csi2rx);
   433		if (ret)
   434			goto err_free_priv;
   435	
   436		csi2rx->subdev.owner = THIS_MODULE;
   437		csi2rx->subdev.dev = &pdev->dev;
   438		v4l2_subdev_init(&csi2rx->subdev, &csi2rx_subdev_ops);
   439		v4l2_set_subdevdata(&csi2rx->subdev, &pdev->dev);
   440		snprintf(csi2rx->subdev.name, V4L2_SUBDEV_NAME_SIZE, "%s.%s",
   441			 KBUILD_MODNAME, dev_name(&pdev->dev));
   442	
   443		/* Create our media pads */
   444		csi2rx->subdev.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
   445		csi2rx->pads[CSI2RX_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
   446		for (i = CSI2RX_PAD_SOURCE_STREAM0; i < CSI2RX_PAD_MAX; i++)
   447			csi2rx->pads[i].flags = MEDIA_PAD_FL_SOURCE;
   448	
   449		ret = media_entity_pads_init(&csi2rx->subdev.entity, CSI2RX_PAD_MAX,
   450					     csi2rx->pads);
   451		if (ret)
   452			goto err_free_priv;
   453	
   454		ret = v4l2_async_register_subdev(&csi2rx->subdev);
   455		if (ret < 0)
   456			goto err_free_priv;
   457	
   458		dev_info(&pdev->dev,
   459			 "Probed CSI2RX with %u/%u lanes, %u streams, %s D-PHY\n",
   460			 csi2rx->num_lanes, csi2rx->max_lanes, csi2rx->max_streams,
   461			 csi2rx->has_internal_dphy ? "internal" : "no");
   462	
   463		return 0;
   464	
   465	err_free_priv:
 > 466		kfree(csi2rx);
   467		return ret;
   468	}
   469	

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

Attachment: .config.gz
Description: application/gzip


[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