Linux Power Management development
 help / color / mirror / Atom feed
From: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
To: kernel test robot <lkp@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-acpi@vger.kernel.org,
	linux-pm@vger.kernel.org,
	Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
Subject: Re: [rafael-pm:bleeding-edge 9/22] 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'?
Date: Wed, 11 Nov 2026 19:18:47 +0800	[thread overview]
Message-ID: <32021bd4-e144-4674-a5ed-ef8b38950b7a@oss.qualcomm.com> (raw)
In-Reply-To: <202611111143.CWKE7ewK-lkp@intel.com>

On 11/11/2026 6:46 PM, kernel test robot wrote:
> 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/202611111143.CWKE7ewK-lkp@intel.com/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/202611111143.CWKE7ewK-lkp@intel.com/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 <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202611111143.CWKE7ewK-lkp@intel.com/
> 

Addressed the same issue on 
https://lore.kernel.org/all/cbd2aee7-95ae-4d30-8458-b7da2910867f@oss.qualcomm.com/


> 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_register
> 
> 
> vim +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  #endif
> 929433336e0a6e 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 <sim@shangen.org>
> :::::: CC: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> 
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
> 


-- 
Thx and BRs,
Zhongqiu Han

      reply	other threads:[~2026-11-11 11:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 10:46 [rafael-pm:bleeding-edge 9/22] 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
2026-11-11 11:18 ` Zhongqiu Han [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32021bd4-e144-4674-a5ed-ef8b38950b7a@oss.qualcomm.com \
    --to=zhongqiu.han@oss.qualcomm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox