tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-regulator-fixup head: 9147361eb80075e5eb6cae3ddec80c7dd3c9e0d9 commit: c99c3a93a581d7575817b7b344a260b6b72245a2 [7/10] regulator: da9211: Let core handle GPIO descriptors config: i386-randconfig-sb0-11272323 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: git checkout c99c3a93a581d7575817b7b344a260b6b72245a2 # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): drivers//regulator/da9211-regulator.c: In function 'da9211_parse_regulators_dt': >> drivers//regulator/da9211-regulator.c:296:48: warning: passing argument 1 of 'gpiod_get_from_of_node' from incompatible pointer type pdata->gpiod_ren[n] = gpiod_get_from_of_node(dev, ^ In file included from drivers//regulator/da9211-regulator.c:27:0: include/linux/gpio/consumer.h:175:19: note: expected 'struct device_node *' but argument is of type 'struct device *' struct gpio_desc *gpiod_get_from_of_node(struct device_node *node, ^ drivers//regulator/da9211-regulator.c:297:7: warning: passing argument 2 of 'gpiod_get_from_of_node' from incompatible pointer type da9211_matches[i].of_node, ^ In file included from drivers//regulator/da9211-regulator.c:27:0: include/linux/gpio/consumer.h:175:19: note: expected 'const char *' but argument is of type 'struct device_node *' struct gpio_desc *gpiod_get_from_of_node(struct device_node *node, ^ drivers//regulator/da9211-regulator.c:298:7: warning: passing argument 3 of 'gpiod_get_from_of_node' makes integer from pointer without a cast "enable", ^ In file included from drivers//regulator/da9211-regulator.c:27:0: include/linux/gpio/consumer.h:175:19: note: expected 'int' but argument is of type 'char *' struct gpio_desc *gpiod_get_from_of_node(struct device_node *node, ^ drivers//regulator/da9211-regulator.c:300:7: warning: passing argument 5 of 'gpiod_get_from_of_node' makes pointer from integer without a cast GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE, ^ In file included from drivers//regulator/da9211-regulator.c:27:0: include/linux/gpio/consumer.h:175:19: note: expected 'const char *' but argument is of type 'long unsigned int' struct gpio_desc *gpiod_get_from_of_node(struct device_node *node, ^ drivers//regulator/da9211-regulator.c:296:25: error: too many arguments to function 'gpiod_get_from_of_node' pdata->gpiod_ren[n] = gpiod_get_from_of_node(dev, ^ In file included from drivers//regulator/da9211-regulator.c:27:0: include/linux/gpio/consumer.h:175:19: note: declared here struct gpio_desc *gpiod_get_from_of_node(struct device_node *node, ^ vim +/gpiod_get_from_of_node +296 drivers//regulator/da9211-regulator.c 255 256 #ifdef CONFIG_OF 257 static struct of_regulator_match da9211_matches[] = { 258 [DA9211_ID_BUCKA] = { .name = "BUCKA" }, 259 [DA9211_ID_BUCKB] = { .name = "BUCKB" }, 260 }; 261 262 static struct da9211_pdata *da9211_parse_regulators_dt( 263 struct device *dev) 264 { 265 struct da9211_pdata *pdata; 266 struct device_node *node; 267 int i, num, n; 268 269 node = of_get_child_by_name(dev->of_node, "regulators"); 270 if (!node) { 271 dev_err(dev, "regulators node not found\n"); 272 return ERR_PTR(-ENODEV); 273 } 274 275 num = of_regulator_match(dev, node, da9211_matches, 276 ARRAY_SIZE(da9211_matches)); 277 of_node_put(node); 278 if (num < 0) { 279 dev_err(dev, "Failed to match regulators\n"); 280 return ERR_PTR(-EINVAL); 281 } 282 283 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); 284 if (!pdata) 285 return ERR_PTR(-ENOMEM); 286 287 pdata->num_buck = num; 288 289 n = 0; 290 for (i = 0; i < ARRAY_SIZE(da9211_matches); i++) { 291 if (!da9211_matches[i].init_data) 292 continue; 293 294 pdata->init_data[n] = da9211_matches[i].init_data; 295 pdata->reg_node[n] = da9211_matches[i].of_node; > 296 pdata->gpiod_ren[n] = gpiod_get_from_of_node(dev, 297 da9211_matches[i].of_node, 298 "enable", 299 0, 300 GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE, 301 "da9211-enable"); 302 n++; 303 } 304 305 return pdata; 306 } 307 #else 308 static struct da9211_pdata *da9211_parse_regulators_dt( 309 struct device *dev) 310 { 311 return ERR_PTR(-ENODEV); 312 } 313 #endif 314 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip