Skip to contentSkip to conversation

: asus_wmi: Unknown key code 0x6d

PATCH In review Jonathan Grant 3 participants 9 messages Mar 13 – Mar 18

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : asus_wmi: Unknown key code 0x6d

Dear Luke D. Jones

I made the below patch after seeing the following:

asus_wmi: Unknown key code 0x6d

It is just before my laptop overheats and powers off. (eg if I do make -j8)

May I ask if it could be reviewed?

Kind regards
Jonathan

drivers/platform/x86/asus-wmi.c +6 -0
index 7c0915e097ba..06438b4e7a17 100644
@@ -70,6 +70,7 @@ module_param(fnlock_default, bool, 0444);
 #define NOTIFY_KBD_TTP			0xae
 #define NOTIFY_LID_FLIP			0xfa
 #define NOTIFY_LID_FLIP_ROG		0xbd
+#define NOTIFY_POWER_OFF		0x6d
 
 #define ASUS_WMI_FNLOCK_BIOS_DISABLED	BIT(0)
 
@@ -4596,6 +4597,11 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
 	if (is_display_toggle(code) && asus->driver->quirks->no_display_toggle)
 		return;
 
+	if (code == NOTIFY_POWER_OFF) {
+		pr_info("Power off\n");
+		return;
+	}
+
 	if (!sparse_keymap_report_event(asus->inputdev, code,
 					key_value, autorelease))
 		pr_info("Unknown key code 0x%x\n", code);
#1 lore raw
Quoted 6 lines · Jonathan Grant

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Dear Luke D. Jones

I made the below patch after seeing the following:

Quoted 8 lines

asus_wmi: Unknown key code 0x6d

It is just before my laptop overheats and powers off. (eg if I do make -j8)

May I ask if it could be reviewed?

Kind regards
Jonathan

Hi Jonathan,

The guide for submitting patches is here: https://www.kernel.org/doc/html/v7.0-rc3/process/submitting-patches.html.
Please review it and pay particular attention to the need for a DCO
(Signed-off-by) and how to write a commit message for your patch.

Thanks,

Quoted 27 lines
drivers/platform/x86/asus-wmi.c +6 -0
index 7c0915e097ba..06438b4e7a17 100644
@@ -70,6 +70,7 @@ module_param(fnlock_default, bool, 0444);
  #define NOTIFY_KBD_TTP                 0xae
  #define NOTIFY_LID_FLIP                        0xfa
  #define NOTIFY_LID_FLIP_ROG            0xbd
+#define NOTIFY_POWER_OFF               0x6d
 
  #define ASUS_WMI_FNLOCK_BIOS_DISABLED  BIT(0)
 
@@ -4596,6 +4597,11 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
         if (is_display_toggle(code) && asus->driver->quirks->no_display_toggle)
                 return;
 
+       if (code == NOTIFY_POWER_OFF) {
+               pr_info("Power off\n");
+               return;
+       }
+
         if (!sparse_keymap_report_event(asus->inputdev, code,
                                         key_value, autorelease))
                 pr_info("Unknown key code 0x%x\n", code);
#2 lore raw

PATCH v2 1/1 platform/x86: asus-wmi: log thermal notification event

From e110b7489b320588a7d334bf0a4e20e3e25784e7 Mon Sep 17 00:00:00 2001
From: Jonathan Grant <[email protected]>
Date: Sat, 14 Mar 2026 02:11:09 +0000
Subject: [PATCH] platform/x86: asus-wmi: log thermal notification event

Print a diagnostic message when the ASUS WMI interface receives event 0x6d. This event was observed shortly before thermal shutdown on an ASUS N56VB under heavy system load. The message helps diagnose unexpected thermal power-offs.

---
v2:
- follow kernel patch guidelines
- rename event to NOTIFY_THERMAL
- document that event 0x6d was observed before thermal shutdown on ASUS N56VB (BIOS WMI version 7.9, SFUN value 0x6a0877)
- improve commit message description
- remove stray blank line

 drivers/platform/x86/asus-wmi.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/platform/x86/asus-wmi.c +5 -2
index 7c0915e097ba..6ab3886ad28f 100644
@@ -70,6 +70,7 @@ module_param(fnlock_default, bool, 0444);
 #define NOTIFY_KBD_TTP			0xae
 #define NOTIFY_LID_FLIP			0xfa
 #define NOTIFY_LID_FLIP_ROG		0xbd
+#define NOTIFY_THERMAL			0x6d
 
 #define ASUS_WMI_FNLOCK_BIOS_DISABLED	BIT(0)
 
@@ -4590,7 +4591,6 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
 		if (asus->throttle_thermal_policy_dev)
 			platform_profile_cycle();
 		return;
-
 	}
 
 	if (is_display_toggle(code) && asus->driver->quirks->no_display_toggle)
@@ -4598,7 +4598,10 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
 
 	if (!sparse_keymap_report_event(asus->inputdev, code,
 					key_value, autorelease))
-		pr_info("Unknown key code 0x%x\n", code);
+		if (code == NOTIFY_THERMAL)
+			pr_info("Thermal state change\n");
+		else
+			pr_info("Unknown key code 0x%x\n", code);
 }
 
 static void asus_wmi_notify(union acpi_object *obj, void *context)
Signature · 1 line
2.43.0
#3 lore raw

Re: [PATCH v2] platform/x86: asus-wmi: log thermal notification event

Quoted 38 lines · Jonathan Grant

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

From e110b7489b320588a7d334bf0a4e20e3e25784e7 Mon Sep 17 00:00:00 2001
From: Jonathan Grant <[email protected]>
Date: Sat, 14 Mar 2026 02:11:09 +0000
Subject: [PATCH] platform/x86: asus-wmi: log thermal notification event

Print a diagnostic message when the ASUS WMI interface receives event 0x6d. This event was observed shortly before thermal shutdown on an ASUS N56VB under heavy system load. The message helps diagnose unexpected thermal power-offs.

---
v2:
- follow kernel patch guidelines
- rename event to NOTIFY_THERMAL
- document that event 0x6d was observed before thermal shutdown

    on ASUS N56VB (BIOS WMI version 7.9, SFUN value 0x6a0877)

- improve commit message description
- remove stray blank line

  drivers/platform/x86/asus-wmi.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
drivers/platform/x86/asus-wmi.c +1 -0
index 7c0915e097ba..6ab3886ad28f 100644
@@ -70,6 +70,7 @@ module_param(fnlock_default, bool, 0444);
  #define NOTIFY_KBD_TTP                 0xae
  #define NOTIFY_LID_FLIP                        0xfa
  #define NOTIFY_LID_FLIP_ROG            0xbd
+#define NOTIFY_THERMAL                 0x6d
 
  #define ASUS_WMI_FNLOCK_BIOS_DISABLED  BIT(0)
 

drivers/platform/x86/asus-wmi.c static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus) · line 4593

Quoted 4 lines
drivers/platform/x86/asus-wmi.c +0 -1
@@ -4590,7 +4591,6 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
                 if (asus->throttle_thermal_policy_dev)
                         platform_profile_cycle();
                 return;
-

You shouldn't change unrelated whitespace

Quoted 17 lines
drivers/platform/x86/asus-wmi.c +4 -2
         }
 
         if (is_display_toggle(code) && asus->driver->quirks->no_display_toggle)
@@ -4598,7 +4598,10 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
 
         if (!sparse_keymap_report_event(asus->inputdev, code,
                                         key_value, autorelease))
-               pr_info("Unknown key code 0x%x\n", code);
+               if (code == NOTIFY_THERMAL)
+                       pr_info("Thermal state change\n");
+               else
+                       pr_info("Unknown key code 0x%x\n", code);
  }
 
  static void asus_wmi_notify(union acpi_object *obj, void *context)
--

2.43.0

#4 lore raw

PATCH v3 1/1 platform/x86: asus-wmi: log thermal notification event

From 4eb1a89ef5b481a8bd85bd68735b879e4ed6cb27 Mon Sep 17 00:00:00 2001
From: Jonathan Grant <[email protected]>
Date: Sat, 14 Mar 2026 02:11:09 +0000
Subject: [PATCH] platform/x86: asus-wmi: log thermal notification event

Print a diagnostic message when the ASUS WMI interface receives event 0x6d. This event was observed shortly before thermal shutdown on an ASUS N56VB under heavy system load. The message helps diagnose unexpected thermal power-offs.

---
v3:
- do not change unrelated whitespace
- address -Wdangling-else by adding braces

 drivers/platform/x86/asus-wmi.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/platform/x86/asus-wmi.c +9 -2
index 7c0915e097ba..3bdd92baac57 100644
@@ -70,6 +70,7 @@ module_param(fnlock_default, bool, 0444);
 #define NOTIFY_KBD_TTP			0xae
 #define NOTIFY_LID_FLIP			0xfa
 #define NOTIFY_LID_FLIP_ROG		0xbd
+#define NOTIFY_THERMAL			0x6d
 
 #define ASUS_WMI_FNLOCK_BIOS_DISABLED	BIT(0)
 
@@ -4597,8 +4598,14 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
 		return;
 
 	if (!sparse_keymap_report_event(asus->inputdev, code,
-					key_value, autorelease))
-		pr_info("Unknown key code 0x%x\n", code);
+					key_value, autorelease)) {
+		if (code == NOTIFY_THERMAL) {
+			pr_info("Thermal state change\n");
+		}
+		else {
+			pr_info("Unknown key code 0x%x\n", code);
+		}
+	}
 }
 
 static void asus_wmi_notify(union acpi_object *obj, void *context)
Signature · 1 line
2.43.0
#5 lore raw

Re: [PATCH v3] platform/x86: asus-wmi: log thermal notification event

Quoted 31 lines · Jonathan Grant

From 4eb1a89ef5b481a8bd85bd68735b879e4ed6cb27 Mon Sep 17 00:00:00 2001
From: Jonathan Grant <[email protected]>
Date: Sat, 14 Mar 2026 02:11:09 +0000
Subject: [PATCH] platform/x86: asus-wmi: log thermal notification event

Print a diagnostic message when the ASUS WMI interface receives event 0x6d. This event was observed shortly before thermal shutdown on an ASUS N56VB under heavy system load. The message helps diagnose unexpected thermal power-offs.

---
v3:
- do not change unrelated whitespace
- address -Wdangling-else by adding braces

  drivers/platform/x86/asus-wmi.c | 11 +++++++++--
  1 file changed, 9 insertions(+), 2 deletions(-)
drivers/platform/x86/asus-wmi.c +1 -0
index 7c0915e097ba..3bdd92baac57 100644
@@ -70,6 +70,7 @@ module_param(fnlock_default, bool, 0444);
  #define NOTIFY_KBD_TTP			0xae
  #define NOTIFY_LID_FLIP			0xfa
  #define NOTIFY_LID_FLIP_ROG		0xbd
+#define NOTIFY_THERMAL			0x6d
 
  #define ASUS_WMI_FNLOCK_BIOS_DISABLED	BIT(0)
 

drivers/platform/x86/asus-wmi.c static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus) · line 4603

Quoted 8 lines
drivers/platform/x86/asus-wmi.c +3 -2
@@ -4597,8 +4598,14 @@ static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
  		return;
 
  	if (!sparse_keymap_report_event(asus->inputdev, code,
-					key_value, autorelease))
-		pr_info("Unknown key code 0x%x\n", code);
+					key_value, autorelease)) {
+		if (code == NOTIFY_THERMAL) {
+			pr_info("Thermal state change\n");

Why are you still sending NOTIFY_THERMAL to sparse_keymap_report_event()? It will always fail.

Shouldn't you be catching this earlier in the function like how NOTIFY_KBD_FBM and NOTIFY_KBD_TTP work?

Quoted 8 lines
drivers/platform/x86/asus-wmi.c +5 -0
+		}
+		else {
+			pr_info("Unknown key code 0x%x\n", code);
+		}
+	}
  }
 
  static void asus_wmi_notify(union acpi_object *obj, void *context)
#6 lore raw

Re: [PATCH v2] platform/x86: asus-wmi: log thermal notification event

In reply to Jonathan Grant
kernel test robot noticed the following build warnings:

Hi Jonathan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on amd-pstate/linux-next]
[also build test WARNING on amd-pstate/bleeding-edge linus/master v6.16-rc1 next-20260316] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jonathan-Grant/platform-x86-asus-wmi-log-thermal-notification-event/20260316-204950
base:   https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git linux-next
patch link:    https://lore.kernel.org/r/94dbe1e1-d706-47aa-abf5-f5d76aacf017%40jguk.org
patch subject: [PATCH v2] platform/x86: asus-wmi: log thermal notification event
config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20260317/[email protected]/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/20260317/[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 warnings (new ones prefixed by >>):

drivers/platform/x86/asus-wmi.c: In function 'asus_wmi_handle_event_code':

>> drivers/platform/x86/asus-wmi.c:4599:12: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
    4599 |         if (!sparse_keymap_report_event(asus->inputdev, code,
         |            ^

vim +/else +4599 drivers/platform/x86/asus-wmi.c

8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4538  
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4539  static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4540  {
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4541  	enum led_brightness led_value;
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4542  	unsigned int key_value = 1;
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4543  	bool autorelease = 1;
3d7b165539d417 drivers/platform/x86/eeepc-wmi.c Yong Wang           2010-04-11  4544  
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4545  	if (asus->driver->key_filter) {
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4546  		asus->driver->key_filter(asus->driver, &code, &key_value,
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4547  					 &autorelease);
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4548  		if (code == ASUS_WMI_KEY_IGNORE)
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4549  			return;
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4550  	}
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4551  
a5b92be2482e5f drivers/platform/x86/asus-wmi.c  Hans de Goede       2023-10-17  4552  	if (acpi_video_get_backlight_type() == acpi_backlight_vendor &&
a5b92be2482e5f drivers/platform/x86/asus-wmi.c  Hans de Goede       2023-10-17  4553  	    code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNDOWN_MAX) {
a5b92be2482e5f drivers/platform/x86/asus-wmi.c  Hans de Goede       2023-10-17  4554  		asus_wmi_backlight_notify(asus, code);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4555  		return;
a2a96f0c722180 drivers/platform/x86/asus-wmi.c  AceLan Kao          2012-10-03  4556  	}
a2a96f0c722180 drivers/platform/x86/asus-wmi.c  AceLan Kao          2012-10-03  4557  
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4558  	scoped_guard(spinlock_irqsave, &asus_ref.lock)
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4559  		led_value = asus->kbd_led_wk;
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4560  
dbb3d78f61bade drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4561  	if (code == NOTIFY_KBD_BRTUP) {
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4562  		kbd_led_set_by_kbd(asus, led_value + 1);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4563  		return;
dbb3d78f61bade drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4564  	}
dbb3d78f61bade drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4565  	if (code == NOTIFY_KBD_BRTDWN) {
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4566  		kbd_led_set_by_kbd(asus, led_value - 1);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4567  		return;
dbb3d78f61bade drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4568  	}
ed99d29b2b1562 drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4569  	if (code == NOTIFY_KBD_BRTTOGGLE) {
7525566abd360c drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4570  		if (led_value >= ASUS_EV_MAX_BRIGHTNESS)
29f6eb533c3be9 drivers/platform/x86/asus-wmi.c  Jian-Hong Pan       2018-10-22  4571  			kbd_led_set_by_kbd(asus, 0);
ed99d29b2b1562 drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4572  		else
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4573  			kbd_led_set_by_kbd(asus, led_value + 1);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4574  		return;
ed99d29b2b1562 drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4575  	}
dbb3d78f61bade drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4576  
487579bab867e7 drivers/platform/x86/asus-wmi.c  Chris Chiu          2019-04-18  4577  	if (code == NOTIFY_FNLOCK_TOGGLE) {
487579bab867e7 drivers/platform/x86/asus-wmi.c  Chris Chiu          2019-04-18  4578  		asus->fnlock_locked = !asus->fnlock_locked;
487579bab867e7 drivers/platform/x86/asus-wmi.c  Chris Chiu          2019-04-18  4579  		asus_wmi_fnlock_update(asus);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4580  		return;
487579bab867e7 drivers/platform/x86/asus-wmi.c  Chris Chiu          2019-04-18  4581  	}
487579bab867e7 drivers/platform/x86/asus-wmi.c  Chris Chiu          2019-04-18  4582  
1ea0d3b46798af drivers/platform/x86/asus-wmi.c  Hans de Goede       2022-08-24  4583  	if (code == asus->tablet_switch_event_code) {
1ea0d3b46798af drivers/platform/x86/asus-wmi.c  Hans de Goede       2022-08-24  4584  		asus_wmi_tablet_mode_get_state(asus);
e397c3c460bf38 drivers/platform/x86/asus-wmi.c  Luke D. Jones       2022-08-13  4585  		return;
e397c3c460bf38 drivers/platform/x86/asus-wmi.c  Luke D. Jones       2022-08-13  4586  	}
e397c3c460bf38 drivers/platform/x86/asus-wmi.c  Luke D. Jones       2022-08-13  4587  
601eb4c8e15002 drivers/platform/x86/asus-wmi.c  Luke D. Jones       2022-08-26  4588  	if (code == NOTIFY_KBD_FBM || code == NOTIFY_KBD_TTP) {
601eb4c8e15002 drivers/platform/x86/asus-wmi.c  Luke D. Jones       2022-08-26  4589  		if (asus->fan_boost_mode_available)
9af93db9e140a4 drivers/platform/x86/asus-wmi.c  Daniel Drake        2019-07-17  4590  			fan_boost_mode_switch_next(asus);
bcbfcebda2cbc6 drivers/platform/x86/asus-wmi.c  Mohamed Ghanmi      2024-06-09  4591  		if (asus->throttle_thermal_policy_dev)
b0955ce555478e drivers/platform/x86/asus-wmi.c  Armin Wolf          2024-11-07  4592  			platform_profile_cycle();
2daa86e78c494d drivers/platform/x86/asus-wmi.c  Leonid Maksymchuk   2019-12-15  4593  		return;
2daa86e78c494d drivers/platform/x86/asus-wmi.c  Leonid Maksymchuk   2019-12-15  4594  	}
2daa86e78c494d drivers/platform/x86/asus-wmi.c  Leonid Maksymchuk   2019-12-15  4595  
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4596  	if (is_display_toggle(code) && asus->driver->quirks->no_display_toggle)
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4597  		return;
a2a96f0c722180 drivers/platform/x86/asus-wmi.c  AceLan Kao          2012-10-03  4598  
a2a96f0c722180 drivers/platform/x86/asus-wmi.c  AceLan Kao          2012-10-03 @4599  	if (!sparse_keymap_report_event(asus->inputdev, code,
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4600  					key_value, autorelease))
2cf4f7ebe37ac2 drivers/platform/x86/asus-wmi.c  Jonathan Grant      2026-03-16  4601  		if (code == NOTIFY_THERMAL)
2cf4f7ebe37ac2 drivers/platform/x86/asus-wmi.c  Jonathan Grant      2026-03-16  4602  			pr_info("Thermal state change\n");
2cf4f7ebe37ac2 drivers/platform/x86/asus-wmi.c  Jonathan Grant      2026-03-16  4603  		else
3e70a57b659463 drivers/platform/x86/asus-wmi.c  Luca Stefani        2022-05-06  4604  			pr_info("Unknown key code 0x%x\n", code);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4605  }
3d7b165539d417 drivers/platform/x86/eeepc-wmi.c Yong Wang           2010-04-11  4606  
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#7 lore raw

Re: [PATCH v2] platform/x86: asus-wmi: log thermal notification event

In reply to Jonathan Grant
kernel test robot noticed the following build warnings:

Hi Jonathan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on amd-pstate/linux-next]
[also build test WARNING on amd-pstate/bleeding-edge linus/master v7.0-rc4 next-20260316] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jonathan-Grant/platform-x86-asus-wmi-log-thermal-notification-event/20260316-204950
base:   https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git linux-next
patch link:    https://lore.kernel.org/r/94dbe1e1-d706-47aa-abf5-f5d76aacf017%40jguk.org
patch subject: [PATCH v2] platform/x86: asus-wmi: log thermal notification event
config: i386-randconfig-014-20260317 (https://download.01.org/0day-ci/archive/20260318/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260318/[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 warnings (new ones prefixed by >>):

>> drivers/platform/x86/asus-wmi.c:4603:3: warning: add explicit braces to avoid dangling else [-Wdangling-else]
    4603 |                 else
         |                 ^

1 warning generated.

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

4538
4539 static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
4540 {
4541 enum led_brightness led_value;
4542 unsigned int key_value = 1;
4543 bool autorelease = 1;
4544
4545 if (asus->driver->key_filter) {
4546 asus->driver->key_filter(asus->driver, &code, &key_value,
4547 &autorelease);
4548 if (code == ASUS_WMI_KEY_IGNORE)
4549 return;
4550 }
4551
4552 if (acpi_video_get_backlight_type() == acpi_backlight_vendor &&
4553 code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNDOWN_MAX) {
4554 asus_wmi_backlight_notify(asus, code);
4555 return;
4556 }
4557
4558 scoped_guard(spinlock_irqsave, &asus_ref.lock)
4559 led_value = asus->kbd_led_wk;
4560
4561 if (code == NOTIFY_KBD_BRTUP) {
4562 kbd_led_set_by_kbd(asus, led_value + 1);
4563 return;
4564 }
4565 if (code == NOTIFY_KBD_BRTDWN) {
4566 kbd_led_set_by_kbd(asus, led_value - 1);
4567 return;
4568 }
4569 if (code == NOTIFY_KBD_BRTTOGGLE) {
4570 if (led_value >= ASUS_EV_MAX_BRIGHTNESS)
4571 kbd_led_set_by_kbd(asus, 0);
4572 else
4573 kbd_led_set_by_kbd(asus, led_value + 1);
4574 return;
4575 }
4576
4577 if (code == NOTIFY_FNLOCK_TOGGLE) {
4578 asus->fnlock_locked = !asus->fnlock_locked;
4579 asus_wmi_fnlock_update(asus);
4580 return;
4581 }
4582
4583 if (code == asus->tablet_switch_event_code) {
4584 asus_wmi_tablet_mode_get_state(asus);
4585 return;
4586 }
4587
4588 if (code == NOTIFY_KBD_FBM || code == NOTIFY_KBD_TTP) {
4589 if (asus->fan_boost_mode_available)
4590 fan_boost_mode_switch_next(asus);
4591 if (asus->throttle_thermal_policy_dev)
4592 platform_profile_cycle();
4593 return;
4594 }
4595
4596 if (is_display_toggle(code) && asus->driver->quirks->no_display_toggle)
4597 return;
4598
4599 if (!sparse_keymap_report_event(asus->inputdev, code,
4600 key_value, autorelease))
4601 if (code == NOTIFY_THERMAL)
4602 pr_info("Thermal state change\n");

> 4603			else

4604 pr_info("Unknown key code 0x%x\n", code);
4605 }
4606

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#8 lore raw

Re: [PATCH v2] platform/x86: asus-wmi: log thermal notification event

In reply to Jonathan Grant
kernel test robot noticed the following build warnings:

Hi Jonathan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on amd-pstate/linux-next]
[also build test WARNING on amd-pstate/bleeding-edge linus/master v7.0-rc4 next-20260317] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jonathan-Grant/platform-x86-asus-wmi-log-thermal-notification-event/20260316-204950
base:   https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git linux-next
patch link:    https://lore.kernel.org/r/94dbe1e1-d706-47aa-abf5-f5d76aacf017%40jguk.org
patch subject: [PATCH v2] platform/x86: asus-wmi: log thermal notification event
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260318/[email protected]/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/20260318/[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 warnings (new ones prefixed by >>):

drivers/platform/x86/asus-wmi.c: In function 'asus_wmi_handle_event_code':

>> drivers/platform/x86/asus-wmi.c:4599:12: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
    4599 |         if (!sparse_keymap_report_event(asus->inputdev, code,
         |            ^

vim +/else +4599 drivers/platform/x86/asus-wmi.c

8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4538  
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4539  static void asus_wmi_handle_event_code(int code, struct asus_wmi *asus)
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4540  {
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4541  	enum led_brightness led_value;
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4542  	unsigned int key_value = 1;
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4543  	bool autorelease = 1;
3d7b165539d417 drivers/platform/x86/eeepc-wmi.c Yong Wang           2010-04-11  4544  
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4545  	if (asus->driver->key_filter) {
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4546  		asus->driver->key_filter(asus->driver, &code, &key_value,
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4547  					 &autorelease);
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4548  		if (code == ASUS_WMI_KEY_IGNORE)
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4549  			return;
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4550  	}
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4551  
a5b92be2482e5f drivers/platform/x86/asus-wmi.c  Hans de Goede       2023-10-17  4552  	if (acpi_video_get_backlight_type() == acpi_backlight_vendor &&
a5b92be2482e5f drivers/platform/x86/asus-wmi.c  Hans de Goede       2023-10-17  4553  	    code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNDOWN_MAX) {
a5b92be2482e5f drivers/platform/x86/asus-wmi.c  Hans de Goede       2023-10-17  4554  		asus_wmi_backlight_notify(asus, code);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4555  		return;
a2a96f0c722180 drivers/platform/x86/asus-wmi.c  AceLan Kao          2012-10-03  4556  	}
a2a96f0c722180 drivers/platform/x86/asus-wmi.c  AceLan Kao          2012-10-03  4557  
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4558  	scoped_guard(spinlock_irqsave, &asus_ref.lock)
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4559  		led_value = asus->kbd_led_wk;
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4560  
dbb3d78f61bade drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4561  	if (code == NOTIFY_KBD_BRTUP) {
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4562  		kbd_led_set_by_kbd(asus, led_value + 1);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4563  		return;
dbb3d78f61bade drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4564  	}
dbb3d78f61bade drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4565  	if (code == NOTIFY_KBD_BRTDWN) {
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4566  		kbd_led_set_by_kbd(asus, led_value - 1);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4567  		return;
dbb3d78f61bade drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4568  	}
ed99d29b2b1562 drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4569  	if (code == NOTIFY_KBD_BRTTOGGLE) {
7525566abd360c drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4570  		if (led_value >= ASUS_EV_MAX_BRIGHTNESS)
29f6eb533c3be9 drivers/platform/x86/asus-wmi.c  Jian-Hong Pan       2018-10-22  4571  			kbd_led_set_by_kbd(asus, 0);
ed99d29b2b1562 drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4572  		else
fac55d29581fcd drivers/platform/x86/asus-wmi.c  Antheas Kapenekakis 2026-01-22  4573  			kbd_led_set_by_kbd(asus, led_value + 1);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4574  		return;
ed99d29b2b1562 drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4575  	}
dbb3d78f61bade drivers/platform/x86/asus-wmi.c  Chris Chiu          2018-06-20  4576  
487579bab867e7 drivers/platform/x86/asus-wmi.c  Chris Chiu          2019-04-18  4577  	if (code == NOTIFY_FNLOCK_TOGGLE) {
487579bab867e7 drivers/platform/x86/asus-wmi.c  Chris Chiu          2019-04-18  4578  		asus->fnlock_locked = !asus->fnlock_locked;
487579bab867e7 drivers/platform/x86/asus-wmi.c  Chris Chiu          2019-04-18  4579  		asus_wmi_fnlock_update(asus);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4580  		return;
487579bab867e7 drivers/platform/x86/asus-wmi.c  Chris Chiu          2019-04-18  4581  	}
487579bab867e7 drivers/platform/x86/asus-wmi.c  Chris Chiu          2019-04-18  4582  
1ea0d3b46798af drivers/platform/x86/asus-wmi.c  Hans de Goede       2022-08-24  4583  	if (code == asus->tablet_switch_event_code) {
1ea0d3b46798af drivers/platform/x86/asus-wmi.c  Hans de Goede       2022-08-24  4584  		asus_wmi_tablet_mode_get_state(asus);
e397c3c460bf38 drivers/platform/x86/asus-wmi.c  Luke D. Jones       2022-08-13  4585  		return;
e397c3c460bf38 drivers/platform/x86/asus-wmi.c  Luke D. Jones       2022-08-13  4586  	}
e397c3c460bf38 drivers/platform/x86/asus-wmi.c  Luke D. Jones       2022-08-13  4587  
601eb4c8e15002 drivers/platform/x86/asus-wmi.c  Luke D. Jones       2022-08-26  4588  	if (code == NOTIFY_KBD_FBM || code == NOTIFY_KBD_TTP) {
601eb4c8e15002 drivers/platform/x86/asus-wmi.c  Luke D. Jones       2022-08-26  4589  		if (asus->fan_boost_mode_available)
9af93db9e140a4 drivers/platform/x86/asus-wmi.c  Daniel Drake        2019-07-17  4590  			fan_boost_mode_switch_next(asus);
bcbfcebda2cbc6 drivers/platform/x86/asus-wmi.c  Mohamed Ghanmi      2024-06-09  4591  		if (asus->throttle_thermal_policy_dev)
b0955ce555478e drivers/platform/x86/asus-wmi.c  Armin Wolf          2024-11-07  4592  			platform_profile_cycle();
2daa86e78c494d drivers/platform/x86/asus-wmi.c  Leonid Maksymchuk   2019-12-15  4593  		return;
2daa86e78c494d drivers/platform/x86/asus-wmi.c  Leonid Maksymchuk   2019-12-15  4594  	}
2daa86e78c494d drivers/platform/x86/asus-wmi.c  Leonid Maksymchuk   2019-12-15  4595  
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4596  	if (is_display_toggle(code) && asus->driver->quirks->no_display_toggle)
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4597  		return;
a2a96f0c722180 drivers/platform/x86/asus-wmi.c  AceLan Kao          2012-10-03  4598  
a2a96f0c722180 drivers/platform/x86/asus-wmi.c  AceLan Kao          2012-10-03 @4599  	if (!sparse_keymap_report_event(asus->inputdev, code,
c4453f6a7ceff3 drivers/platform/x86/asus-wmi.c  Seth Forshee        2011-07-01  4600  					key_value, autorelease))
2cf4f7ebe37ac2 drivers/platform/x86/asus-wmi.c  Jonathan Grant      2026-03-16  4601  		if (code == NOTIFY_THERMAL)
2cf4f7ebe37ac2 drivers/platform/x86/asus-wmi.c  Jonathan Grant      2026-03-16  4602  			pr_info("Thermal state change\n");
2cf4f7ebe37ac2 drivers/platform/x86/asus-wmi.c  Jonathan Grant      2026-03-16  4603  		else
3e70a57b659463 drivers/platform/x86/asus-wmi.c  Luca Stefani        2022-05-06  4604  			pr_info("Unknown key code 0x%x\n", code);
8abd752bd4733e drivers/platform/x86/asus-wmi.c  Yurii Pavlovskyi    2019-05-14  4605  }
3d7b165539d417 drivers/platform/x86/eeepc-wmi.c Yong Wang           2010-04-11  4606  
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki