Re: [PATCH v3][RESEND] adp5061: Add support for battery charging enable

From: Ardelean, Alexandru
Date: Fri Nov 01 2019 - 09:52:16 EST


On Mon, 2019-10-14 at 07:10 +0800, kbuild test robot wrote:
> [External]
>
> Hi Alexandru,
>

Phew.
My bad here.
Either I have based it an older tree probably, or the ARM compilers did not
catch this.
The x86_64 compiler seems pretty nitpick-y [which is good[.
Will fix.


> I love your patch! Yet something to improve:
>
> [auto build test ERROR on power-supply/for-next]
> [cannot apply to v5.4-rc2 next-20191011]
> [if your patch is applied to the wrong git tree, please drop us a note to
> help
> improve the system. BTW, we also suggest to use '--base' option to
> specify the
> base tree in git format-patch, please see
> https://stackoverflow.com/a/37406982]
>
> url:
> https://github.com/0day-ci/linux/commits/Alexandru-Ardelean/adp5061-Add-support-for-battery-charging-enable/20191014-035456
> base:
> https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git
> for-next
> config: sparc64-allmodconfig (attached as .config)
> compiler: sparc64-linux-gcc (GCC) 7.4.0
> reproduce:
> wget
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
> -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> GCC_VERSION=7.4.0 make.cross ARCH=sparc64
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from include/linux/kobject.h:20:0,
> from include/linux/module.h:17,
> from drivers/power/supply/adp5061.c:9:
> > > drivers/power/supply/adp5061.c:738:44: error: initialization from
> > > incompatible pointer type [-Werror=incompatible-pointer-types]
> static DEVICE_ATTR(charging_enabled, 0644,
> adp5061_get_charging_enabled,
> ^
> include/linux/sysfs.h:104:10: note: in definition of macro '__ATTR'
> .show = _show, \
> ^~~~~
> > > drivers/power/supply/adp5061.c:738:8: note: in expansion of macro
> > > 'DEVICE_ATTR'
> static DEVICE_ATTR(charging_enabled, 0644,
> adp5061_get_charging_enabled,
> ^~~~~~~~~~~
> drivers/power/supply/adp5061.c:738:44: note: (near initialization for
> 'dev_attr_charging_enabled.show')
> static DEVICE_ATTR(charging_enabled, 0644,
> adp5061_get_charging_enabled,
> ^
> include/linux/sysfs.h:104:10: note: in definition of macro '__ATTR'
> .show = _show, \
> ^~~~~
> > > drivers/power/supply/adp5061.c:738:8: note: in expansion of macro
> > > 'DEVICE_ATTR'
> static DEVICE_ATTR(charging_enabled, 0644,
> adp5061_get_charging_enabled,
> ^~~~~~~~~~~
> drivers/power/supply/adp5061.c:739:6: error: initialization from
> incompatible pointer type [-Werror=incompatible-pointer-types]
> adp5061_set_charging_enabled);
> ^
> include/linux/sysfs.h:105:11: note: in definition of macro '__ATTR'
> .store = _store, \
> ^~~~~~
> > > drivers/power/supply/adp5061.c:738:8: note: in expansion of macro
> > > 'DEVICE_ATTR'
> static DEVICE_ATTR(charging_enabled, 0644,
> adp5061_get_charging_enabled,
> ^~~~~~~~~~~
> drivers/power/supply/adp5061.c:739:6: note: (near initialization for
> 'dev_attr_charging_enabled.store')
> adp5061_set_charging_enabled);
> ^
> include/linux/sysfs.h:105:11: note: in definition of macro '__ATTR'
> .store = _store, \
> ^~~~~~
> > > drivers/power/supply/adp5061.c:738:8: note: in expansion of macro
> > > 'DEVICE_ATTR'
> static DEVICE_ATTR(charging_enabled, 0644,
> adp5061_get_charging_enabled,
> ^~~~~~~~~~~
> cc1: some warnings being treated as errors
>
> vim +738 drivers/power/supply/adp5061.c
>
> 737
> > 738 static DEVICE_ATTR(charging_enabled, 0644,
> adp5061_get_charging_enabled,
> 739 adp5061_set_charging_enabled);
> 740
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology
> Center
> https://lists.01.org/pipermail/kbuild-all Intel
> Corporation