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: <e6e1ee6d-a12f-4e18-b2d7-65d1ccca5308@quicinc.com>
Date: Tue, 22 Apr 2025 22:37:25 +0530
From: Praveen Talari <quic_ptalari@...cinc.com>
To: Viresh Kumar <viresh.kumar@...aro.org>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby
	<jirislaby@...nel.org>, Rob Herring <robh@...nel.org>,
        Krzysztof Kozlowski
	<krzk+dt@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Bjorn Andersson
	<andersson@...nel.org>,
        Konrad Dybcio <konradybcio@...nel.org>,
        Viresh Kumar
	<vireshk@...nel.org>, Nishanth Menon <nm@...com>,
        Stephen Boyd
	<sboyd@...nel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        <linux-arm-msm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-serial@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-pm@...r.kernel.org>, <psodagud@...cinc.com>,
        <djaggi@...cinc.com>, <quic_msavaliy@...cinc.com>,
        <quic_vtanuku@...cinc.com>, <quic_arandive@...cinc.com>,
        <quic_mnaresh@...cinc.com>, <quic_shazhuss@...cinc.com>,
        Nikunj Kela <quic_nkela@...cinc.com>
Subject: Re: [PATCH v2 1/9] opp: add new helper API dev_pm_opp_set_level()

Thank viresh for review.

On 4/21/2025 1:10 PM, Viresh Kumar wrote:
> On 18-04-25, 20:42, Praveen Talari wrote:
>> diff --git a/drivers/opp/core.c b/drivers/opp/core.c
>> index 73e9a3b2f29b..a9bca9502f71 100644
>> --- a/drivers/opp/core.c
>> +++ b/drivers/opp/core.c
>> @@ -3151,3 +3151,25 @@ void dev_pm_opp_remove_table(struct device *dev)
>>   	dev_pm_opp_put_opp_table(opp_table);
>>   }
>>   EXPORT_SYMBOL_GPL(dev_pm_opp_remove_table);
>> +
>> +/*
>> + * dev_pm_opp_set_level() - Configure device for a level
>> + * @dev: device for which we do this operation
>> + * @level: level to set to
>> + *
>> + * Return: 0 on success, a negative error number otherwise.
>> + */
>> +int dev_pm_opp_set_level(struct device *dev, unsigned int level)
> I would rather move this to pm_opp.h as an inline helper.

most of helper APIs in core.c and even i don't see any helper API in 
pm_opp.c.

please let me know if you still need to add in pm_opp.h.

>
>> +{
>> +	struct dev_pm_opp *opp = dev_pm_opp_find_level_exact(dev, level);
>> +	int ret;
>> +
>> +	if (IS_ERR(opp))
>> +		return -EINVAL;
> Why not reuse the same error value ?

as reference of APIs in core.c, i have used  -EINVAl instead of IS_ERR(opp).

Let me know your thoughts on return value.

>
>> +
>> +	ret = dev_pm_opp_set_opp(dev, opp);
>> +	dev_pm_opp_put(opp);
>> +
>> +	return ret;
>> +}
>> +EXPORT_SYMBOL_GPL(dev_pm_opp_set_level);
> Make the changes and send it separately (or with the series, your
> choice), I will apply it to the OPP tree. Thanks.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ