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] [day] [month] [year] [list]
Message-ID: <a3comdacnan2ztxsxfkjqh6wp732ytsrixmqvm4pb7xlfvuiho@2fycbsezj5xw>
Date: Tue, 27 Jan 2026 11:03:50 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Aleks Todorov <aleksbgbg@...gle.com>
Cc: Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>, 
	Stephen Boyd <sboyd@...nel.org>, Ulf Hansson <ulf.hansson@...aro.org>, linux-pm@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] OPP: Return correct value in dev_pm_opp_get_level

On 23-01-26, 14:03, Aleks Todorov wrote:
> Commit 073d3d2ca7d4 ("OPP: Level zero is valid") modified the
> documentation for this function to indicate that errors should return a
> non-zero value to avoid colliding with the OPP level zero, however
> forgot to actually update the return.
> 
> No in-tree kernel code depends on the error value being 0.
> 
> Fixes: 073d3d2ca7d4 ("OPP: Level zero is valid")
> Signed-off-by: Aleks Todorov <aleksbgbg@...gle.com>
> ---
>  drivers/opp/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/opp/core.c b/drivers/opp/core.c
> index dbebb8c829bc..ae43c656f108 100644
> --- a/drivers/opp/core.c
> +++ b/drivers/opp/core.c
> @@ -241,7 +241,7 @@ unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp)
>  {
>  	if (IS_ERR_OR_NULL(opp) || !opp->available) {
>  		pr_err("%s: Invalid parameters\n", __func__);
> -		return 0;
> +		return U32_MAX;
>  	}
>  
>  	return opp->level;

Applied. Thanks.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ