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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 22 Apr 2016 15:27:36 -0700
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	Rafael Wysocki <rjw@...ysocki.net>, linaro-kernel@...ts.linaro.org,
	linux-pm@...r.kernel.org, nm@...com, arnd.bergmann@...aro.org,
	andrew@...n.ch, gregory.clement@...e-electrons.com,
	jason@...edaemon.net, sebastian.hesselbarth@...il.com,
	thomas.petazzoni@...e-electrons.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 07/10] cpufreq: dt: Identify cpu-sharing for platforms
 without operating-points-v2

On 04/21, Viresh Kumar wrote:
> @@ -167,14 +167,16 @@ static int cpufreq_init(struct cpufreq_policy *policy)
>  	/* Get OPP-sharing information from "operating-points-v2" bindings */
>  	ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, policy->cpus);
>  	if (ret) {
> +		if (ret != -ENOENT)
> +			goto out_put_clk;
> +
>  		/*
>  		 * operating-points-v2 not supported, fallback to old method of
> -		 * finding shared-OPPs for backward compatibility.
> +		 * finding shared-OPPs for backward compatibility if the
> +		 * platform hasn't set sharing CPUs.
>  		 */
> -		if (ret == -ENOENT)
> -			opp_v1 = true;
> -		else
> -			goto out_put_clk;
> +		if (dev_pm_opp_get_sharing_cpus(cpu_dev, policy->cpus))
> +			fallback = true;

I'm sort of lost, we make the same call twice here. Why would the
return value change between the first time and the second?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ