Re: Annotate pm_runtime_resume_and_get() as __must_check ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03.08.2021 15:07, Rafael J. Wysocki wrote:
> On Sat, Jul 31, 2021 at 11:36 AM Heiner Kallweit <hkallweit1@xxxxxxxxx> wrote:
>>
>> Seeing an erroneous use of pm_runtime_resume_and_get() in a patch I wonder
>> whether we should annotate this function as __must_check. If the caller
>> doesn't check the return code he doesn't know whether usage counter was
>> bumped or not. Therefore I see a good chance that this results in a usage
>> counter imbalance.
> 
> Sounds reasonable.  Please send a patch to make that change.

It took some time to fix the callers that use pm_runtime_resume_and_get()
w/o checking the return code. Last pending patch is [0], all other fixes
are available on linux-next meanwhile.
I'll submit the patch to annotate pm_runtime_resume_and_get() as
__must_check, so that we hopefully can get this into 5.17 (incl. pending [0]).

[0] https://lore.kernel.org/all/ed1ac2f8-5259-684d-42c8-effdf2920e78@xxxxxxxxx/T/



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux