Re: [PATCH v3] media: i2c: Add ar0234 camera sensor driver

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

 



Hi Dongcheng,

kernel test robot noticed the following build errors:

[auto build test ERROR on media-tree/master]
[also build test ERROR on sailus-media-tree/master linuxtv-media-stage/master linus/master v6.10-rc4 next-20240617]
[cannot apply to sailus-media-tree/streams]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Dongcheng-Yan/media-i2c-Add-ar0234-camera-sensor-driver/20240614-161208
base:   git://linuxtv.org/media_tree.git master
patch link:    https://lore.kernel.org/r/20240614080941.3938212-1-dongcheng.yan%40intel.com
patch subject: [PATCH v3] media: i2c: Add ar0234 camera sensor driver
config: powerpc64-randconfig-r064-20240618 (https://download.01.org/0day-ci/archive/20240618/202406180807.dvu7E34U-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240618/202406180807.dvu7E34U-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406180807.dvu7E34U-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/media/i2c/ar0234.c:508:3: error: expected expression
                   u64 reg;
                   ^
>> drivers/media/i2c/ar0234.c:511:12: error: use of undeclared identifier 'reg'; did you mean 'ret'?
                                  &reg, NULL);
                                   ^~~
                                   ret
   drivers/media/i2c/ar0234.c:464:6: note: 'ret' declared here
           int ret;
               ^
   drivers/media/i2c/ar0234.c:515:3: error: use of undeclared identifier 'reg'; did you mean 'ret'?
                   reg &= ~(AR0234_ORIENTATION_HFLIP |
                   ^~~
                   ret
   drivers/media/i2c/ar0234.c:464:6: note: 'ret' declared here
           int ret;
               ^
   drivers/media/i2c/ar0234.c:518:4: error: use of undeclared identifier 'reg'; did you mean 'ret'?
                           reg |= AR0234_ORIENTATION_HFLIP;
                           ^~~
                           ret
   drivers/media/i2c/ar0234.c:464:6: note: 'ret' declared here
           int ret;
               ^
   drivers/media/i2c/ar0234.c:520:4: error: use of undeclared identifier 'reg'; did you mean 'ret'?
                           reg |= AR0234_ORIENTATION_VFLIP;
                           ^~~
                           ret
   drivers/media/i2c/ar0234.c:464:6: note: 'ret' declared here
           int ret;
               ^
   drivers/media/i2c/ar0234.c:523:5: error: use of undeclared identifier 'reg'; did you mean 'ret'?
                                   reg, NULL);
                                   ^~~
                                   ret
   drivers/media/i2c/ar0234.c:464:6: note: 'ret' declared here
           int ret;
               ^
   6 errors generated.


vim +508 drivers/media/i2c/ar0234.c

   455	
   456	static int ar0234_set_ctrl(struct v4l2_ctrl *ctrl)
   457	{
   458		struct ar0234 *ar0234 =
   459			container_of(ctrl->handler, struct ar0234, ctrl_handler);
   460		struct i2c_client *client = v4l2_get_subdevdata(&ar0234->sd);
   461		s64 exposure_max, exposure_def;
   462		struct v4l2_subdev_state *state;
   463		const struct v4l2_mbus_framefmt *format;
   464		int ret;
   465	
   466		state = v4l2_subdev_get_locked_active_state(&ar0234->sd);
   467		format = v4l2_subdev_state_get_format(state, 0);
   468	
   469		/* Propagate change of current control to all related controls */
   470		if (ctrl->id == V4L2_CID_VBLANK) {
   471			/* Update max exposure while meeting expected vblanking */
   472			exposure_max = format->height + ctrl->val -
   473				       AR0234_EXPOSURE_MAX_MARGIN;
   474			exposure_def = format->height - AR0234_EXPOSURE_MAX_MARGIN;
   475			__v4l2_ctrl_modify_range(ar0234->exposure,
   476						 ar0234->exposure->minimum,
   477						 exposure_max, ar0234->exposure->step,
   478						 exposure_def);
   479		}
   480	
   481		/* V4L2 controls values will be applied only when power is already up */
   482		if (!pm_runtime_get_if_in_use(&client->dev))
   483			return 0;
   484	
   485		switch (ctrl->id) {
   486		case V4L2_CID_ANALOGUE_GAIN:
   487			ret = cci_write(ar0234->regmap, AR0234_REG_ANALOG_GAIN,
   488					ctrl->val, NULL);
   489			break;
   490	
   491		case V4L2_CID_DIGITAL_GAIN:
   492			ret = cci_write(ar0234->regmap, AR0234_REG_GLOBAL_GAIN,
   493					ctrl->val, NULL);
   494			break;
   495	
   496		case V4L2_CID_EXPOSURE:
   497			ret = cci_write(ar0234->regmap, AR0234_REG_EXPOSURE,
   498					ctrl->val, NULL);
   499			break;
   500	
   501		case V4L2_CID_VBLANK:
   502			ret = cci_write(ar0234->regmap, AR0234_REG_VTS,
   503					ar0234->cur_mode->height + ctrl->val, NULL);
   504			break;
   505	
   506		case V4L2_CID_HFLIP:
   507		case V4L2_CID_VFLIP:
 > 508			u64 reg;
   509	
   510			ret = cci_read(ar0234->regmap, AR0234_REG_ORIENTATION,
 > 511				       &reg, NULL);
   512			if (ret)
   513				break;
   514	
   515			reg &= ~(AR0234_ORIENTATION_HFLIP |
   516				 AR0234_ORIENTATION_VFLIP);
   517			if (ar0234->hflip->val)
   518				reg |= AR0234_ORIENTATION_HFLIP;
   519			if (ar0234->vflip->val)
   520				reg |= AR0234_ORIENTATION_VFLIP;
   521	
   522			ret = cci_write(ar0234->regmap, AR0234_REG_ORIENTATION,
   523					reg, NULL);
   524			break;
   525	
   526		case V4L2_CID_TEST_PATTERN:
   527			ret = cci_write(ar0234->regmap, AR0234_REG_TEST_PATTERN,
   528					ar0234_test_pattern_val[ctrl->val], NULL);
   529			break;
   530	
   531		default:
   532			ret = -EINVAL;
   533			break;
   534		}
   535	
   536		pm_runtime_put(&client->dev);
   537	
   538		return ret;
   539	}
   540	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[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