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]
Message-ID: <CAJZ5v0gh0KSogBqtkq6GmK4pZ7iDc2FELr3=P55ifBish_NeSw@mail.gmail.com>
Date:   Thu, 14 Dec 2023 10:49:56 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:     rafael@...nel.org, caleb.connolly@...aro.org, lina.iyer@...aro.org,
        lukasz.luba@....com, quic_manafm@...cinc.com,
        quic_priyjain@...cinc.com, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/2] PM: QoS: Rename freq to range constraint

On Wed, Dec 13, 2023 at 6:58 PM Daniel Lezcano
<daniel.lezcano@...aro.org> wrote:
>
> The frequency pm_qos relies on a couple of values, the min and max
> frequencies. However more pm_qos will be added with the same logic of
> a couple of min and max. Instead of writing new set of constraints as
> well as type, etc... let's rename freq_* to a more generic name
> range_*
>
> That way, new qos range based can be added easily.
>
> No functional changes intended.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> ---

[cut]

> --- a/include/linux/pm_qos.h
> +++ b/include/linux/pm_qos.h
> @@ -77,25 +77,26 @@ struct pm_qos_flags {
>  #define FREQ_QOS_MIN_DEFAULT_VALUE     0
>  #define FREQ_QOS_MAX_DEFAULT_VALUE     S32_MAX
>
> -enum freq_qos_req_type {
> -       FREQ_QOS_MIN = 1,
> +enum range_qos_req_type {
> +       RANGE_QOS_MIN = 1,
> +       RANGE_QOS_MAX,
> +       FREQ_QOS_MIN,
>         FREQ_QOS_MAX,
>  };

I'd rather do:

+enum range_qos_req_type {
+       RANGE_QOS_MIN = 1
+       RANGE_QOS_MAX,
};

+#define FREQ_QOS_MIN     RANGE_QOS_MIN
+#define FREQ_QOS_MAX     RANGE_QOS_MAX

and they would map exactly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ