Re: [PATCH v9.1] media: imx258: Add imx258 camera sensor driver

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

 



Hi Jason,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc6 next-20180319]
[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/Andy-Yeh/media-imx258-Add-imx258-camera-sensor-driver/20180319-082217
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/imx258.c: In function 'imx258_set_pad_format':
   drivers/media//i2c/imx258.c:870: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(
            ^~~~~~~~~~~~~~~~~~~~~~
            v4l2_find_nearest_format
   drivers/media//i2c/imx258.c:871:200: error: 'width' undeclared (first use in this function)
      supported_modes, ARRAY_SIZE(supported_modes), width, height,
                                                                                                                                                                                                           ^    
   drivers/media//i2c/imx258.c:871:200: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/media//i2c/imx258.c:871:207: error: 'height' undeclared (first use in this function); did you mean '__iget'?
      supported_modes, ARRAY_SIZE(supported_modes), width, height,
                                                                                                                                                                                                                  ^     
                                                                                                                                                                                                                  __iget
   cc1: some warnings being treated as errors

vim +871 drivers/media//i2c/imx258.c

   851	
   852	static int imx258_set_pad_format(struct v4l2_subdev *sd,
   853			       struct v4l2_subdev_pad_config *cfg,
   854			       struct v4l2_subdev_format *fmt)
   855	{
   856		struct imx258 *imx258 = to_imx258(sd);
   857		const struct imx258_mode *mode;
   858		struct v4l2_mbus_framefmt *framefmt;
   859		s32 vblank_def;
   860		s32 vblank_min;
   861		s64 h_blank;
   862		s64 pixel_rate;
   863		s64 link_freq;
   864	
   865		mutex_lock(&imx258->mutex);
   866	
   867		/* Only one raw bayer(GBRG) order is supported */
   868		fmt->format.code = MEDIA_BUS_FMT_SGRBG10_1X10;
   869	
 > 870		mode = v4l2_find_nearest_size(
 > 871			supported_modes, ARRAY_SIZE(supported_modes), width, height,
   872			fmt->format.width, fmt->format.height);
   873		imx258_update_pad_format(mode, fmt);
   874		if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
   875			framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
   876			*framefmt = fmt->format;
   877		} else {
   878			imx258->cur_mode = mode;
   879			__v4l2_ctrl_s_ctrl(imx258->link_freq, mode->link_freq_index);
   880	
   881			link_freq = link_freq_menu_items[mode->link_freq_index];
   882			pixel_rate = link_freq_to_pixel_rate(link_freq);
   883			__v4l2_ctrl_s_ctrl_int64(imx258->pixel_rate, pixel_rate);
   884			/* Update limits and set FPS to default */
   885			vblank_def = imx258->cur_mode->vts_def -
   886				     imx258->cur_mode->height;
   887			vblank_min = imx258->cur_mode->vts_min -
   888				     imx258->cur_mode->height;
   889			__v4l2_ctrl_modify_range(
   890				imx258->vblank, vblank_min,
   891				IMX258_VTS_MAX - imx258->cur_mode->height, 1,
   892				vblank_def);
   893			__v4l2_ctrl_s_ctrl(imx258->vblank, vblank_def);
   894			h_blank =
   895				link_freq_configs[mode->link_freq_index].pixels_per_line
   896				 - imx258->cur_mode->width;
   897			__v4l2_ctrl_modify_range(imx258->hblank, h_blank,
   898						 h_blank, 1, h_blank);
   899		}
   900	
   901		mutex_unlock(&imx258->mutex);
   902	
   903		return 0;
   904	}
   905	

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