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:   Mon, 22 May 2017 18:09:47 -0700
From:   Stephen Boyd <sboyd@...eaurora.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     Rafael Wysocki <rjw@...ysocki.net>,
        Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
        linaro-kernel@...ts.linaro.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Vincent Guittot <vincent.guittot@...aro.org>
Subject: Re: [PATCH 1/4] PM / OPP: Reorganize _generic_set_opp_regulator()

On 05/17, Viresh Kumar wrote:
> The code was overly complicated here because of the limitations that we
> had with RCUs (Couldn't use opp-table and OPPs outside RCU protected
> section and can't call sleep-able routines from within that). But that
> is long gone now.
> 
> Reorganize _generic_set_opp_regulator() in order to avoid using "struct
> dev_pm_set_opp_data" and copying data into it for the case where
> opp_table->set_opp is not set.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
> ---
>  drivers/base/power/opp/core.c | 73 ++++++++++++++++++++-----------------------
>  1 file changed, 34 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
> index dae61720b314..402b9e86d77c 100644
> --- a/drivers/base/power/opp/core.c
> +++ b/drivers/base/power/opp/core.c
> @@ -543,17 +543,18 @@ _generic_set_opp_clk_only(struct device *dev, struct clk *clk,
>  	return ret;
>  }
>  
> -static int _generic_set_opp(struct dev_pm_set_opp_data *data)
> +static int _generic_set_opp_regulator(struct opp_table *opp_table,

Can opp_table be const?

> +				      struct device *dev,

Maybe dev too, but that looks like a ripple effect so maybe
in another patch.

> +				      unsigned long old_freq,
> +				      unsigned long freq,
> +				      struct dev_pm_opp_supply *old_supply,
> +				      struct dev_pm_opp_supply *new_supply)

Otherwise

Reviewed-by: Stephen Boyd <sboyd@...eaurora.org>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists