Hi Rui,

I love your patch! Yet something to improve:

[auto build test ERROR on v4.16-rc4]
[cannot apply to next-20180314]
[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/Rui-Miguel-Silva/media-Introduce-Omnivision-OV2680-driver/20180315-020617
config: i386-allyesconfig (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=i386 

All errors (new ones prefixed by >>):

   drivers/media/i2c/ov2680.c: In function 'ov2680_set_fmt':
   drivers/media/i2c/ov2680.c:713:9: error: implicit declaration of function 
'v4l2_find_nearest_size'; did you mean 'v4l2_find_nearest_format'? 
[-Werror=implicit-function-declaration]
     mode = v4l2_find_nearest_size(ov2680_mode_data,
            ^~~~~~~~~~~~~~~~~~~~~~
            v4l2_find_nearest_format
   drivers/media/i2c/ov2680.c:714:195: error: 'width' undeclared (first use in 
this function)
              ARRAY_SIZE(ov2680_mode_data), width,
                                                                                
                                                                                
                                      ^    
   drivers/media/i2c/ov2680.c:714:195: note: each undeclared identifier is 
reported only once for each function it appears in
>> drivers/media/i2c/ov2680.c:715:11: error: 'height' undeclared (first use in 
>> this function); did you mean '__iget'?
              height, fmt->width, fmt->height);
              ^~~~~~
              __iget
   cc1: some warnings being treated as errors

vim +715 drivers/media/i2c/ov2680.c

   693  
   694  static int ov2680_set_fmt(struct v4l2_subdev *sd,
   695                            struct v4l2_subdev_pad_config *cfg,
   696                            struct v4l2_subdev_format *format)
   697  {
   698          struct ov2680_dev *sensor = to_ov2680_dev(sd);
   699          struct v4l2_mbus_framefmt *fmt = &format->format;
   700          const struct ov2680_mode_info *mode;
   701          int ret = 0;
   702  
   703          if (format->pad != 0)
   704                  return -EINVAL;
   705  
   706          mutex_lock(&sensor->lock);
   707  
   708          if (sensor->is_streaming) {
   709                  ret = -EBUSY;
   710                  goto unlock;
   711          }
   712  
 > 713          mode = v4l2_find_nearest_size(ov2680_mode_data,
   714                                        ARRAY_SIZE(ov2680_mode_data), 
width,
 > 715                                        height, fmt->width, fmt->height);
   716          if (!mode) {
   717                  ret = -EINVAL;
   718                  goto unlock;
   719          }
   720  
   721          if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
   722                  fmt = v4l2_subdev_get_try_format(sd, cfg, 0);
   723  
   724                  *fmt = format->format;
   725                  goto unlock;
   726          }
   727  
   728          fmt->width = mode->width;
   729          fmt->height = mode->height;
   730          fmt->code = sensor->fmt.code;
   731          fmt->colorspace = sensor->fmt.colorspace;
   732  
   733          sensor->current_mode = mode;
   734          sensor->fmt = format->format;
   735          sensor->mode_pending_changes = true;
   736  
   737  unlock:
   738          mutex_unlock(&sensor->lock);
   739  
   740          return ret;
   741  }
   742  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to