mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable
@ 2026-09-15 16:32 Asai Neko
  2026-09-15 17:15 ` Mario Limonciello
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Asai Neko @ 2026-09-15 16:32 UTC (permalink / raw)
  To: Corentin Chary, Luke D. Jones, Denis Benato, Hans de Goede,
	Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel, Asai Neko

asus-wmi attempts to register its LPS0 suspend-to-idle callback during
probe. acpi_register_lps0_dev() returns -ENODEV when the LPS0 interface
is unavailable or explicitly disabled, but the driver treats this
expected condition as a registration failure and prints:

  failed to register LPS0 sleep handler in asus-wmi

This occurs on the ASUS ROG STRIX X670E-A GAMING WIFI with BIOS 2704.
The system exposes no PNP0D80 ACPI device and uses deep suspend. The
warning therefore misleadingly suggests a sleep-related malfunction
on a platform where the LPS0 callback is not applicable.

Suppress the warning for -ENODEV while retaining it for other errors.
Leave callback registration and suspend/resume behavior unchanged.

Signed-off-by: Asai Neko <sugar@sne.moe>
---
Avoid the misleading ASUS WMI warning when LPS0 is unavailable.
The diagnosis and rationale are included in the patch commit
message.
---
 drivers/platform/x86/asus-wmi.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index a65090429ca7..f7d009b742b3 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -5421,8 +5421,11 @@ static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
 
 static void asus_s2idle_check_register(void)
 {
-	if (acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops))
-		pr_warn("failed to register LPS0 sleep handler in asus-wmi\n");
+	int ret;
+
+	ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
+	if (ret && ret != -ENODEV)
+		pr_warn("failed to register LPS0 sleep handler in asus-wmi\n", ret);
 }
 
 static void asus_s2idle_check_unregister(void)

---
base-commit: 587858367581b9c55c3690f4e63382ad622719d4
change-id: 20260916-asus-wmi-lps0-unavailable-warn-9a72be44b9ed

Best regards,
--  
Asai Neko <sugar@sne.moe>


-- 
Asai Neko



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

* Re: [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable
  2026-09-15 16:32 [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable Asai Neko
@ 2026-09-15 17:15 ` Mario Limonciello
  2026-09-15 17:16   ` Denis Benato
  2026-09-16 11:00 ` Ilpo Järvinen
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Mario Limonciello @ 2026-09-15 17:15 UTC (permalink / raw)
  To: Asai Neko, Corentin Chary, Luke D. Jones, Denis Benato,
	Hans de Goede, Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel



On 9/15/26 11:32, Asai Neko wrote:
> asus-wmi attempts to register its LPS0 suspend-to-idle callback during
> probe. acpi_register_lps0_dev() returns -ENODEV when the LPS0 interface
> is unavailable or explicitly disabled, but the driver treats this
> expected condition as a registration failure and prints:
> 
>    failed to register LPS0 sleep handler in asus-wmi
> 
> This occurs on the ASUS ROG STRIX X670E-A GAMING WIFI with BIOS 2704.
> The system exposes no PNP0D80 ACPI device and uses deep suspend. The
> warning therefore misleadingly suggests a sleep-related malfunction
> on a platform where the LPS0 callback is not applicable.
> 
> Suppress the warning for -ENODEV while retaining it for other errors.
> Leave callback registration and suspend/resume behavior unchanged.
> 
> Signed-off-by: Asai Neko <sugar@sne.moe>
> ---
> Avoid the misleading ASUS WMI warning when LPS0 is unavailable.
> The diagnosis and rationale are included in the patch commit
> message.
> ---
>   drivers/platform/x86/asus-wmi.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index a65090429ca7..f7d009b742b3 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -5421,8 +5421,11 @@ static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
>   
>   static void asus_s2idle_check_register(void)
>   {
> -	if (acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops))
> -		pr_warn("failed to register LPS0 sleep handler in asus-wmi\n");
> +	int ret;
> +
> +	ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
> +	if (ret && ret != -ENODEV)
> +		pr_warn("failed to register LPS0 sleep handler in asus-wmi\n", ret);
>   }
>   
>   static void asus_s2idle_check_unregister(void)
> 
> ---
> base-commit: 587858367581b9c55c3690f4e63382ad622719d4
> change-id: 20260916-asus-wmi-lps0-unavailable-warn-9a72be44b9ed
> 
> Best regards,
> --
> Asai Neko <sugar@sne.moe>
> 
> 
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>

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

* Re: [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable
  2026-09-15 17:15 ` Mario Limonciello
@ 2026-09-15 17:16   ` Denis Benato
  0 siblings, 0 replies; 8+ messages in thread
From: Denis Benato @ 2026-09-15 17:16 UTC (permalink / raw)
  To: Mario Limonciello, Asai Neko, Corentin Chary, Luke D. Jones,
	Hans de Goede, Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel


On 9/15/26 19:15, Mario Limonciello wrote:
>
>
> On 9/15/26 11:32, Asai Neko wrote:
>> asus-wmi attempts to register its LPS0 suspend-to-idle callback during
>> probe. acpi_register_lps0_dev() returns -ENODEV when the LPS0 interface
>> is unavailable or explicitly disabled, but the driver treats this
>> expected condition as a registration failure and prints:
>>
>>    failed to register LPS0 sleep handler in asus-wmi
>>
>> This occurs on the ASUS ROG STRIX X670E-A GAMING WIFI with BIOS 2704.
>> The system exposes no PNP0D80 ACPI device and uses deep suspend. The
>> warning therefore misleadingly suggests a sleep-related malfunction
>> on a platform where the LPS0 callback is not applicable.
>>
>> Suppress the warning for -ENODEV while retaining it for other errors.
>> Leave callback registration and suspend/resume behavior unchanged.
>>
>> Signed-off-by: Asai Neko <sugar@sne.moe>
>> ---
>> Avoid the misleading ASUS WMI warning when LPS0 is unavailable.
>> The diagnosis and rationale are included in the patch commit
>> message.
>> ---
>>   drivers/platform/x86/asus-wmi.c | 7 +++++--
>>   1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
>> index a65090429ca7..f7d009b742b3 100644
>> --- a/drivers/platform/x86/asus-wmi.c
>> +++ b/drivers/platform/x86/asus-wmi.c
>> @@ -5421,8 +5421,11 @@ static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
>>     static void asus_s2idle_check_register(void)
>>   {
>> -    if (acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops))
>> -        pr_warn("failed to register LPS0 sleep handler in asus-wmi\n");
>> +    int ret;
>> +
>> +    ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
>> +    if (ret && ret != -ENODEV)
>> +        pr_warn("failed to register LPS0 sleep handler in asus-wmi\n", ret);
>>   }
>>     static void asus_s2idle_check_unregister(void)
>>
>> ---
>> base-commit: 587858367581b9c55c3690f4e63382ad622719d4
>> change-id: 20260916-asus-wmi-lps0-unavailable-warn-9a72be44b9ed
>>
>> Best regards,
>> -- 
>> Asai Neko <sugar@sne.moe>
>>
>>
> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> 
Reviewed-by: Denis Benato <denis.benato@linux.dev>

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

* Re: [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable
  2026-09-15 16:32 [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable Asai Neko
  2026-09-15 17:15 ` Mario Limonciello
@ 2026-09-16 11:00 ` Ilpo Järvinen
  2026-09-16 18:13 ` kernel test robot
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Ilpo Järvinen @ 2026-09-16 11:00 UTC (permalink / raw)
  To: Corentin Chary, Luke D. Jones, Denis Benato, Hans de Goede, Asai Neko
  Cc: platform-driver-x86, linux-kernel

On Wed, 16 Sep 2026 00:32:56 +0800, Asai Neko wrote:

> asus-wmi attempts to register its LPS0 suspend-to-idle callback during
> probe. acpi_register_lps0_dev() returns -ENODEV when the LPS0 interface
> is unavailable or explicitly disabled, but the driver treats this
> expected condition as a registration failure and prints:
> 
>   failed to register LPS0 sleep handler in asus-wmi
> 
> [...]

Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.

FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.

The list of commits applied:
[1/1] platform/x86: asus-wmi: don't warn when LPS0 is unavailable
      commit: cb5145bf878b3dcdb20f1ff4afe04009c8fa831a

--
 i.


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

* Re: [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable
  2026-09-15 16:32 [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable Asai Neko
  2026-09-15 17:15 ` Mario Limonciello
  2026-09-16 11:00 ` Ilpo Järvinen
@ 2026-09-16 18:13 ` kernel test robot
  2026-09-16 18:38 ` [PATCH v2] " Asai Neko
  2026-09-16 18:46 ` [PATCH] " kernel test robot
  4 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2026-09-16 18:13 UTC (permalink / raw)
  To: Asai Neko, Corentin Chary, Luke D. Jones, Denis Benato,
	Hans de Goede, Ilpo Järvinen
  Cc: oe-kbuild-all, platform-driver-x86, linux-kernel, Asai Neko

Hi Asai,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 587858367581b9c55c3690f4e63382ad622719d4]

url:    https://github.com/intel-lab-lkp/linux/commits/Asai-Neko/platform-x86-asus-wmi-don-t-warn-when-LPS0-is-unavailable/20260916-003256
base:   587858367581b9c55c3690f4e63382ad622719d4
patch link:    https://lore.kernel.org/r/20260916-asus-wmi-lps0-unavailable-warn-v1-1-9bd6fb4c10f9%40sne.moe
patch subject: [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260917/202609170237.IYNujwsM-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/20260917/202609170237.IYNujwsM-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/202609170237.IYNujwsM-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:31,
                    from arch/x86/include/asm/bug.h:195,
                    from arch/x86/include/asm/alternative.h:9,
                    from arch/x86/include/asm/barrier.h:5,
                    from include/linux/list.h:11,
                    from include/linux/resource_ext.h:9,
                    from include/linux/acpi.h:14,
                    from drivers/platform/x86/asus-wmi.c:16:
   drivers/platform/x86/asus-wmi.c: In function 'asus_s2idle_check_register':
>> include/linux/kern_levels.h:5:25: warning: too many arguments for format [-Wformat-extra-args]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/printk.h:483:25: note: in definition of macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/linux/printk.h:564:9: note: in expansion of macro 'printk'
     564 |         printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   include/linux/kern_levels.h:12:25: note: in expansion of macro 'KERN_SOH'
      12 | #define KERN_WARNING    KERN_SOH "4"    /* warning conditions */
         |                         ^~~~~~~~
   include/linux/printk.h:564:16: note: in expansion of macro 'KERN_WARNING'
     564 |         printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |                ^~~~~~~~~~~~
   drivers/platform/x86/asus-wmi.c:5428:17: note: in expansion of macro 'pr_warn'
    5428 |                 pr_warn("failed to register LPS0 sleep handler in asus-wmi\n", ret);
         |                 ^~~~~~~
--
   In file included from include/asm-generic/bug.h:31,
                    from arch/x86/include/asm/bug.h:195,
                    from arch/x86/include/asm/alternative.h:9,
                    from arch/x86/include/asm/barrier.h:5,
                    from include/linux/list.h:11,
                    from include/linux/resource_ext.h:9,
                    from include/linux/acpi.h:14,
                    from asus-wmi.c:16:
   asus-wmi.c: In function 'asus_s2idle_check_register':
>> include/linux/kern_levels.h:5:25: warning: too many arguments for format [-Wformat-extra-args]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/printk.h:483:25: note: in definition of macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/linux/printk.h:564:9: note: in expansion of macro 'printk'
     564 |         printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~
   include/linux/kern_levels.h:12:25: note: in expansion of macro 'KERN_SOH'
      12 | #define KERN_WARNING    KERN_SOH "4"    /* warning conditions */
         |                         ^~~~~~~~
   include/linux/printk.h:564:16: note: in expansion of macro 'KERN_WARNING'
     564 |         printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |                ^~~~~~~~~~~~
   asus-wmi.c:5428:17: note: in expansion of macro 'pr_warn'
    5428 |                 pr_warn("failed to register LPS0 sleep handler in asus-wmi\n", ret);
         |                 ^~~~~~~


vim +5 include/linux/kern_levels.h

314ba3520e513a7 Joe Perches 2012-07-30  4  
04d2c8c83d0e3ac Joe Perches 2012-07-30 @5  #define KERN_SOH	"\001"		/* ASCII Start Of Header */
04d2c8c83d0e3ac Joe Perches 2012-07-30  6  #define KERN_SOH_ASCII	'\001'
04d2c8c83d0e3ac Joe Perches 2012-07-30  7  

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

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

* [PATCH v2] platform/x86: asus-wmi: don't warn when LPS0 is unavailable
  2026-09-15 16:32 [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable Asai Neko
                   ` (2 preceding siblings ...)
  2026-09-16 18:13 ` kernel test robot
@ 2026-09-16 18:38 ` Asai Neko
  2026-09-17  8:51   ` Ilpo Järvinen
  2026-09-16 18:46 ` [PATCH] " kernel test robot
  4 siblings, 1 reply; 8+ messages in thread
From: Asai Neko @ 2026-09-16 18:38 UTC (permalink / raw)
  To: Corentin Chary, Luke D. Jones, Denis Benato, Hans de Goede,
	Ilpo Järvinen
  Cc: platform-driver-x86, linux-kernel, Asai Neko

asus-wmi attempts to register its LPS0 suspend-to-idle callback during
probe. acpi_register_lps0_dev() returns -ENODEV when the LPS0 interface
is unavailable or explicitly disabled, but the driver treats this
expected condition as a registration failure and prints:

  failed to register LPS0 sleep handler in asus-wmi

This occurs on the ASUS ROG STRIX X670E-A GAMING WIFI with BIOS 2704.
The system exposes no PNP0D80 ACPI device and uses deep suspend. The
warning therefore misleadingly suggests a sleep-related malfunction
on a platform where the LPS0 callback is not applicable.

Suppress the warning for -ENODEV while retaining it for other errors.
Leave callback registration and suspend/resume behavior unchanged.

Signed-off-by: Asai Neko <sugar@sne.moe>
---
Avoid the misleading ASUS WMI warning when LPS0 is unavailable.
The diagnosis and rationale are included in the patch commit
message.
---
Changes in v2:
- Fix the missing format specifier for ret reported by kernel test robot.
- Shorten the warning message to keep the format string on one line.
- Report: https://lore.kernel.org/oe-kbuild-all/202609170237.IYNujwsM-lkp@intel.com/
- Link to v1: https://patch.msgid.link/20260916-asus-wmi-lps0-unavailable-warn-v1-1-9bd6fb4c10f9@sne.moe

To: Corentin Chary <corentin.chary@gmail.com>
To: "Luke D. Jones" <luke@ljones.dev>
To: Denis Benato <denis.benato@linux.dev>
To: Hans de Goede <hansg@kernel.org>
To: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/platform/x86/asus-wmi.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index a65090429ca7..c2af1f049b67 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -5421,8 +5421,11 @@ static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
 
 static void asus_s2idle_check_register(void)
 {
-	if (acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops))
-		pr_warn("failed to register LPS0 sleep handler in asus-wmi\n");
+	int ret;
+
+	ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
+	if (ret && ret != -ENODEV)
+		pr_warn("failed to register LPS0 sleep handler: %d\n", ret);
 }
 
 static void asus_s2idle_check_unregister(void)

---
base-commit: 587858367581b9c55c3690f4e63382ad622719d4
change-id: 20260916-asus-wmi-lps0-unavailable-warn-9a72be44b9ed

Best regards,
--  
Asai Neko <sugar@sne.moe>


-- 
Asai Neko



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

* Re: [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable
  2026-09-15 16:32 [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable Asai Neko
                   ` (3 preceding siblings ...)
  2026-09-16 18:38 ` [PATCH v2] " Asai Neko
@ 2026-09-16 18:46 ` kernel test robot
  4 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2026-09-16 18:46 UTC (permalink / raw)
  To: Asai Neko, Corentin Chary, Luke D. Jones, Denis Benato,
	Hans de Goede, Ilpo Järvinen
  Cc: llvm, oe-kbuild-all, platform-driver-x86, linux-kernel, Asai Neko

Hi Asai,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 587858367581b9c55c3690f4e63382ad622719d4]

url:    https://github.com/intel-lab-lkp/linux/commits/Asai-Neko/platform-x86-asus-wmi-don-t-warn-when-LPS0-is-unavailable/20260916-003256
base:   587858367581b9c55c3690f4e63382ad622719d4
patch link:    https://lore.kernel.org/r/20260916-asus-wmi-lps0-unavailable-warn-v1-1-9bd6fb4c10f9%40sne.moe
patch subject: [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260917/202609170232.23BqcT7n-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260917/202609170232.23BqcT7n-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/202609170232.23BqcT7n-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/platform/x86/asus-wmi.c:5428:66: warning: data argument not used by format string [-Wformat-extra-args]
    5428 |                 pr_warn("failed to register LPS0 sleep handler in asus-wmi\n", ret);
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
   include/linux/printk.h:564:37: note: expanded from macro 'pr_warn'
     564 |         printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
   include/linux/printk.h:511:60: note: expanded from macro 'printk'
     511 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
   include/linux/printk.h:483:19: note: expanded from macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^
   1 warning generated.


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

  5421	
  5422	static void asus_s2idle_check_register(void)
  5423	{
  5424		int ret;
  5425	
  5426		ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
  5427		if (ret && ret != -ENODEV)
> 5428			pr_warn("failed to register LPS0 sleep handler in asus-wmi\n", ret);
  5429	}
  5430	

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

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

* Re: [PATCH v2] platform/x86: asus-wmi: don't warn when LPS0 is unavailable
  2026-09-16 18:38 ` [PATCH v2] " Asai Neko
@ 2026-09-17  8:51   ` Ilpo Järvinen
  0 siblings, 0 replies; 8+ messages in thread
From: Ilpo Järvinen @ 2026-09-17  8:51 UTC (permalink / raw)
  To: Asai Neko
  Cc: Corentin Chary, Luke D. Jones, Denis Benato, Hans de Goede,
	platform-driver-x86, LKML

[-- Attachment #1: Type: text/plain, Size: 3100 bytes --]

On Thu, 17 Sep 2026, Asai Neko wrote:

> asus-wmi attempts to register its LPS0 suspend-to-idle callback during
> probe. acpi_register_lps0_dev() returns -ENODEV when the LPS0 interface
> is unavailable or explicitly disabled, but the driver treats this
> expected condition as a registration failure and prints:
> 
>   failed to register LPS0 sleep handler in asus-wmi
> 
> This occurs on the ASUS ROG STRIX X670E-A GAMING WIFI with BIOS 2704.
> The system exposes no PNP0D80 ACPI device and uses deep suspend. The
> warning therefore misleadingly suggests a sleep-related malfunction
> on a platform where the LPS0 callback is not applicable.
> 
> Suppress the warning for -ENODEV while retaining it for other errors.
> Leave callback registration and suspend/resume behavior unchanged.
> 
> Signed-off-by: Asai Neko <sugar@sne.moe>

Thanks, I've replaced v1 with this one in the review-ilpo-next branch.

Next time, please collect the Reviewed-by (and possible Tested-by) tags 
from the previous version(s) when sending another version because our 
maintainer tools only collect them for the current version.

Only if you make really major changes, then you may opt to drop the tags.

--
 i.

> ---
> Avoid the misleading ASUS WMI warning when LPS0 is unavailable.
> The diagnosis and rationale are included in the patch commit
> message.
> ---
> Changes in v2:
> - Fix the missing format specifier for ret reported by kernel test robot.
> - Shorten the warning message to keep the format string on one line.
> - Report: https://lore.kernel.org/oe-kbuild-all/202609170237.IYNujwsM-lkp@intel.com/
> - Link to v1: https://patch.msgid.link/20260916-asus-wmi-lps0-unavailable-warn-v1-1-9bd6fb4c10f9@sne.moe
> 
> To: Corentin Chary <corentin.chary@gmail.com>
> To: "Luke D. Jones" <luke@ljones.dev>
> To: Denis Benato <denis.benato@linux.dev>
> To: Hans de Goede <hansg@kernel.org>
> To: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> Cc: platform-driver-x86@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  drivers/platform/x86/asus-wmi.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index a65090429ca7..c2af1f049b67 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -5421,8 +5421,11 @@ static struct acpi_s2idle_dev_ops asus_ally_s2idle_dev_ops = {
>  
>  static void asus_s2idle_check_register(void)
>  {
> -	if (acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops))
> -		pr_warn("failed to register LPS0 sleep handler in asus-wmi\n");
> +	int ret;
> +
> +	ret = acpi_register_lps0_dev(&asus_ally_s2idle_dev_ops);
> +	if (ret && ret != -ENODEV)
> +		pr_warn("failed to register LPS0 sleep handler: %d\n", ret);
>  }
>  
>  static void asus_s2idle_check_unregister(void)
> 
> ---
> base-commit: 587858367581b9c55c3690f4e63382ad622719d4
> change-id: 20260916-asus-wmi-lps0-unavailable-warn-9a72be44b9ed
> 
> Best regards,
> --  
> Asai Neko <sugar@sne.moe>
> 
> 
> 

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

end of thread, other threads:[~2026-09-17  8:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 16:32 [PATCH] platform/x86: asus-wmi: don't warn when LPS0 is unavailable Asai Neko
2026-09-15 17:15 ` Mario Limonciello
2026-09-15 17:16   ` Denis Benato
2026-09-16 11:00 ` Ilpo Järvinen
2026-09-16 18:13 ` kernel test robot
2026-09-16 18:38 ` [PATCH v2] " Asai Neko
2026-09-17  8:51   ` Ilpo Järvinen
2026-09-16 18:46 ` [PATCH] " kernel test robot

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®