Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chen-Yu Tsai <wenst@chromium.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v7 07/10] i2c: of-prober: Add simple helpers for regulator support
Date: Fri, 13 Sep 2024 23:36:01 +0800	[thread overview]
Message-ID: <202409132350.owzYFq9z-lkp@intel.com> (raw)
In-Reply-To: <20240911072751.365361-8-wenst@chromium.org>

Hi Chen-Yu,

kernel test robot noticed the following build errors:

[auto build test ERROR on broonie-regulator/for-next]
[also build test ERROR on next-20240913]
[cannot apply to robh/for-next wsa/i2c/for-next linus/master v6.11-rc7]
[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/Chen-Yu-Tsai/of-dynamic-Add-of_changeset_update_prop_string/20240911-153237
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
patch link:    https://lore.kernel.org/r/20240911072751.365361-8-wenst%40chromium.org
patch subject: [PATCH v7 07/10] i2c: of-prober: Add simple helpers for regulator support
config: x86_64-buildonly-randconfig-004-20240913 (https://download.01.org/0day-ci/archive/20240913/202409132350.owzYFq9z-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240913/202409132350.owzYFq9z-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/202409132350.owzYFq9z-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/i2c/i2c-core-of-prober.c:214:11: error: call to undeclared function 'of_regulator_get_optional'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     214 |         supply = of_regulator_get_optional(dev, node, supply_name);
         |                  ^
   drivers/i2c/i2c-core-of-prober.c:214:11: note: did you mean 'regulator_get_optional'?
   include/linux/regulator/consumer.h:345:1: note: 'regulator_get_optional' declared here
     345 | regulator_get_optional(struct device *dev, const char *id)
         | ^
>> drivers/i2c/i2c-core-of-prober.c:214:9: error: incompatible integer to pointer conversion assigning to 'struct regulator *' from 'int' [-Wint-conversion]
     214 |         supply = of_regulator_get_optional(dev, node, supply_name);
         |                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/of_regulator_get_optional +214 drivers/i2c/i2c-core-of-prober.c

   197	
   198	static int i2c_of_probe_simple_get_supply(struct device *dev, struct device_node *node,
   199						  struct i2c_of_probe_simple_ctx *ctx)
   200	{
   201		const char *supply_name;
   202		struct regulator *supply;
   203	
   204		/*
   205		 * It's entirely possible for the component's device node to not have regulator
   206		 * supplies. While it does not make sense from a hardware perspective, the
   207		 * supplies could be always on or otherwise not modeled in the device tree, but
   208		 * the device would still work.
   209		 */
   210		supply_name = ctx->opts->supply_name;
   211		if (!supply_name)
   212			return 0;
   213	
 > 214		supply = of_regulator_get_optional(dev, node, supply_name);
   215		if (IS_ERR(supply)) {
   216			return dev_err_probe(dev, PTR_ERR(supply),
   217					     "Failed to get regulator supply \"%s\" from %pOF\n",
   218					     supply_name, node);
   219		}
   220	
   221		ctx->supply = supply;
   222	
   223		return 0;
   224	}
   225	

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

           reply	other threads:[~2024-09-13 15:37 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20240911072751.365361-8-wenst@chromium.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=202409132350.owzYFq9z-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=wenst@chromium.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