public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Corentin Labbe <clabbe@baylibre.com>,
	andrew@lunn.ch, broonie@kernel.org, calvin.johnson@oss.nxp.com,
	davem@davemloft.net, edumazet@google.com, hkallweit1@gmail.com,
	jernej.skrabec@gmail.com, krzysztof.kozlowski+dt@linaro.org,
	kuba@kernel.org, lgirdwood@gmail.com, linux@armlinux.org.uk,
	pabeni@redhat.com, robh+dt@kernel.org, samuel@sholland.org,
	wens@csie.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev,
	netdev@vger.kernel.org, Corentin Labbe <clabbe@baylibre.com>
Subject: Re: [PATCH v3 1/3] regulator: Add regulator_bulk_get_all
Date: Mon, 23 May 2022 17:54:25 +0800	[thread overview]
Message-ID: <202205231748.IZoXf2Sf-lkp@intel.com> (raw)
In-Reply-To: <20220523052807.4044800-2-clabbe@baylibre.com>

Hi Corentin,

I love your patch! Yet something to improve:

[auto build test ERROR on broonie-regulator/for-next]
[also build test ERROR on sunxi/sunxi/for-next linus/master v5.18 next-20220520]
[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/Corentin-Labbe/arm64-add-ethernet-to-orange-pi-3/20220523-133344
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
config: i386-randconfig-a012-20220523 (https://download.01.org/0day-ci/archive/20220523/202205231748.IZoXf2Sf-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 768a1ca5eccb678947f4155e38a5f5744dcefb56)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/179be86f748a2cce87423bb16f4f967c97bf5d9b
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Corentin-Labbe/arm64-add-ethernet-to-orange-pi-3/20220523-133344
        git checkout 179be86f748a2cce87423bb16f4f967c97bf5d9b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> drivers/regulator/core.c:4870:2: error: call to undeclared function 'for_each_property_of_node'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           for_each_property_of_node(np, prop) {
           ^
>> drivers/regulator/core.c:4870:37: error: expected ';' after expression
           for_each_property_of_node(np, prop) {
                                              ^
                                              ;
>> drivers/regulator/core.c:4873:4: error: 'continue' statement not in loop statement
                           continue;
                           ^
   drivers/regulator/core.c:4876:4: error: 'continue' statement not in loop statement
                           continue;
                           ^
   drivers/regulator/core.c:4887:4: error: 'continue' statement not in loop statement
                           continue;
                           ^
   5 errors generated.


vim +/for_each_property_of_node +4870 drivers/regulator/core.c

  4839	
  4840	/*
  4841	 * regulator_bulk_get_all - get multiple regulator consumers
  4842	 *
  4843	 * @dev:	Device to supply
  4844	 * @np:		device node to search for consumers
  4845	 * @consumers:  Configuration of consumers; clients are stored here.
  4846	 *
  4847	 * @return number of regulators on success, an errno on failure.
  4848	 *
  4849	 * This helper function allows drivers to get several regulator
  4850	 * consumers in one operation.  If any of the regulators cannot be
  4851	 * acquired then any regulators that were allocated will be freed
  4852	 * before returning to the caller.
  4853	 */
  4854	int regulator_bulk_get_all(struct device *dev, struct device_node *np,
  4855				   struct regulator_bulk_data **consumers)
  4856	{
  4857		int num_consumers = 0;
  4858		struct regulator *tmp;
  4859		struct property *prop;
  4860		int i, n = 0, ret;
  4861		char name[64];
  4862	
  4863		*consumers = NULL;
  4864	
  4865	/*
  4866	 * first pass: get numbers of xxx-supply
  4867	 * second pass: fill consumers
  4868	 * */
  4869	restart:
> 4870		for_each_property_of_node(np, prop) {
  4871			i = is_supply_name(prop->name);
  4872			if (i == 0)
> 4873				continue;
  4874			if (!*consumers) {
  4875				num_consumers++;
  4876				continue;
  4877			} else {
  4878				memcpy(name, prop->name, i);
  4879				name[i] = '\0';
  4880				tmp = regulator_get(dev, name);
  4881				if (!tmp) {
  4882					ret = -EINVAL;
  4883					goto error;
  4884				}
  4885				(*consumers)[n].consumer = tmp;
  4886				n++;
  4887				continue;
  4888			}
  4889		}
  4890		if (*consumers)
  4891			return num_consumers;
  4892		if (num_consumers == 0)
  4893			return 0;
  4894		*consumers = kmalloc_array(num_consumers,
  4895					   sizeof(struct regulator_bulk_data),
  4896					   GFP_KERNEL);
  4897		if (!*consumers)
  4898			return -ENOMEM;
  4899		goto restart;
  4900	
  4901	error:
  4902		while (--n >= 0)
  4903			regulator_put(consumers[n]->consumer);
  4904		return ret;
  4905	}
  4906	EXPORT_SYMBOL_GPL(regulator_bulk_get_all);
  4907	

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

  reply	other threads:[~2022-05-23  9:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23  5:28 [PATCH v3 0/3] arm64: add ethernet to orange pi 3 Corentin Labbe
2022-05-23  5:28 ` [PATCH v3 1/3] regulator: Add regulator_bulk_get_all Corentin Labbe
2022-05-23  9:54   ` kernel test robot [this message]
2022-05-23 10:04   ` kernel test robot
2022-05-23 13:17   ` Mark Brown
2022-05-23  5:28 ` [PATCH v3 2/3] phy: handle optional regulator for PHY Corentin Labbe
2022-05-23  9:13   ` kernel test robot
2022-05-23  5:28 ` [PATCH v3 3/3] arm64: dts: allwinner: orange-pi-3: Enable ethernet Corentin Labbe

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=202205231748.IZoXf2Sf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=broonie@kernel.org \
    --cc=calvin.johnson@oss.nxp.com \
    --cc=clabbe@baylibre.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux@armlinux.org.uk \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=samuel@sholland.org \
    --cc=wens@csie.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