Re: [PATCH] media: i2c-polling: add i2c-polling driver

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

 



Hi Matt,

[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.9-rc4 next-20161028]
[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/Matt-Ranostay/media-i2c-polling-add-i2c-polling-driver/20161107-092444
base:   git://linuxtv.org/media_tree.git master
config: x86_64-randconfig-x017-11071730 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

   drivers/media/i2c/i2c-polling.c: In function 'i2c_polling_probe':
>> drivers/media/i2c/i2c-polling.c:379:9: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
     data = kzalloc(sizeof(*data), GFP_KERNEL);
            ^~~~~~~
>> drivers/media/i2c/i2c-polling.c:379:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     data = kzalloc(sizeof(*data), GFP_KERNEL);
          ^
>> drivers/media/i2c/i2c-polling.c:432:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
     kfree(data);
     ^~~~~
   cc1: some warnings being treated as errors

vim +/kzalloc +379 drivers/media/i2c/i2c-polling.c

   373	{
   374		struct i2c_polling_data *data;
   375		struct v4l2_device *v4l2_dev;
   376		struct vb2_queue *queue;
   377		int ret;
   378	
 > 379		data = kzalloc(sizeof(*data), GFP_KERNEL);
   380		if (!data)
   381			return -ENOMEM;
   382	
   383		data->chip = &i2c_polling_chips[id->driver_data];
   384		data->client = client;
   385		data->last_update = jiffies;
   386		v4l2_dev = &data->v4l2_dev;
   387		strlcpy(v4l2_dev->name, I2C_POLLING_DRIVER, sizeof(v4l2_dev->name));
   388	
   389		ret = v4l2_device_register(&client->dev, v4l2_dev);
   390		if (ret < 0)
   391			goto error_free_device;
   392	
   393		mutex_init(&data->lock);
   394		mutex_init(&data->queue_lock);
   395	
   396		queue = &data->vb_vidq;
   397		queue->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
   398		queue->io_modes = VB2_MMAP | VB2_USERPTR | VB2_READ;
   399		queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
   400		queue->drv_priv = data;
   401		queue->ops = &i2c_polling_video_qops;
   402		queue->mem_ops = &vb2_vmalloc_memops;
   403	
   404		ret = vb2_queue_init(queue);
   405		if (ret < 0)
   406			goto error_free_device;
   407	
   408		data->vdev.queue = queue;
   409		data->vdev.queue->lock = &data->queue_lock;
   410	
   411		strlcpy(data->vdev.name, "I2C Polling Video", sizeof(data->vdev.name));
   412	
   413		data->vdev.v4l2_dev = v4l2_dev;
   414		data->vdev.fops = &i2c_polling_fops;
   415		data->vdev.lock = &data->lock;
   416		data->vdev.ioctl_ops = &i2c_polling_ioctl_ops;
   417		data->vdev.release = video_device_release_empty;
   418	
   419		video_set_drvdata(&data->vdev, data);
   420		i2c_set_clientdata(client, data);
   421	
   422		ret = video_register_device(&data->vdev, VFL_TYPE_GRABBER, -1);
   423		if (ret < 0)
   424			goto error_unregister_device;
   425	
   426		return 0;
   427	
   428	error_unregister_device:
   429		v4l2_device_unregister(v4l2_dev);
   430	
   431	error_free_device:
 > 432		kfree(data);
   433	
   434		return ret;
   435	}

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