Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1771106ioo; Mon, 23 May 2022 02:58:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/BxmdLF30uXxC4X5Mb0QN1XujVJdIUpXMvWcaI2IVUcKcvWDFUBtzn4ZyWzj0k18ghnQ1 X-Received: by 2002:a05:6a00:23c1:b0:518:bab0:fe30 with SMTP id g1-20020a056a0023c100b00518bab0fe30mr364672pfc.43.1653299918925; Mon, 23 May 2022 02:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653299918; cv=none; d=google.com; s=arc-20160816; b=CJmonY+/fKsbSMl16PJfSBSj2EJYIuRDBt8bOMMrTXaP16GAJ/5pxiIBDCShf9/jZE 1sVqhWTYqnUwdvp5gET2a56UbHaavzY3cVkPM+ZjvrQ2GpTnbZLDyuNmVgGPi9PBGbmA B2hob73YkB2wL1U4ZaeJWq8wYI7D6SgnUeP/NVScCHvZBSbB7EnEq5lbgoKpS7DsKfod KmXhs3c+FnJ/YyYyg/9054pBhXLAaTco7BaYWJO7mE3sfXwMGY5bMHDUDlp6LgG4BCE0 VhK3EYt6oBwbIjOF15gUbPGWqNx4TiRpEE6uczmRwdbFqq76eq7qTUOts5Oojm8QWKUF DIXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=k/N/04JNoaUoarG3H35fPW79L8sEnnzWNnel3Ej4Tbg=; b=VHUGB00RpYJFVsrUfFZcnTQFNsqAHj938uJnYJe1vGY6g7fmeY5PhTGIFwpn2EjrHL wQZKicn0z8dvp5P1VowM18e9JsXi6XZsb5unrZWZTc4dFRB8HBjY6bT2RgHjXklOVjOk yEtAKnbGuI0NJkfth9pc3BfkA95DekSPrTM/zxHxs8zrApLN3KgknuriPOjYJA9jkoDw oab2tP4Nf6GhTV9tgqBHiXCI2F8Star78GKMKxRL/FcE/GAdWGaKurKBCr3/D178kC4o S5pV2lqV9LCl50DNsojLOrsLkC8ggeqs1/5zRTyXwu0x7OUDs4Fdd1LOtzVUBYTCpdoy vtzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ddtIb2IB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x8-20020a1709028ec800b00161f0c7b815si8955993plo.315.2022.05.23.02.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 02:58:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ddtIb2IB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DE16D3DDCE; Mon, 23 May 2022 02:55:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233626AbiEWJzU (ORCPT + 99 others); Mon, 23 May 2022 05:55:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233565AbiEWJzS (ORCPT ); Mon, 23 May 2022 05:55:18 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 570F21A3A5; Mon, 23 May 2022 02:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653299717; x=1684835717; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=eqM+jPOTUeunb8PUCCDFxOTPR27hmR70Sc5kkvXLcJ0=; b=ddtIb2IBr49mgoQc0pV+QWuSM3yE3dBuI7Y+aJTWYU/QYMEYYCEKkKfO ZuVHYs27aWylfX5rQa4UqJYmTQm6zWTGe3FRVwCnCcR5UFk7bCK7hcfsA h3Ge3Q8SICAP8nu6pulazfINS49761Ej6dVBvzR7wPzvxhKOu/TB5yGxn 626TZeYeFuZ1N5mBTvJgOg8/+NnW8wfAp4c5ldYBLuWIgMAR0o7/mJipt N6fyDgopt1sbz6xJmdXncKyjBGRhXYVFlUoMIvIO9NvpZeSz2d2qaFBJM DRNqM/0StIe58Q3xeyOfxXOgovKYEfSlq+C09uq9QDWeLFqT2pVS/24yt g==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="273288353" X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208";a="273288353" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 02:55:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208";a="629291059" Received: from lkp-server01.sh.intel.com (HELO db63a1be7222) ([10.239.97.150]) by fmsmga008.fm.intel.com with ESMTP; 23 May 2022 02:54:53 -0700 Received: from kbuild by db63a1be7222 with local (Exim 4.95) (envelope-from ) id 1nt4m4-00013A-G3; Mon, 23 May 2022 09:54:52 +0000 Date: Mon, 23 May 2022 17:54:25 +0800 From: kernel test robot To: Corentin Labbe , 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 Subject: Re: [PATCH v3 1/3] regulator: Add regulator_bulk_get_all Message-ID: <202205231748.IZoXf2Sf-lkp@intel.com> References: <20220523052807.4044800-2-clabbe@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220523052807.4044800-2-clabbe@baylibre.com> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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