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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 6 Nov 2019 09:03:17 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Leonid Maksymchuk <leonmaxx@...il.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        acpi4asus-user <acpi4asus-user@...ts.sourceforge.net>,
        Chris Chiu <chiu@...lessm.com>,
        Yurii Pavlovskyi <yurii.pavlovskyi@...il.com>,
        Kristian Klausen <kristian@...usen.dk>,
        Andy Shevchenko <andy@...radead.org>,
        Darren Hart <dvhart@...radead.org>,
        Corentin Chary <corentin.chary@...il.com>
Subject: Re: [PATCH v2 3/3] platform/x86: asus_wmi: Set default fan boost mode
 to normal

On Mon, Nov 4, 2019 at 11:39 PM Leonid Maksymchuk <leonmaxx@...il.com> wrote:
>
> Set default fan boost mode to normal for multiple reasons:
>
> 1) existing code assumes that laptop started in normal mode and that is
>    not always correct.
> 2) FX705DY/FX505DY starts in silent mode and under heavy CPU load it
>    overheats and drops CPU frequency to 399MHz [1]. Setting fan mode to
>    normal avoids overheating.
>
> [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=203733
>
> Signed-off-by: Leonid Maksymchuk <leonmaxx@...il.com>

> +static int fan_boost_mode_set_default(struct asus_wmi *asus)
> +{
> +       int result = 0;
> +
> +       if (asus->fan_boost_mode_available) {
> +               asus->fan_boost_mode = ASUS_FAN_BOOST_MODE_NORMAL;
> +               result = fan_boost_mode_write(asus);
> +       }
> +
> +       return result;
> +}

This can be refactored

if (!foo)
  return 0;
...
return bar(asus);

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ