ACK: [PATCH] fan: cur_state == -1 is valid for intel_powerclamp

Colin Ian King colin.king at canonical.com
Fri Apr 13 19:10:44 UTC 2018


On 13/04/18 19:18, Alex Hung wrote:
> In Documentation/thermal/intel_powerclamp.txt, it states that the
> "When idle injection is disabled, reading cur_state returns value -1
> instead of 0 which is to avoid confusing 100% busy state with the
> disabled state".
> 
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/acpi/fan/fan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpi/fan/fan.c b/src/acpi/fan/fan.c
> index f6e9399..298d3a1 100644
> --- a/src/acpi/fan/fan.c
> +++ b/src/acpi/fan/fan.c
> @@ -154,7 +154,7 @@ static int fan_test1(fwts_framework *fw)
>  			fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoFanMaxState",
>  				"Fan %s present but has no max_state present.",
>  				info->name);
> -		if (info->cur_state == -1)
> +		if (info->cur_state == -1 && strcmp(info->type, "intel_powerclamp"))
>  			fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoFanCurState",
>  				"Fan %s present but has no cur_state present.",
>  				info->name);
> 
Acked-by: Colin Ian King <colin.king at canonical.com>



More information about the fwts-devel mailing list