llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Mehdi Djait <mehdi.djait@linux.intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/2] media: i2c: Add OmniVision OV6211 image sensor driver
Date: Wed, 30 Jul 2025 23:34:55 +0800	[thread overview]
Message-ID: <202507302325.nnfzHwrF-lkp@intel.com> (raw)
In-Reply-To: <20250729231454.242748-3-vladimir.zapolskiy@linaro.org>

Hi Vladimir,

kernel test robot noticed the following build errors:

[auto build test ERROR on robh/for-next]
[also build test ERROR on linuxtv-media-pending/master linus/master v6.16 next-20250730]
[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/Vladimir-Zapolskiy/dt-bindings-media-i2c-Add-OmniVision-OV6211-image-sensor/20250730-071618
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20250729231454.242748-3-vladimir.zapolskiy%40linaro.org
patch subject: [PATCH v2 2/2] media: i2c: Add OmniVision OV6211 image sensor driver
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20250730/202507302325.nnfzHwrF-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250730/202507302325.nnfzHwrF-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507302325.nnfzHwrF-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/media/i2c/ov6211.c:672:18: error: call to undeclared function 'devm_v4l2_sensor_clk_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     672 |         ov6211->xvclk = devm_v4l2_sensor_clk_get(&client->dev, NULL);
         |                         ^
>> drivers/media/i2c/ov6211.c:672:16: error: incompatible integer to pointer conversion assigning to 'struct clk *' from 'int' [-Wint-conversion]
     672 |         ov6211->xvclk = devm_v4l2_sensor_clk_get(&client->dev, NULL);
         |                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/devm_v4l2_sensor_clk_get +672 drivers/media/i2c/ov6211.c

   654	
   655	static int ov6211_probe(struct i2c_client *client)
   656	{
   657		struct ov6211 *ov6211;
   658		unsigned long freq;
   659		int ret;
   660	
   661		ov6211 = devm_kzalloc(&client->dev, sizeof(*ov6211), GFP_KERNEL);
   662		if (!ov6211)
   663			return -ENOMEM;
   664	
   665		ov6211->regmap = devm_cci_regmap_init_i2c(client, 16);
   666		if (IS_ERR(ov6211->regmap))
   667			return dev_err_probe(&client->dev, PTR_ERR(ov6211->regmap),
   668					     "failed to init CCI\n");
   669	
   670		v4l2_i2c_subdev_init(&ov6211->sd, client, &ov6211_subdev_ops);
   671	
 > 672		ov6211->xvclk = devm_v4l2_sensor_clk_get(&client->dev, NULL);
   673		if (IS_ERR(ov6211->xvclk))
   674			return dev_err_probe(&client->dev, PTR_ERR(ov6211->xvclk),
   675					     "failed to get XVCLK clock\n");
   676	
   677		freq = clk_get_rate(ov6211->xvclk);
   678		if (freq && freq != OV6211_MCLK_FREQ_24MHZ)
   679			return dev_err_probe(&client->dev, -EINVAL,
   680					"XVCLK clock frequency %lu is not supported\n",
   681					freq);
   682	
   683		ret = ov6211_check_hwcfg(ov6211);
   684		if (ret)
   685			return dev_err_probe(&client->dev, ret,
   686					     "failed to check HW configuration\n");
   687	
   688		ov6211->reset_gpio = devm_gpiod_get_optional(&client->dev, "reset",
   689							     GPIOD_OUT_HIGH);
   690		if (IS_ERR(ov6211->reset_gpio))
   691			return dev_err_probe(&client->dev, PTR_ERR(ov6211->reset_gpio),
   692					     "cannot get reset GPIO\n");
   693	
   694		ov6211->avdd = devm_regulator_get_optional(&client->dev, "avdd");
   695		if (IS_ERR(ov6211->avdd)) {
   696			ret = PTR_ERR(ov6211->avdd);
   697			if (ret != -ENODEV)
   698				return dev_err_probe(&client->dev, ret,
   699						     "Failed to get avdd regulator\n");
   700	
   701			ov6211->avdd = NULL;
   702		}
   703	
   704		ov6211->dovdd = devm_regulator_get_optional(&client->dev, "dovdd");
   705		if (IS_ERR(ov6211->dovdd)) {
   706			ret = PTR_ERR(ov6211->dovdd);
   707			if (ret != -ENODEV)
   708				return dev_err_probe(&client->dev, ret,
   709						     "Failed to get dovdd regulator\n");
   710	
   711			ov6211->dovdd = NULL;
   712		}
   713	
   714		ov6211->dvdd = devm_regulator_get_optional(&client->dev, "dvdd");
   715		if (IS_ERR(ov6211->dvdd)) {
   716			ret = PTR_ERR(ov6211->dvdd);
   717			if (ret != -ENODEV)
   718				return dev_err_probe(&client->dev, ret,
   719						     "Failed to get dvdd regulator\n");
   720	
   721			ov6211->dvdd = NULL;
   722		}
   723	
   724		/* The sensor must be powered on to read the CHIP_ID register */
   725		ret = ov6211_power_on(&client->dev);
   726		if (ret)
   727			return ret;
   728	
   729		ret = ov6211_identify_module(ov6211);
   730		if (ret) {
   731			dev_err_probe(&client->dev, ret, "failed to find sensor\n");
   732			goto power_off;
   733		}
   734	
   735		mutex_init(&ov6211->mutex);
   736		ov6211->cur_mode = &supported_modes[0];
   737	
   738		ret = ov6211_init_controls(ov6211);
   739		if (ret) {
   740			dev_err_probe(&client->dev, ret, "failed to init controls\n");
   741			goto mutex_destroy;
   742		}
   743	
   744		ov6211->sd.internal_ops = &ov6211_internal_ops;
   745		ov6211->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
   746		ov6211->sd.entity.ops = &ov6211_subdev_entity_ops;
   747		ov6211->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
   748		ov6211->pad.flags = MEDIA_PAD_FL_SOURCE;
   749		ret = media_entity_pads_init(&ov6211->sd.entity, 1, &ov6211->pad);
   750		if (ret) {
   751			dev_err_probe(&client->dev, ret,
   752				      "failed to init media entity pads\n");
   753			goto v4l2_ctrl_handler_free;
   754		}
   755	
   756		ret = v4l2_async_register_subdev_sensor(&ov6211->sd);
   757		if (ret < 0) {
   758			dev_err_probe(&client->dev, ret,
   759				      "failed to register V4L2 subdev\n");
   760			goto media_entity_cleanup;
   761		}
   762	
   763		/* Enable runtime PM and turn off the device */
   764		pm_runtime_set_active(&client->dev);
   765		pm_runtime_enable(&client->dev);
   766		pm_runtime_idle(&client->dev);
   767	
   768		return 0;
   769	
   770	media_entity_cleanup:
   771		media_entity_cleanup(&ov6211->sd.entity);
   772	
   773	v4l2_ctrl_handler_free:
   774		v4l2_ctrl_handler_free(ov6211->sd.ctrl_handler);
   775	
   776	mutex_destroy:
   777		mutex_destroy(&ov6211->mutex);
   778	
   779	power_off:
   780		ov6211_power_off(&client->dev);
   781	
   782		return ret;
   783	}
   784	

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

           reply	other threads:[~2025-07-30 15:35 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20250729231454.242748-3-vladimir.zapolskiy@linaro.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202507302325.nnfzHwrF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=krzk@kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=mehdi.djait@linux.intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=vladimir.zapolskiy@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).