Re: [PATCH] platform/x86: hp-wmi: handle positive BIOS error codes
Ilpo Järvinen <[email protected]>
| Newsgroups | org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 30 Jun 2026, Yousef Alhouseen wrote: > hp_wmi_perform_query() returns firmware BIOS error codes as positive > values. The Victus-S profile callers only reject negative errors, then > consume output fields that are not filled for a positive firmware error. On which hw you see this? Please add the info. > Treat every nonzero result from victus_s_gpu_thermal_profile_get() > as a failed query before using its outputs. > > Signed-off-by: Yousef Alhouseen <[email protected]> > --- > drivers/platform/x86/hp/hp-wmi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c > index 8ba286ed8721..50c5a1e152dd 100644 > --- a/drivers/platform/x86/hp/hp-wmi.c > +++ b/drivers/platform/x86/hp/hp-wmi.c > @@ -1825,7 +1825,7 @@ static int victus_s_gpu_thermal_profile_set(bool ctgp_enable, > ¤t_ppab_state, > ¤t_dstate, > ¤t_gpu_slowdown_temp); > - if (ret < 0) { > + if (ret) { > pr_warn("GPU modes not updated, unable to get slowdown temp\n"); > return ret; > } > @@ -1907,7 +1907,7 @@ static int platform_profile_victus_s_get_ec(enum platform_profile_option *profil > ¤t_ppab_state, > ¤t_dstate, > ¤t_gpu_slowdown_temp); > - if (ret < 0) > + if (ret) > return ret; > if (current_ctgp_state == 0 && current_ppab_state == 0) > *profile = PLATFORM_PROFILE_LOW_POWER; > -- i.