Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [pdx86-platform-drivers-x86:review-ilpo-next 74/89] drivers/platform/x86/asus-wmi.c:5028:35: error: variable has incomplete type 'struct acpi_s2idle_dev_ops'
@ 2025-05-08 20:18 kernel test robot
  2025-05-09  7:06 ` Ilpo Järvinen
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2025-05-08 20:18 UTC (permalink / raw)
  To: Luke D. Jones
  Cc: llvm, oe-kbuild-all, Andy Shevchenko, Hans de Goede,
	Ilpo Järvinen, Mario Limonciello

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/202505090418.DaeaXe4i-lkp@intel.com/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/202505090418.DaeaXe4i-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/202505090418.DaeaXe4i-lkp@intel.com/

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	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2025-05-23 12:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08 20:18 [pdx86-platform-drivers-x86:review-ilpo-next 74/89] drivers/platform/x86/asus-wmi.c:5028:35: error: variable has incomplete type 'struct acpi_s2idle_dev_ops' kernel test robot
2025-05-09  7:06 ` Ilpo Järvinen
2025-05-20 13:40   ` Ilpo Järvinen
2025-05-20 18:57     ` Luke Jones
2025-05-23 12:17       ` Ilpo Järvinen
2025-05-23 12:36         ` Luke Jones

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