Skip to contentSkip to conversation

drivers/platform/x86/asus-wmi.c:5028:35: error: variable has incomplete type 'struct acpi_s2idle_dev_ops'

PATCH kernel test robot 3 participants 6 messages May 8, 2025 – May 23, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-ilpo-next
head:   83579675331059689e2869bf752ca9e17fadbd82
commit: feea7bd6b02d43a794e3f065650d89cf8d8e8e59 [74/89] platform/x86: asus-wmi: Refactor Ally suspend/resume
config: x86_64-buildonly-randconfig-004-20250509 (https://download.01.org/0day-ci/archive/20250509/[email protected]/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/[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/asus-wmi.c:5028:35: error: variable has incomplete type 'struct acpi_s2idle_dev_ops'
    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |                                   ^
   drivers/platform/x86/asus-wmi.c:5028:15: note: forward declaration of 'struct acpi_s2idle_dev_ops'
    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |               ^
>> drivers/platform/x86/asus-wmi.c:5063:8: error: call to undeclared function 'acpi_register_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    5063 |         ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
         |               ^
>> drivers/platform/x86/asus-wmi.c:5099:2: error: call to undeclared function 'acpi_unregister_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    5099 |         acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);
         |         ^

3 errors generated.

vim +5028 drivers/platform/x86/asus-wmi.c

5026
5027 /* Use only for Ally devices due to the wake_on_ac */

> 5028	static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
  5029		.restore = asus_ally_s2idle_restore,
  5030	};
  5031	
  5032	static const struct dev_pm_ops asus_pm_ops = {
  5033		.thaw = asus_hotk_thaw,
  5034		.restore = asus_hotk_restore,
  5035		.resume = asus_hotk_resume,
  5036		.prepare = asus_hotk_prepare,
  5037	};
  5038	
  5039	/* Registration ***************************************************************/
  5040	
  5041	static int asus_wmi_probe(struct platform_device *pdev)
  5042	{
  5043		struct platform_driver *pdrv = to_platform_driver(pdev->dev.driver);
  5044		struct asus_wmi_driver *wdrv = to_asus_wmi_driver(pdrv);
  5045		int ret;
  5046	
  5047		if (!wmi_has_guid(ASUS_WMI_MGMT_GUID)) {
  5048			pr_warn("ASUS Management GUID not found\n");
  5049			return -ENODEV;
  5050		}
  5051	
  5052		if (wdrv->event_guid && !wmi_has_guid(wdrv->event_guid)) {
  5053			pr_warn("ASUS Event GUID not found\n");
  5054			return -ENODEV;
  5055		}
  5056	
  5057		if (wdrv->probe) {
  5058			ret = wdrv->probe(pdev);
  5059			if (ret)
  5060				return ret;
  5061		}
  5062	
> 5063		ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
  5064		if (ret)
  5065			pr_warn("failed to register LPS0 sleep handler in asus-wmi\n");
  5066	
  5067		return asus_wmi_add(pdev);
  5068	}
  5069	
  5070	static bool used;
  5071	
  5072	int __init_or_module asus_wmi_register_driver(struct asus_wmi_driver *driver)
  5073	{
  5074		struct platform_driver *platform_driver;
  5075		struct platform_device *platform_device;
  5076	
  5077		if (used)
  5078			return -EBUSY;
  5079	
  5080		platform_driver = &driver->platform_driver;
  5081		platform_driver->remove = asus_wmi_remove;
  5082		platform_driver->driver.owner = driver->owner;
  5083		platform_driver->driver.name = driver->name;
  5084		platform_driver->driver.pm = &asus_pm_ops;
  5085	
  5086		platform_device = platform_create_bundle(platform_driver,
  5087							 asus_wmi_probe,
  5088							 NULL, 0, NULL, 0);
  5089		if (IS_ERR(platform_device))
  5090			return PTR_ERR(platform_device);
  5091	
  5092		used = true;
  5093		return 0;
  5094	}
  5095	EXPORT_SYMBOL_GPL(asus_wmi_register_driver);
  5096	
  5097	void asus_wmi_unregister_driver(struct asus_wmi_driver *driver)
  5098	{
> 5099		acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);

5100 platform_device_unregister(driver->platform_device);
5101 platform_driver_unregister(&driver->platform_driver);
5102 used = false;
5103 }
5104 EXPORT_SYMBOL_GPL(asus_wmi_unregister_driver);
5105

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#1 lore raw
Quoted 29 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-ilpo-next
head:   83579675331059689e2869bf752ca9e17fadbd82
commit: feea7bd6b02d43a794e3f065650d89cf8d8e8e59 [74/89] platform/x86: asus-wmi: Refactor Ally suspend/resume
config: x86_64-buildonly-randconfig-004-20250509 (https://download.01.org/0day-ci/archive/20250509/[email protected]/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/[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 >>):

Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5028:35: error: variable has incomplete type 'struct acpi_s2idle_dev_ops'

    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |                                   ^
   drivers/platform/x86/asus-wmi.c:5028:15: note: forward declaration of 'struct acpi_s2idle_dev_ops'
    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |               ^
Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5063:8: error: call to undeclared function 'acpi_register_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

    5063 |         ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
         |               ^
Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5099:2: error: call to undeclared function 'acpi_unregister_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

    5099 |         acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);
         |         ^

3 errors generated.

Quoted 12 lines

vim +5028 drivers/platform/x86/asus-wmi.c

5026
5027 /* Use only for Ally devices due to the wake_on_ac */

Quoted 1 line

5028 static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {

5029 .restore = asus_ally_s2idle_restore,
5030 };
5031

Quoted 3 lines

5063 ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);

5099 acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);

Hi Luke,

It seems CONFIG_SUSPEND is not defined in this config leading to the failure. Can you please look at this as I was slight unsure what way the fix should go although it looked like some ifdeffery is necessary and probably wrapping those register/unregister functions.

Signature · 1 line
 i.
#2 lore raw

Luke,

Ping? This is still unsolved.

Quoted 52 lines · Ilpo Järvinen
Quoted 29 lines · kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-ilpo-next
head:   83579675331059689e2869bf752ca9e17fadbd82
commit: feea7bd6b02d43a794e3f065650d89cf8d8e8e59 [74/89] platform/x86: asus-wmi: Refactor Ally suspend/resume
config: x86_64-buildonly-randconfig-004-20250509 (https://download.01.org/0day-ci/archive/20250509/[email protected]/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/[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 >>):

Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5028:35: error: variable has incomplete type 'struct acpi_s2idle_dev_ops'

    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |                                   ^
   drivers/platform/x86/asus-wmi.c:5028:15: note: forward declaration of 'struct acpi_s2idle_dev_ops'
    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |               ^
Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5063:8: error: call to undeclared function 'acpi_register_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

    5063 |         ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
         |               ^
Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5099:2: error: call to undeclared function 'acpi_unregister_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

    5099 |         acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);
         |         ^

3 errors generated.

Quoted 12 lines

vim +5028 drivers/platform/x86/asus-wmi.c

5026
5027 /* Use only for Ally devices due to the wake_on_ac */

Quoted 1 line

5028 static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {

5029 .restore = asus_ally_s2idle_restore,
5030 };
5031

Quoted 3 lines

5063 ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);

5099 acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);

Hi Luke,

It seems CONFIG_SUSPEND is not defined in this config leading to the failure. Can you please look at this as I was slight unsure what way the fix should go although it looked like some ifdeffery is necessary and probably wrapping those register/unregister functions.

Signature · 1 line
 i.
#3 lore raw
Quoted 3 lines · Ilpo Järvinen

Luke,

Ping? This is still unsolved.

Oh, my apologies. I've not had much time for kernel work recently but I will try to get to this sometime this week. Thank you for bringing to my attention.

Quoted 57 lines · Ilpo Järvinen
Quoted 52 lines · kernel test robot
Quoted 30 lines
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-ilpo-next
head:   83579675331059689e2869bf752ca9e17fadbd82
commit: feea7bd6b02d43a794e3f065650d89cf8d8e8e59 [74/89] platform/x86: asus-wmi: Refactor Ally suspend/resume
config: x86_64-buildonly-randconfig-004-20250509 (https://download.01.org/0day-ci/archive/20250509/[email protected]/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/[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 >>):

Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5028:35: error: variable has incomplete type 'struct acpi_s2idle_dev_ops'

    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |                                   ^
   drivers/platform/x86/asus-wmi.c:5028:15: note: forward declaration of 'struct acpi_s2idle_dev_ops'
    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |               ^
Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5063:8: error: call to undeclared function 'acpi_register_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

    5063 |         ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
         |               ^
Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5099:2: error: call to undeclared function 'acpi_unregister_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

    5099 |         acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);
         |         ^

3 errors generated.

Quoted 12 lines

vim +5028 drivers/platform/x86/asus-wmi.c

5026
5027 /* Use only for Ally devices due to the wake_on_ac */

Quoted 1 line

5028 static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {

5029 .restore = asus_ally_s2idle_restore,
5030 };
5031

Quoted 3 lines

5063 ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);

5099 acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);

Hi Luke,

It seems CONFIG_SUSPEND is not defined in this config leading to the failure. Can you please look at this as I was slight unsure what way the fix should go although it looked like some ifdeffery is necessary and probably wrapping those register/unregister functions.

Signature · 1 line
 i.
#4 lore raw
Quoted 8 lines · Luke Jones
Quoted 3 lines · Ilpo Järvinen

Luke,

Ping? This is still unsolved.

Oh, my apologies. I've not had much time for kernel work recently but I will try to get to this sometime this week. Thank you for bringing to my attention.

Hi,

Regrettably, I'll probably end up reverting this commit as I'm not going send a PR early next week with known problems still unsolved. Delaying PR is not going the be an option in this round due to the lamparray controversy.

I couldn't add the #ifdeffery myself as I was unsure what should be done for asus_hotk_prepare().

Signature · 1 line
 i.
Quoted 57 lines
Quoted 56 lines · Ilpo Järvinen
Quoted 52 lines · kernel test robot
Quoted 30 lines
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-ilpo-next
head:   83579675331059689e2869bf752ca9e17fadbd82
commit: feea7bd6b02d43a794e3f065650d89cf8d8e8e59 [74/89] platform/x86: asus-wmi: Refactor Ally suspend/resume
config: x86_64-buildonly-randconfig-004-20250509 (https://download.01.org/0day-ci/archive/20250509/[email protected]/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/[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 >>):

Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5028:35: error: variable has incomplete type 'struct acpi_s2idle_dev_ops'

    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |                                   ^
   drivers/platform/x86/asus-wmi.c:5028:15: note: forward declaration of 'struct acpi_s2idle_dev_ops'
    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |               ^
Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5063:8: error: call to undeclared function 'acpi_register_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

    5063 |         ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
         |               ^
Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5099:2: error: call to undeclared function 'acpi_unregister_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

    5099 |         acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);
         |         ^

3 errors generated.

Quoted 12 lines

vim +5028 drivers/platform/x86/asus-wmi.c

5026
5027 /* Use only for Ally devices due to the wake_on_ac */

Quoted 1 line

5028 static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {

5029 .restore = asus_ally_s2idle_restore,
5030 };
5031

Quoted 3 lines

5063 ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);

5099 acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);

Hi Luke,

It seems CONFIG_SUSPEND is not defined in this config leading to the failure. Can you please look at this as I was slight unsure what way the fix should go although it looked like some ifdeffery is necessary and probably wrapping those register/unregister functions.

Signature · 1 line
 i.
#5 lore raw
Quoted 13 lines · Ilpo Järvinen
Quoted 8 lines · Luke Jones
Quoted 3 lines · Ilpo Järvinen

Luke,

Ping? This is still unsolved.

Oh, my apologies. I've not had much time for kernel work recently but I will try to get to this sometime this week. Thank you for bringing to my attention.

Hi,

Quoted 7 lines

Regrettably, I'll probably end up reverting this commit as I'm not going send a PR early next week with known problems still unsolved. Delaying PR is not going the be an option in this round due to the lamparray controversy.

I couldn't add the #ifdeffery myself as I was unsure what should be done for asus_hotk_prepare().

I understand. I have some time right now to fixup, when I fix are you okay with a separate patch as suggested by the robot? I will apply on platform-drivers-x86/review-ilpo-next

Quoted 60 lines
Signature · 1 line
 i.
Quoted 57 lines
Quoted 56 lines · Ilpo Järvinen
Quoted 52 lines · kernel test robot
Quoted 30 lines
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-ilpo-next
head:   83579675331059689e2869bf752ca9e17fadbd82
commit: feea7bd6b02d43a794e3f065650d89cf8d8e8e59 [74/89] platform/x86: asus-wmi: Refactor Ally suspend/resume
config: x86_64-buildonly-randconfig-004-20250509 (https://download.01.org/0day-ci/archive/20250509/[email protected]/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250509/[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 >>):

Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5028:35: error: variable has incomplete type 'struct acpi_s2idle_dev_ops'

    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |                                   ^
   drivers/platform/x86/asus-wmi.c:5028:15: note: forward declaration of 'struct acpi_s2idle_dev_ops'
    5028 | static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
         |               ^
Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5063:8: error: call to undeclared function 'acpi_register_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

    5063 |         ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
         |               ^
Quoted 1 line
Quoted 1 line

drivers/platform/x86/asus-wmi.c:5099:2: error: call to undeclared function 'acpi_unregister_lps0_dev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

    5099 |         acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);
         |         ^

3 errors generated.

Quoted 12 lines

vim +5028 drivers/platform/x86/asus-wmi.c

5026
5027 /* Use only for Ally devices due to the wake_on_ac */

Quoted 1 line

5028 static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {

5029 .restore = asus_ally_s2idle_restore,
5030 };
5031

Quoted 3 lines

5063 ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);

5099 acpi_unregister_lps0_dev(&asus_ally_s2idle_dev_ops);

Hi Luke,

It seems CONFIG_SUSPEND is not defined in this config leading to the failure. Can you please look at this as I was slight unsure what way the fix should go although it looked like some ifdeffery is necessary and probably wrapping those register/unregister functions.

Signature · 1 line
 i.