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, 1 Mar 2023 14:03:05 +0100
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     Jun Nie <jun.nie@...aro.org>, Viresh Kumar <vireshk@...nel.org>,
        Nishanth Menon <nm@...com>, Stephen Boyd <sboyd@...nel.org>,
        linux-pm@...r.kernel.org,
        Vincent Guittot <vincent.guittot@...aro.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] OPP: Handle all genpd cases together in _set_required_opps()

On Wed, 22 Feb 2023 at 12:07, Viresh Kumar <viresh.kumar@...aro.org> wrote:
>
> There is no real need of keeping separate code for single genpd case, it
> can be made to work with a simple change.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>

Reviewed-by: Ulf Hansson <ulf.hansson@...aro.org>

Kind regards
Uffe

> ---
>  drivers/opp/core.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/opp/core.c b/drivers/opp/core.c
> index e87567dbe99f..6d7016ce8c53 100644
> --- a/drivers/opp/core.c
> +++ b/drivers/opp/core.c
> @@ -959,7 +959,8 @@ static int _set_required_opps(struct device *dev,
>                               struct dev_pm_opp *opp, bool up)
>  {
>         struct opp_table **required_opp_tables = opp_table->required_opp_tables;
> -       struct device **genpd_virt_devs = opp_table->genpd_virt_devs;
> +       struct device **genpd_virt_devs =
> +               opp_table->genpd_virt_devs ? opp_table->genpd_virt_devs : &dev;
>         int i, ret = 0;
>
>         if (!required_opp_tables)
> @@ -979,12 +980,6 @@ static int _set_required_opps(struct device *dev,
>                 return -ENOENT;
>         }
>
> -       /* Single genpd case */
> -       if (!genpd_virt_devs)
> -               return _set_required_opp(dev, dev, opp, 0);
> -
> -       /* Multiple genpd case */
> -
>         /*
>          * Acquire genpd_virt_dev_lock to make sure we don't use a genpd_dev
>          * after it is freed from another thread.
> --
> 2.31.1.272.g89b43f80a514
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ