* [lunn:v6.12.0-scu4-dt-overlay 24/30] drivers/gpio/gpiolib-of.c:1201:2: error: call to undeclared function 'of_changeset_revert'; ISO C99 and later do not support implicit function declarations
@ 2024-11-30 7:03 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-11-30 7:03 UTC (permalink / raw)
To: Andrew Lunn; +Cc: llvm, oe-kbuild-all
tree: https://github.com/lunn/linux.git v6.12.0-scu4-dt-overlay
head: 6a87eb702125c86f68c9c466c941b914713c8252
commit: 3003e9eae5cddbc635a165d44194a95e1d26b5be [24/30] gpio: Dynamically add OF nodes if not present
config: arm-integrator_defconfig (https://download.01.org/0day-ci/archive/20241130/202411301523.8UcTC7Yz-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241130/202411301523.8UcTC7Yz-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/202411301523.8UcTC7Yz-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/gpio/gpiolib-of.c:1191:6: error: redefinition of 'of_gpiochip_remove_dev_node'
1191 | void of_gpiochip_remove_dev_node(struct gpio_chip *chip)
| ^
drivers/gpio/gpiolib-of.h:50:20: note: previous definition is here
50 | static inline void of_gpiochip_remove_dev_node(struct gpio_chip *chip) {};
| ^
>> drivers/gpio/gpiolib-of.c:1201:2: error: call to undeclared function 'of_changeset_revert'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1201 | of_changeset_revert(np->data);
| ^
>> drivers/gpio/gpiolib-of.c:1202:2: error: call to undeclared function 'of_changeset_destroy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1202 | of_changeset_destroy(np->data);
| ^
>> drivers/gpio/gpiolib-of.c:1217:8: error: call to undeclared function 'of_changeset_add_prop_bool'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1217 | ret = of_changeset_add_prop_bool(ocs, np, "gpio-controller");
| ^
>> drivers/gpio/gpiolib-of.c:1221:9: error: call to undeclared function 'of_changeset_add_prop_u32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1221 | return of_changeset_add_prop_u32(ocs, np, "#gpio-cells", 2);
| ^
drivers/gpio/gpiolib-of.c:1224:6: error: redefinition of 'of_gpiochip_make_dev_node'
1224 | void of_gpiochip_make_dev_node(struct gpio_chip *chip)
| ^
drivers/gpio/gpiolib-of.h:49:20: note: previous definition is here
49 | static inline void of_gpiochip_make_dev_node(struct gpio_chip *chip) {}
| ^
>> drivers/gpio/gpiolib-of.c:1241:2: error: call to undeclared function 'of_changeset_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1241 | of_changeset_init(cset);
| ^
>> drivers/gpio/gpiolib-of.c:1243:7: error: call to undeclared function 'of_changeset_create_node'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1243 | np = of_changeset_create_node(cset, of_root, chip->label);
| ^
>> drivers/gpio/gpiolib-of.c:1243:5: error: incompatible integer to pointer conversion assigning to 'struct device_node *' from 'int' [-Wint-conversion]
1243 | np = of_changeset_create_node(cset, of_root, chip->label);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpiolib-of.c:1251:8: error: call to undeclared function 'of_changeset_apply'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1251 | ret = of_changeset_apply(cset);
| ^
drivers/gpio/gpiolib-of.c:1263:2: error: call to undeclared function 'of_changeset_destroy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1263 | of_changeset_destroy(cset);
| ^
11 errors generated.
vim +/of_changeset_revert +1201 drivers/gpio/gpiolib-of.c
1190
1191 void of_gpiochip_remove_dev_node(struct gpio_chip *chip)
1192 {
1193 struct device_node *np;
1194
1195 np = dev_of_node(&chip->gpiodev->dev);
1196 if (!np || !of_node_check_flag(np, OF_DYNAMIC))
1197 return;
1198
1199 chip->gpiodev->dev.of_node = NULL;
1200
> 1201 of_changeset_revert(np->data);
> 1202 of_changeset_destroy(np->data);
1203 of_node_put(np);
1204 }
1205
1206 static int of_gpiochip_add_properties(struct gpio_chip *chip,
1207 struct of_changeset *ocs,
1208 struct device_node *np)
1209 {
1210 int ret;
1211
1212 /*
1213 * The added properties will be released when the
1214 * changeset is destroyed.
1215 */
1216
> 1217 ret = of_changeset_add_prop_bool(ocs, np, "gpio-controller");
1218 if (ret)
1219 return ret;
1220
> 1221 return of_changeset_add_prop_u32(ocs, np, "#gpio-cells", 2);
1222 }
1223
1224 void of_gpiochip_make_dev_node(struct gpio_chip *chip)
1225 {
1226 struct device_node *np = NULL;
1227 struct of_changeset *cset;
1228 int ret;
1229
1230 /*
1231 * If there is already a device tree node linked to this device,
1232 * return immediately.
1233 */
1234 if (chip->gpiodev->dev.of_node)
1235 return;
1236
1237 cset = kmalloc(sizeof(*cset), GFP_KERNEL);
1238 if (!cset)
1239 return;
1240
> 1241 of_changeset_init(cset);
1242
> 1243 np = of_changeset_create_node(cset, of_root, chip->label);
1244 if (!np)
1245 goto out_destroy_cset;
1246
1247 ret = of_gpiochip_add_properties(chip, cset, np);
1248 if (ret)
1249 goto out_free_node;
1250
> 1251 ret = of_changeset_apply(cset);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-11-30 7:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-30 7:03 [lunn:v6.12.0-scu4-dt-overlay 24/30] drivers/gpio/gpiolib-of.c:1201:2: error: call to undeclared function 'of_changeset_revert'; ISO C99 and later do not support implicit function declarations kernel test robot
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).