Re: [PATCH] pm: Fix build issues in ds278* (thinkpad_acpi)

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

 



Hi Ognjen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on battery/master]
[also build test ERROR on v4.15-rc5 next-20171222]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Ognjen-Galic/pm-Fix-build-issues-in-ds278-thinkpad_acpi/20171224-181540
base:   git://git.infradead.org/battery-2.6.git master
config: i386-randconfig-x007-201752 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   drivers/power//supply/ds2780_battery.c: In function 'ds2780_get_pmod_enabled':
>> drivers/power//supply/ds2780_battery.c:453:29: error: implicit declaration of function 'to_power_supply'; did you mean 'power_supply_put'? [-Werror=implicit-function-declaration]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
                                power_supply_put
>> drivers/power//supply/ds2780_battery.c:453:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
   drivers/power//supply/ds2780_battery.c: In function 'ds2780_set_pmod_enabled':
   drivers/power//supply/ds2780_battery.c:472:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2780_battery.c: In function 'ds2780_get_sense_resistor_value':
   drivers/power//supply/ds2780_battery.c:507:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2780_battery.c: In function 'ds2780_set_sense_resistor_value':
   drivers/power//supply/ds2780_battery.c:525:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2780_battery.c: In function 'ds2780_get_rsgain_setting':
   drivers/power//supply/ds2780_battery.c:545:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2780_battery.c: In function 'ds2780_set_rsgain_setting':
   drivers/power//supply/ds2780_battery.c:562:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2780_battery.c: In function 'ds2780_get_pio_pin':
   drivers/power//supply/ds2780_battery.c:588:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2780_battery.c: In function 'ds2780_set_pio_pin':
   drivers/power//supply/ds2780_battery.c:606:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2780_battery.c: In function 'ds2780_read_param_eeprom_bin':
   drivers/power//supply/ds2780_battery.c:632:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2780_battery.c: In function 'ds2780_write_param_eeprom_bin':
   drivers/power//supply/ds2780_battery.c:645:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2780_battery.c: In function 'ds2780_read_user_eeprom_bin':
   drivers/power//supply/ds2780_battery.c:677:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2780_battery.c: In function 'ds2780_write_user_eeprom_bin':
   drivers/power//supply/ds2780_battery.c:690:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_get_pmod_enabled':
>> drivers/power//supply/ds2781_battery.c:455:29: error: implicit declaration of function 'to_power_supply'; did you mean 'power_supply_put'? [-Werror=implicit-function-declaration]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
                                power_supply_put
>> drivers/power//supply/ds2781_battery.c:455:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_set_pmod_enabled':
   drivers/power//supply/ds2781_battery.c:474:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_get_sense_resistor_value':
   drivers/power//supply/ds2781_battery.c:509:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_set_sense_resistor_value':
   drivers/power//supply/ds2781_battery.c:527:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_get_rsgain_setting':
   drivers/power//supply/ds2781_battery.c:547:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_set_rsgain_setting':
   drivers/power//supply/ds2781_battery.c:564:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_get_pio_pin':
   drivers/power//supply/ds2781_battery.c:590:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_set_pio_pin':
   drivers/power//supply/ds2781_battery.c:608:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_read_param_eeprom_bin':
   drivers/power//supply/ds2781_battery.c:634:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_write_param_eeprom_bin':
   drivers/power//supply/ds2781_battery.c:647:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_read_user_eeprom_bin':
   drivers/power//supply/ds2781_battery.c:679:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   drivers/power//supply/ds2781_battery.c: In function 'ds2781_write_user_eeprom_bin':
   drivers/power//supply/ds2781_battery.c:693:29: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +453 drivers/power//supply/ds2780_battery.c

275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  446  
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  447  static ssize_t ds2780_get_pmod_enabled(struct device *dev,
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  448  	struct device_attribute *attr,
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  449  	char *buf)
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  450  {
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  451  	int ret;
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  452  	u8 control_reg;
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26 @453  	struct power_supply *psy = to_power_supply(dev);
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  454  	struct ds2780_device_info *dev_info = to_ds2780_device_info(psy);
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  455  
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  456  	/* Get power mode */
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  457  	ret = ds2780_get_control_register(dev_info, &control_reg);
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  458  	if (ret < 0)
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  459  		return ret;
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  460  
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  461  	return sprintf(buf, "%d\n",
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  462  		 !!(control_reg & DS2780_CONTROL_REG_PMOD));
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  463  }
275ac746 drivers/power/ds2780_battery.c Clifton Barnes 2011-05-26  464  

:::::: The code at line 453 was first introduced by commit
:::::: 275ac74629c4d8ec430d7edecb16d936f46a47c5 w1: add Maxim/Dallas DS2780 Stand-Alone Fuel Gauge IC support

:::::: TO: Clifton Barnes <cabarnes@xxxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
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 Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux