[PATCH] platform/x86: asus-wmi: Don't warn when fan curve method is unsupported

HyeongJun An posted 1 patch 3 days, 2 hours ago
drivers/platform/x86/asus-wmi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH] platform/x86: asus-wmi: Don't warn when fan curve method is unsupported
Posted by HyeongJun An 3 days, 2 hours ago
fan_curve_check_present() probes for fan curve support by calling
fan_curve_get_factory_default(). On devices whose firmware does not
implement the fan curve WMI methods (e.g. the ASUS-built Intel
NUC15CRHU5), the underlying asus_wmi_evaluate_method_buf() returns
-ENODEV, which fan_curve_get_factory_default() reports with pr_warn()
on every boot:

  asus_wmi: fan_curve_get_factory_default (0x00110024) failed: -19
  asus_wmi: fan_curve_get_factory_default (0x00110025) failed: -19
  asus_wmi: fan_curve_get_factory_default (0x00110032) failed: -19

This is a normal, expected condition: the caller already handles the
absence gracefully, and asus_wmi_evaluate_method_buf() already logs the
unsupported method at pr_debug() level. Suppress the warning for -ENODEV
while keeping it for genuine failures.

Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
---
 drivers/platform/x86/asus-wmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 80144c412b90..9b12a9e1eb97 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -3538,7 +3538,8 @@ static int fan_curve_get_factory_default(struct asus_wmi *asus, u32 fan_dev)
 	err = asus_wmi_evaluate_method_buf(asus->dsts_id, fan_dev, mode, buf,
 					   FAN_CURVE_BUF_LEN);
 	if (err) {
-		pr_warn("%s (0x%08x) failed: %d\n", __func__, fan_dev, err);
+		if (err != -ENODEV)
+			pr_warn("%s (0x%08x) failed: %d\n", __func__, fan_dev, err);
 		return err;
 	}
 
-- 
2.43.0
Re: [PATCH] platform/x86: asus-wmi: Don't warn when fan curve method is unsupported
Posted by HyeongJun An 2 days, 16 hours ago
Hi,

This duplicates an earlier patch by Armandas Kvietkus:

  https://lore.kernel.org/all/20260503174752.26288-1-armundunelis@gmail.com/

I missed it before sending, sorry for the noise. Ilpo already reviewed
that patch and suggested using pr_debug() instead, so please disregard
this patch.

Thanks,
HyeongJun