Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Luke D. Jones" <luke@ljones.dev>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Mario Limonciello" <mario.limonciello@amd.com>
Subject: [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'
Date: Fri, 9 May 2025 04:18:34 +0800	[thread overview]
Message-ID: <202505090418.DaeaXe4i-lkp@intel.com> (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/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

             reply	other threads:[~2025-05-08 20:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08 20:18 kernel test robot [this message]
2025-05-09  7:06 ` [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' 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

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=202505090418.DaeaXe4i-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=luke@ljones.dev \
    --cc=mario.limonciello@amd.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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