Re: [PATCH 2/2] asus-wmi: Support the GPU fan on TUF laptops

From: Andy Shevchenko
Date: Mon Aug 08 2022 - 11:57:48 EST


On Mon, Aug 8, 2022 at 6:38 AM Luke D. Jones <luke@xxxxxxxxxx> wrote:
>
> Add support for TUF laptops which have the ability to control
> the GPU fan. This will show as a second fan in hwmon, and has
> the ability to run run as boost (fullspeed), or auto.

Single 'run' is enough, I believe.

...

> + /*
> + * Modern models like G713 also have GPU fan control. This is not AGFN.

like the G713
(Also possibly to surround this subphrase by commas)

...

> +static ssize_t pwm2_enable_show(struct device *dev,
> + struct device_attribute *attr,
> + char *buf)
> +{
> + struct asus_wmi *asus = dev_get_drvdata(dev);
> +
> + return sprintf(buf, "%d\n", asus->gpu_fan_pwm_mode);

SHould be sysfs_emit(). If there are other uses of sprintf() or
similar in the cases when it goes to sysfs, you may add another patch
to fix them all.

> +}

--
With Best Regards,
Andy Shevchenko