[gpio:gpio-descriptors-regulator 3/8] drivers/regulator/max77686-regulator.c:272:53: sparse: call with no 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
head:   3413d5a29dcb45755d49ae228a802630afd51073
commit: e7965b18441b7e9a3af0710a194eeb0c010ec411 [3/8] regulator: core: Only support passing enable GPIO descriptors
reproduce:
        # apt-get install sparse
        git checkout e7965b18441b7e9a3af0710a194eeb0c010ec411
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   drivers/regulator/max77686-regulator.c:272:23: sparse: no member 'ena_gpio' in struct regulator_config
   drivers/regulator/max77686-regulator.c:274:23: sparse: no member 'ena_gpio_flags' in struct regulator_config
   drivers/regulator/max77686-regulator.c:275:23: sparse: no member 'ena_gpio_initialized' in struct regulator_config
   drivers/regulator/max77686-regulator.c:281:33: sparse: no member 'ena_gpio' in struct regulator_config
>> drivers/regulator/max77686-regulator.c:272:53: sparse: call with no type!
>> drivers/regulator/max77686-regulator.c:272:23: sparse: generating address of non-lvalue (8)
   drivers/regulator/max77686-regulator.c:274:23: sparse: generating address of non-lvalue (8)
   drivers/regulator/max77686-regulator.c:275:23: sparse: generating address of non-lvalue (8)
   drivers/regulator/max77686-regulator.c:281:26: sparse: call with no type!
   drivers/regulator/max77686-regulator.c: In function 'max77686_of_parse_cb':
   drivers/regulator/max77686-regulator.c:272:11: error: 'struct regulator_config' has no member named 'ena_gpio'; did you mean 'ena_gpiod'?
      config->ena_gpio = of_get_named_gpio(np,
              ^~~~~~~~
              ena_gpiod
   drivers/regulator/max77686-regulator.c:274:11: error: 'struct regulator_config' has no member named 'ena_gpio_flags'; did you mean 'ena_gpiod'?
      config->ena_gpio_flags = GPIOF_OUT_INIT_HIGH;
              ^~~~~~~~~~~~~~
              ena_gpiod
   drivers/regulator/max77686-regulator.c:275:11: error: 'struct regulator_config' has no member named 'ena_gpio_initialized'; did you mean 'ena_gpio_invert'?
      config->ena_gpio_initialized = true;
              ^~~~~~~~~~~~~~~~~~~~
              ena_gpio_invert
   drivers/regulator/max77686-regulator.c:281:28: error: 'struct regulator_config' has no member named 'ena_gpio'; did you mean 'ena_gpiod'?
     if (gpio_is_valid(config->ena_gpio)) {
                               ^~~~~~~~
                               ena_gpiod
--
   drivers/regulator/wm8994-regulator.c:149:23: sparse: no member 'ena_gpio' in struct regulator_config
   drivers/regulator/wm8994-regulator.c:151:23: sparse: no member 'ena_gpio' in struct regulator_config
   drivers/regulator/wm8994-regulator.c:152:23: sparse: no member 'ena_gpio_initialized' in struct regulator_config
   drivers/regulator/wm8994-regulator.c:162:28: sparse: no member 'ena_gpio' in struct regulator_config
>> drivers/regulator/wm8994-regulator.c:149:49: sparse: unknown expression (8 46)
>> drivers/regulator/wm8994-regulator.c:149:23: sparse: generating address of non-lvalue (8)
   drivers/regulator/wm8994-regulator.c:151:56: sparse: unknown expression (8 46)
   drivers/regulator/wm8994-regulator.c:151:23: sparse: generating address of non-lvalue (8)
   drivers/regulator/wm8994-regulator.c:152:23: sparse: generating address of non-lvalue (8)
   drivers/regulator/wm8994-regulator.c:162:28: sparse: unknown expression (8 46)
   drivers/regulator/wm8994-regulator.c: In function 'wm8994_ldo_probe':
   drivers/regulator/wm8994-regulator.c:149:10: error: 'struct regulator_config' has no member named 'ena_gpio'; did you mean 'ena_gpiod'?
      config.ena_gpio = pdata->ldo[id].enable;
             ^~~~~~~~
             ena_gpiod
   drivers/regulator/wm8994-regulator.c:151:10: error: 'struct regulator_config' has no member named 'ena_gpio'; did you mean 'ena_gpiod'?
      config.ena_gpio = wm8994->pdata.ldo[id].enable;
             ^~~~~~~~
             ena_gpiod
   drivers/regulator/wm8994-regulator.c:152:10: error: 'struct regulator_config' has no member named 'ena_gpio_initialized'; did you mean 'ena_gpio_invert'?
      config.ena_gpio_initialized = true;
             ^~~~~~~~~~~~~~~~~~~~
             ena_gpio_invert
   drivers/regulator/wm8994-regulator.c:162:15: error: 'struct regulator_config' has no member named 'ena_gpio'; did you mean 'ena_gpiod'?
      if (!config.ena_gpio)
                  ^~~~~~~~
                  ena_gpiod

vim +272 drivers/regulator/max77686-regulator.c

f503071b drivers/regulator/max77686.c Yadwinder Singh Brar 2012-06-20  261  
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  262  static int max77686_of_parse_cb(struct device_node *np,
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  263  		const struct regulator_desc *desc,
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  264  		struct regulator_config *config)
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  265  {
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  266  	struct max77686_data *max77686 = config->driver_data;
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  267  
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  268  	switch (desc->id) {
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  269  	case MAX77686_BUCK8:
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  270  	case MAX77686_BUCK9:
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  271  	case MAX77686_LDO20 ... MAX77686_LDO22:
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05 @272  		config->ena_gpio = of_get_named_gpio(np,
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  273  					"maxim,ena-gpios", 0);
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  274  		config->ena_gpio_flags = GPIOF_OUT_INIT_HIGH;
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  275  		config->ena_gpio_initialized = true;
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  276  		break;
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  277  	default:
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  278  		return 0;
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  279  	}
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  280  
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  281  	if (gpio_is_valid(config->ena_gpio)) {
c53403a3 drivers/regulator/max77686.c Joe Perches          2015-05-18  282  		set_bit(desc->id, max77686->gpio_enabled);
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  283  
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  284  		return regmap_update_bits(config->regmap, desc->enable_reg,
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  285  					  desc->enable_mask,
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  286  					  MAX77686_GPIO_CONTROL);
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  287  	}
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  288  
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  289  	return 0;
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  290  }
3307e902 drivers/regulator/max77686.c Krzysztof Kozlowski  2015-01-05  291  

:::::: The code at line 272 was first introduced by commit
:::::: 3307e9025d29105ecc5fa1144508715cdddba195 regulator: max77686: Add GPIO control

:::::: TO: Krzysztof Kozlowski <k.kozlowski@xxxxxxxxxxx>
:::::: CC: Mark Brown <broonie@xxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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