lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <772e3de4-4e42-474e-8a7f-75e592756053@linux.intel.com>
Date: Thu, 18 Apr 2024 21:50:01 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Mohamed Ghanmi <mohamed.ghanmi@...com.tn>
cc: Hans de Goede <hdegoede@...hat.com>, corentin.chary@...il.com, 
    platform-driver-x86@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>, 
    "Luke D . Jones" <luke@...nes.dev>
Subject: Re: [PATCH v1 1/1] platform/x86: asus-wmi: add support for vivobook
 fan profiles

On Thu, 18 Apr 2024, Mohamed Ghanmi wrote:

> Add support for vivobook fan profiles wmi call on the ASUS VIVOBOOK
> to adjust power limits.
> 
> These fan profiles have a different device id than the ROG series
> and different order. This reorders the existing modes and adds a new
> full speed mode available on these laptops.
> 
> As part of keeping the patch clean the throttle_thermal_policy_available
> boolean stored in the driver struct is removed and
> throttle_thermal_policy_dev is used in place (as on init it is zeroed).
> 
> Signed-off-by: Mohamed Ghanmi <mohamed.ghanmi@...com.tn>
> Co-developed-by: Luke D. Jones <luke@...nes.dev>
> Signed-off-by: Luke D. Jones <luke@...nes.dev>
> ---

> @@ -3618,38 +3623,38 @@ static int asus_wmi_custom_fan_curve_init(struct asus_wmi *asus)
>  }
>  
>  /* Throttle thermal policy ****************************************************/
> -
> -static int throttle_thermal_policy_check_present(struct asus_wmi *asus)
> +static u8 throttle_thermal_policy_max_mode(struct asus_wmi *asus)
>  {
> -	u32 result;
> -	int err;
> -
> -	asus->throttle_thermal_policy_available = false;
> -
> -	err = asus_wmi_get_devstate(asus,
> -				    ASUS_WMI_DEVID_THROTTLE_THERMAL_POLICY,
> -				    &result);
> -	if (err) {
> -		if (err == -ENODEV)
> -			return 0;
> -		return err;
> +	if (asus->throttle_thermal_policy_dev == ASUS_WMI_DEVID_THROTTLE_THERMAL_POLICY_VIVO) {
> +		return ASUS_THROTTLE_THERMAL_POLICY_FULLSPEED;
> +	} else {
> +		return ASUS_THROTTLE_THERMAL_POLICY_SILENT;
>  	}

Thanks for the update, braces are unnecessary here. Other than that, this 
looks fine:

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

(This was not v1 any more, although the v1 was sent not by you but
Luke).


-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ