drivers/platform/x86/hp/hp-wmi.c:1057:16: error: implicit declaration of function 'devm_battery_hook_register'; did you mean 'acpi_battery_hook_register'?
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge head: 51bafe2e7302403a43ba45415bf9a268a7fcaa05 commit: fafe4f5166bc3d43e28967efb9ea82b1f456b798 [9/22] Merge branch 'acpi-battery' into bleeding-edge config: x86_64-randconfig-2003-20261111 (https://download.01.org/0day-ci/archive/20261111/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261111/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
drivers/platform/x86/hp/hp-wmi.c: In function 'hp_wmi_charge_control_setup':
>> drivers/platform/x86/hp/hp-wmi.c:1057:16: error: implicit declaration of function 'devm_battery_hook_register'; did you mean 'acpi_battery_hook_register'? [-Wimplicit-function-declaration]
1057 | return devm_battery_hook_register(dev, &hp_wmi_charge_battery_hook);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| acpi_battery_hook_registervim +1057 drivers/platform/x86/hp/hp-wmi.c
929433336e0a6e Shang En Sim 2026-09-30 1033
929433336e0a6e Shang En Sim 2026-09-30 1034 static int __init hp_wmi_charge_control_setup(struct device *dev)
929433336e0a6e Shang En Sim 2026-09-30 1035 {
929433336e0a6e Shang En Sim 2026-09-30 1036 enum power_supply_charge_behaviour behaviour;
929433336e0a6e Shang En Sim 2026-09-30 1037 int ret;
929433336e0a6e Shang En Sim 2026-09-30 1038
929433336e0a6e Shang En Sim 2026-09-30 1039 if (!dmi_check_system(hp_wmi_charge_control_quirks))
929433336e0a6e Shang En Sim 2026-09-30 1040 return 0;
929433336e0a6e Shang En Sim 2026-09-30 1041
929433336e0a6e Shang En Sim 2026-09-30 1042 /*
929433336e0a6e Shang En Sim 2026-09-30 1043 * Firmware retains inhibit across reboot, so seed from GBCO rather
929433336e0a6e Shang En Sim 2026-09-30 1044 * than assuming auto.
929433336e0a6e Shang En Sim 2026-09-30 1045 */
929433336e0a6e Shang En Sim 2026-09-30 1046 ret = hp_wmi_charge_mode_read();
929433336e0a6e Shang En Sim 2026-09-30 1047 if (ret < 0)
929433336e0a6e Shang En Sim 2026-09-30 1048 return 0;
929433336e0a6e Shang En Sim 2026-09-30 1049
929433336e0a6e Shang En Sim 2026-09-30 1050 ret = hp_wmi_charge_mode_to_behaviour(ret, &behaviour);
929433336e0a6e Shang En Sim 2026-09-30 1051 if (ret)
929433336e0a6e Shang En Sim 2026-09-30 1052 return 0;
929433336e0a6e Shang En Sim 2026-09-30 1053
929433336e0a6e Shang En Sim 2026-09-30 1054 scoped_guard(mutex, &hp_wmi_charge_lock)
929433336e0a6e Shang En Sim 2026-09-30 1055 hp_wmi_charge_behaviour = behaviour;
929433336e0a6e Shang En Sim 2026-09-30 1056
929433336e0a6e Shang En Sim 2026-09-30 @1057 return devm_battery_hook_register(dev, &hp_wmi_charge_battery_hook);
929433336e0a6e Shang En Sim 2026-09-30 1058 }
929433336e0a6e Shang En Sim 2026-09-30 1059 #else
929433336e0a6e Shang En Sim 2026-09-30 1060 static int __init hp_wmi_charge_control_setup(struct device *dev)
929433336e0a6e Shang En Sim 2026-09-30 1061 {
929433336e0a6e Shang En Sim 2026-09-30 1062 return 0;
929433336e0a6e Shang En Sim 2026-09-30 1063 }
929433336e0a6e Shang En Sim 2026-09-30 1064 #endif929433336e0a6e Shang En Sim 2026-09-30 1065
:::::: The code at line 1057 was first introduced by commit
:::::: 929433336e0a6e5014af7b8849f369712d2c8964 platform/x86: hp-wmi: add charge_behaviour support for Spectre 8C15/8C17
:::::: TO: Shang En Sim <[email protected]> :::::: CC: Ilpo Järvinen <[email protected]>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Quoted 7 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge head: 51bafe2e7302403a43ba45415bf9a268a7fcaa05 commit: fafe4f5166bc3d43e28967efb9ea82b1f456b798 [9/22] Merge branch 'acpi-battery' into bleeding-edge config: x86_64-randconfig-2003-20261111 (https://download.01.org/0day-ci/archive/20261111/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261111/[email protected]/reproduce)
Quoted 5 lines
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Addressed the same issue on https://lore.kernel.org/all/[email protected]/
Quoted 55 lines
All errors (new ones prefixed by >>):
drivers/platform/x86/hp/hp-wmi.c: In function 'hp_wmi_charge_control_setup':Quoted 1 line
Quoted 1 line
drivers/platform/x86/hp/hp-wmi.c:1057:16: error: implicit declaration of function 'devm_battery_hook_register'; did you mean 'acpi_battery_hook_register'? [-Wimplicit-function-declaration]1057 | return devm_battery_hook_register(dev, &hp_wmi_charge_battery_hook); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | acpi_battery_hook_registervim +1057
drivers/platform/x86/hp/hp-wmi.c929433336e0a6e Shang En Sim 2026-09-30 1033 929433336e0a6e Shang En Sim 2026-09-30 1034 static int __init hp_wmi_charge_control_setup(struct device *dev) 929433336e0a6e Shang En Sim 2026-09-30 1035 { 929433336e0a6e Shang En Sim 2026-09-30 1036 enum power_supply_charge_behaviour behaviour; 929433336e0a6e Shang En Sim 2026-09-30 1037 int ret; 929433336e0a6e Shang En Sim 2026-09-30 1038 929433336e0a6e Shang En Sim 2026-09-30 1039 if (!dmi_check_system(hp_wmi_charge_control_quirks)) 929433336e0a6e Shang En Sim 2026-09-30 1040 return 0; 929433336e0a6e Shang En Sim 2026-09-30 1041 929433336e0a6e Shang En Sim 2026-09-30 1042 /* 929433336e0a6e Shang En Sim 2026-09-30 1043 * Firmware retains inhibit across reboot, so seed from GBCO rather 929433336e0a6e Shang En Sim 2026-09-30 1044 * than assuming auto. 929433336e0a6e Shang En Sim 2026-09-30 1045 */ 929433336e0a6e Shang En Sim 2026-09-30 1046 ret = hp_wmi_charge_mode_read(); 929433336e0a6e Shang En Sim 2026-09-30 1047 if (ret < 0) 929433336e0a6e Shang En Sim 2026-09-30 1048 return 0; 929433336e0a6e Shang En Sim 2026-09-30 1049 929433336e0a6e Shang En Sim 2026-09-30 1050 ret = hp_wmi_charge_mode_to_behaviour(ret, &behaviour); 929433336e0a6e Shang En Sim 2026-09-30 1051 if (ret) 929433336e0a6e Shang En Sim 2026-09-30 1052 return 0; 929433336e0a6e Shang En Sim 2026-09-30 1053 929433336e0a6e Shang En Sim 2026-09-30 1054 scoped_guard(mutex, &hp_wmi_charge_lock) 929433336e0a6e Shang En Sim 2026-09-30 1055 hp_wmi_charge_behaviour = behaviour; 929433336e0a6e Shang En Sim 2026-09-30 1056 929433336e0a6e Shang En Sim 2026-09-30 @1057 return devm_battery_hook_register(dev, &hp_wmi_charge_battery_hook); 929433336e0a6e Shang En Sim 2026-09-30 1058 } 929433336e0a6e Shang En Sim 2026-09-30 1059 #else 929433336e0a6e Shang En Sim 2026-09-30 1060 static int __init hp_wmi_charge_control_setup(struct device *dev) 929433336e0a6e Shang En Sim 2026-09-30 1061 { 929433336e0a6e Shang En Sim 2026-09-30 1062 return 0; 929433336e0a6e Shang En Sim 2026-09-30 1063 } 929433336e0a6e Shang En Sim 2026-09-30 1064 #endif
929433336e0a6eShang En Sim 2026-09-30 1065:::::: The code at line 1057 was first introduced by commit
::::::929433336e0a6e5014af7b8849f369712d2c8964platform/x86: hp-wmi: addcharge_behavioursupport for Spectre 8C15/8C17:::::: TO: Shang En Sim <[email protected]> :::::: CC: Ilpo Järvinen <[email protected]>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Signature · 2 lines
Thx and BRs, Zhongqiu Han
Rafael J. Wysocki (Intel)
maintainerQuoted 9 lines · Zhongqiu Han
Quoted 7 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge head: 51bafe2e7302403a43ba45415bf9a268a7fcaa05 commit: fafe4f5166bc3d43e28967efb9ea82b1f456b798 [9/22] Merge branch 'acpi-battery' into bleeding-edge config: x86_64-randconfig-2003-20261111 (https://download.01.org/0day-ci/archive/20261111/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261111/[email protected]/reproduce)
Quoted 8 lines
Quoted 5 lines
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/Addressed the same issue on
https://lore.kernel.org/all/[email protected]/
Thanks, it should be fixed now.