Re: [PATCH v4 2/4] media: ov5675: add device-tree support and support runtime PM

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

 



Hi Quentin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on media-tree/master]
[also build test WARNING on robh/for-next v5.18 next-20220525]
[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]

url:    https://github.com/intel-lab-lkp/linux/commits/Quentin-Schulz/media-dt-bindings-ov5675-document-YAML-binding/20220525-201607
base:   git://linuxtv.org/media_tree.git master
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220525/202205252218.mhWZtfwJ-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/66ceb2ca2f2882f78a14838931faace1ac74d812
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Quentin-Schulz/media-dt-bindings-ov5675-document-YAML-binding/20220525-201607
        git checkout 66ceb2ca2f2882f78a14838931faace1ac74d812
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/media/i2c/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   drivers/media/i2c/ov5675.c: In function 'ov5675_power_on':
>> drivers/media/i2c/ov5675.c:1007:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
    1007 |         u32 delay_us = DIV_ROUND_UP(8192, OV5675_XVCLK_19_2 / 1000 / 1000);
         |         ^~~


vim +1007 drivers/media/i2c/ov5675.c

   978	
   979	static int ov5675_power_on(struct device *dev)
   980	{
   981		struct v4l2_subdev *sd = dev_get_drvdata(dev);
   982		struct ov5675 *ov5675 = to_ov5675(sd);
   983		int ret;
   984	
   985		ret = clk_prepare_enable(ov5675->xvclk);
   986		if (ret < 0) {
   987			dev_err(dev, "failed to enable xvclk: %d\n", ret);
   988			return ret;
   989		}
   990	
   991		gpiod_set_value_cansleep(ov5675->reset_gpio, 1);
   992	
   993		ret = regulator_bulk_enable(OV5675_NUM_SUPPLIES, ov5675->supplies);
   994		if (ret) {
   995			clk_disable_unprepare(ov5675->xvclk);
   996			return ret;
   997		}
   998	
   999		/* Reset pulse should be at least 2ms and reset gpio released only once
  1000		 * regulators are stable.
  1001		 */
  1002		usleep_range(2000, 2200);
  1003	
  1004		gpiod_set_value_cansleep(ov5675->reset_gpio, 0);
  1005	
  1006		/* 8192 xvclk cycles prior to the first SCCB transation */
> 1007		u32 delay_us = DIV_ROUND_UP(8192, OV5675_XVCLK_19_2 / 1000 / 1000);
  1008	
  1009		usleep_range(delay_us, delay_us * 2);
  1010	
  1011		return 0;
  1012	}
  1013	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[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