mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [pza:reset/next 11/11] drivers/reset/core.c:1114:22: error: implicit declaration of function 'acpi_has_method'; did you mean 'acpi_has_watchdog'?
@ 2022-04-04 13:25 kernel test robot
  2022-04-04 14:00 ` Philipp Zabel
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-04-04 13:25 UTC (permalink / raw)
  To: Krishna Yarlagadda; +Cc: kbuild-all, linux-kernel, Philipp Zabel

tree:   https://git.pengutronix.de/git/pza/linux reset/next
head:   7272ce0fa39b66aa91c934a27e9196082a3ffc40
commit: 7272ce0fa39b66aa91c934a27e9196082a3ffc40 [11/11] reset: ACPI reset support
config: h8300-randconfig-m031-20220404 (https://download.01.org/0day-ci/archive/20220404/202204042122.vBjzQg7a-lkp@intel.com/config)
compiler: h8300-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git remote add pza https://git.pengutronix.de/git/pza/linux
        git fetch --no-tags pza reset/next
        git checkout 7272ce0fa39b66aa91c934a27e9196082a3ffc40
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/reset/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/reset/core.c: In function '__device_reset':
>> drivers/reset/core.c:1114:22: error: implicit declaration of function 'acpi_has_method'; did you mean 'acpi_has_watchdog'? [-Werror=implicit-function-declaration]
    1114 |                 if (!acpi_has_method(handle, "_RST"))
         |                      ^~~~~~~~~~~~~~~
         |                      acpi_has_watchdog
   cc1: some warnings being treated as errors


vim +1114 drivers/reset/core.c

  1095	
  1096	/**
  1097	 * __device_reset - find reset controller associated with the device
  1098	 *                  and perform reset
  1099	 * @dev: device to be reset by the controller
  1100	 * @optional: whether it is optional to reset the device
  1101	 *
  1102	 * Convenience wrapper for __reset_control_get() and reset_control_reset().
  1103	 * This is useful for the common case of devices with single, dedicated reset
  1104	 * lines. _RST firmware method will be called for devices with ACPI.
  1105	 */
  1106	int __device_reset(struct device *dev, bool optional)
  1107	{
  1108		struct reset_control *rstc;
  1109		int ret;
  1110	
  1111		acpi_handle handle = ACPI_HANDLE(dev);
  1112	
  1113		if (handle) {
> 1114			if (!acpi_has_method(handle, "_RST"))
  1115				return optional ? 0 : -ENOENT;
  1116			if (ACPI_FAILURE(acpi_evaluate_object(handle, "_RST", NULL,
  1117							      NULL)))
  1118				return -EIO;
  1119		}
  1120	
  1121		rstc = __reset_control_get(dev, NULL, 0, 0, optional, true);
  1122		if (IS_ERR(rstc))
  1123			return PTR_ERR(rstc);
  1124	
  1125		ret = reset_control_reset(rstc);
  1126	
  1127		reset_control_put(rstc);
  1128	
  1129		return ret;
  1130	}
  1131	EXPORT_SYMBOL_GPL(__device_reset);
  1132	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pza:reset/next 11/11] drivers/reset/core.c:1114:22: error: implicit declaration of function 'acpi_has_method'; did you mean 'acpi_has_watchdog'?
  2022-04-04 13:25 [pza:reset/next 11/11] drivers/reset/core.c:1114:22: error: implicit declaration of function 'acpi_has_method'; did you mean 'acpi_has_watchdog'? kernel test robot
@ 2022-04-04 14:00 ` Philipp Zabel
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2022-04-04 14:00 UTC (permalink / raw)
  To: kernel test robot, Krishna Yarlagadda; +Cc: kbuild-all, linux-kernel

On Mo, 2022-04-04 at 21:25 +0800, kernel test robot wrote:
> tree:   https://git.pengutronix.de/git/pza/linux reset/next
> head:   7272ce0fa39b66aa91c934a27e9196082a3ffc40
> commit: 7272ce0fa39b66aa91c934a27e9196082a3ffc40 [11/11] reset: ACPI
> reset support
> config: h8300-randconfig-m031-20220404 (
> https://download.01.org/0day-ci/archive/20220404/202204042122.vBjzQg7a-lkp@intel.com/config
> )
> compiler: h8300-linux-gcc (GCC) 11.2.0
> reproduce (this is a W=1 build):
>         wget 
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
>  -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git remote add pza https://git.pengutronix.de/git/pza/linux
>         git fetch --no-tags pza reset/next
>         git checkout 7272ce0fa39b66aa91c934a27e9196082a3ffc40
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0
> make.cross O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/reset/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/reset/core.c: In function '__device_reset':
> > > drivers/reset/core.c:1114:22: error: implicit declaration of
> > > function 'acpi_has_method'; did you mean 'acpi_has_watchdog'? [-
> > > Werror=implicit-function-declaration]
>     1114 |                 if (!acpi_has_method(handle, "_RST"))
>          |                      ^~~~~~~~~~~~~~~
>          |                      acpi_has_watchdog
>    cc1: some warnings being treated as errors

Apologies, I should have caught this. Unfortunately we are missing
stubs for the ACPI functions. I'll fix it up by wrapping the new code
in #ifdef CONFIG_ACPI.

regards
Philipp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-04 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 13:25 [pza:reset/next 11/11] drivers/reset/core.c:1114:22: error: implicit declaration of function 'acpi_has_method'; did you mean 'acpi_has_watchdog'? kernel test robot
2022-04-04 14:00 ` Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®