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-s1-201752 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   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' [-Werror=implicit-function-declaration]
     struct power_supply *psy = to_power_supply(dev);
                                ^~~~~~~~~~~~~~~
   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 +/to_power_supply +455 drivers/power/supply/ds2781_battery.c

fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  448  
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  449  static ssize_t ds2781_get_pmod_enabled(struct device *dev,
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  450  	struct device_attribute *attr,
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  451  	char *buf)
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  452  {
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  453  	int ret;
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  454  	u8 control_reg;
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29 @455  	struct power_supply *psy = to_power_supply(dev);
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  456  	struct ds2781_device_info *dev_info = to_ds2781_device_info(psy);
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  457  
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  458  	/* Get power mode */
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  459  	ret = ds2781_get_control_register(dev_info, &control_reg);
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  460  	if (ret < 0)
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  461  		return ret;
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  462  
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  463  	return sprintf(buf, "%d\n",
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  464  		 !!(control_reg & DS2781_CONTROL_PMOD));
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  465  }
fef37e9a drivers/power/ds2781_battery.c Renata Sayakhova 2012-02-29  466  

:::::: The code at line 455 was first introduced by commit
:::::: fef37e9a47b9927ce2817fe1a0fa8cf40f6eefb6 DS2781 Maxim Stand-Alone Fuel Gauge battery and w1 slave drivers

:::::: TO: Renata Sayakhova <rsayakhova@xxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
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 IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux