[gpio:gpio-descriptors-regulator-fixup 8/10] drivers//regulator/max77686-regulator.c:258:46: warning: passing argument 1 of 'gpiod_get_from_of_node' from incompatible pointer type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-regulator-fixup
head:   9147361eb80075e5eb6cae3ddec80c7dd3c9e0d9
commit: fbe06830640208958d58fb3af66b1d5f2add6b84 [8/10] regulator: max77686: Let core handle GPIO descriptor
config: i386-randconfig-sb0-11272323 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        git checkout fbe06830640208958d58fb3af66b1d5f2add6b84
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers//regulator/max77686-regulator.c: In function 'max77686_of_parse_cb':
>> drivers//regulator/max77686-regulator.c:258:46: warning: passing argument 1 of 'gpiod_get_from_of_node' from incompatible pointer type
      config->ena_gpiod = gpiod_get_from_of_node(max77686->dev,
                                                 ^
   In file included from drivers//regulator/max77686-regulator.c:14: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/max77686-regulator.c:259:5: warning: passing argument 2 of 'gpiod_get_from_of_node' from incompatible pointer type
        np,
        ^
   In file included from drivers//regulator/max77686-regulator.c:14: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/max77686-regulator.c:260:5: warning: passing argument 3 of 'gpiod_get_from_of_node' makes integer from pointer without a cast
        "maxim,ena",
        ^
   In file included from drivers//regulator/max77686-regulator.c:14: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/max77686-regulator.c:262:5: 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/max77686-regulator.c:14: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/max77686-regulator.c:258:23: error: too many arguments to function 'gpiod_get_from_of_node'
      config->ena_gpiod = gpiod_get_from_of_node(max77686->dev,
                          ^
   In file included from drivers//regulator/max77686-regulator.c:14: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 +258 drivers//regulator/max77686-regulator.c

   247	
   248	static int max77686_of_parse_cb(struct device_node *np,
   249			const struct regulator_desc *desc,
   250			struct regulator_config *config)
   251	{
   252		struct max77686_data *max77686 = config->driver_data;
   253	
   254		switch (desc->id) {
   255		case MAX77686_BUCK8:
   256		case MAX77686_BUCK9:
   257		case MAX77686_LDO20 ... MAX77686_LDO22:
 > 258			config->ena_gpiod = gpiod_get_from_of_node(max77686->dev,
   259					np,
   260					"maxim,ena",
   261					0,
   262					GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
   263					"max77686-regulator");
   264			if (IS_ERR(config->ena_gpiod))
   265				config->ena_gpiod = NULL;
   266			break;
   267		default:
   268			return 0;
   269		}
   270	
   271		if (config->ena_gpiod) {
   272			set_bit(desc->id, max77686->gpio_enabled);
   273	
   274			return regmap_update_bits(config->regmap, desc->enable_reg,
   275						  desc->enable_mask,
   276						  MAX77686_GPIO_CONTROL);
   277		}
   278	
   279		return 0;
   280	}
   281	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux