* [PATCH] platform/x86: asus-wmi: suppress -ENODEV warning in fan_curve_get_factory_default()
@ 2026-05-03 17:47 Armandas Kvietkus
2026-05-06 11:13 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Armandas Kvietkus @ 2026-05-03 17:47 UTC (permalink / raw)
To: luke, denis.benato
Cc: hansg, ilpo.jarvinen, platform-driver-x86, linux-kernel,
Armandas Kvietkus, fxzxaxon, Armandas Kvietkus
When the firmware does not support the fan curve WMI method,
asus_wmi_evaluate_method_buf() returns -ENODEV. The caller
fan_curve_check_present() already handles this gracefully by
treating it as a non-error, but fan_curve_get_factory_default()
still emits a pr_warn() before returning, producing spurious
boot noise on unsupported hardware.
Suppress the warning for -ENODEV only, consistent with how
this error is handled elsewhere in asus-wmi.c.
Reported-by: fxzxaxon@outlook.com
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221441
Signed-off-by: Armandas Kvietkus <armandas.kvietkus@proton.me>
---
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 80144c412..9b12a9e1e 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.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] platform/x86: asus-wmi: suppress -ENODEV warning in fan_curve_get_factory_default()
2026-05-03 17:47 [PATCH] platform/x86: asus-wmi: suppress -ENODEV warning in fan_curve_get_factory_default() Armandas Kvietkus
@ 2026-05-06 11:13 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2026-05-06 11:13 UTC (permalink / raw)
To: Armandas Kvietkus
Cc: luke, denis.benato, Hans de Goede, platform-driver-x86, LKML,
fxzxaxon, Armandas Kvietkus
On Sun, 3 May 2026, Armandas Kvietkus wrote:
> When the firmware does not support the fan curve WMI method,
> asus_wmi_evaluate_method_buf() returns -ENODEV. The caller
> fan_curve_check_present() already handles this gracefully by
> treating it as a non-error, but fan_curve_get_factory_default()
> still emits a pr_warn() before returning, producing spurious
> boot noise on unsupported hardware.
>
> Suppress the warning for -ENODEV only, consistent with how
> this error is handled elsewhere in asus-wmi.c.
>
> Reported-by: fxzxaxon@outlook.com
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221441
> Signed-off-by: Armandas Kvietkus <armandas.kvietkus@proton.me>
> ---
> 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 80144c412..9b12a9e1e 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);
Hi,
If this print is useful at all, it looks more like it wants to be on debug
level which would also prevent the warning appearing in the logs unless
asked to.
Whenever something prints just __func__ and error codes, the line is
hardly meant for normal user consumption.
If you want to preserve this on warn level, the message has to be changed
as well to say the warning in plain English (preferrable in another
another patch).
(I prefer making it debug level.)
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-06 11:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-03 17:47 [PATCH] platform/x86: asus-wmi: suppress -ENODEV warning in fan_curve_get_factory_default() Armandas Kvietkus
2026-05-06 11:13 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox