Re: [RESEND PATCH] regulator: userspace-consumer: Retrieve supplies from DT

From: kernel test robot
Date: Sat Sep 23 2023 - 06:46:52 EST


Hi Naresh,

kernel test robot noticed the following build errors:

[auto build test ERROR on 451e85e29c9d6f20639d4cfcff4b9dea280178cc]

url: https://github.com/intel-lab-lkp/linux/commits/Naresh-Solanki/regulator-userspace-consumer-Retrieve-supplies-from-DT/20230922-170527
base: 451e85e29c9d6f20639d4cfcff4b9dea280178cc
patch link: https://lore.kernel.org/r/20230922090330.1570350-1-naresh.solanki%409elements.com
patch subject: [RESEND PATCH] regulator: userspace-consumer: Retrieve supplies from DT
config: x86_64-randconfig-161-20230923 (https://download.01.org/0day-ci/archive/20230923/202309231829.VrGZUH4E-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230923/202309231829.VrGZUH4E-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309231829.VrGZUH4E-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

drivers/regulator/userspace-consumer.c: In function 'get_num_supplies':
>> drivers/regulator/userspace-consumer.c:126:9: error: implicit declaration of function 'for_each_property_of_node'; did you mean 'for_each_child_of_node'? [-Werror=implicit-function-declaration]
126 | for_each_property_of_node(pdev->dev.of_node, prop) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| for_each_child_of_node
>> drivers/regulator/userspace-consumer.c:126:59: error: expected ';' before '{' token
126 | for_each_property_of_node(pdev->dev.of_node, prop) {
| ^~
| ;
drivers/regulator/userspace-consumer.c:124:13: warning: unused variable 'num_supplies' [-Wunused-variable]
124 | int num_supplies = 0;
| ^~~~~~~~~~~~
drivers/regulator/userspace-consumer.c:136:1: error: no return statement in function returning non-void [-Werror=return-type]
136 | }
| ^
drivers/regulator/userspace-consumer.c: In function 'regulator_userspace_consumer_probe':
drivers/regulator/userspace-consumer.c:162:67: error: expected ';' before '{' token
162 | for_each_property_of_node(pdev->dev.of_node, prop) {
| ^~
| ;
cc1: some warnings being treated as errors


vim +126 drivers/regulator/userspace-consumer.c

120
121 static int get_num_supplies(struct platform_device *pdev)
122 {
123 struct property *prop;
124 int num_supplies = 0;
125
> 126 for_each_property_of_node(pdev->dev.of_node, prop) {
127 const char *prop_name = prop->name;
128 int len = strlen(prop_name);
129
130 if (len > SUPPLY_SUFFIX_LEN &&
131 strcmp(prop_name + len - SUPPLY_SUFFIX_LEN, SUPPLY_SUFFIX) == 0) {
132 num_supplies++;
133 }
134 }
135 return num_supplies;
136 }
137

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