Re: [v2 2/2] soc: fsl: dpio: Use scope-based resource management in dpaa2_io_create()

From: Markus Elfring

Date: Mon Jul 27 2026 - 08:14:58 EST


>> Scope-based resource management became supported for some
>> programming interfaces by contributions of Peter Zijlstra on 2023-05-26.
>> See also the commit 54da6a0924311c7cf5015533991e44fb8eb12773 ("locking:
>> Introduce __cleanup() based infrastructure").
>>
>> * Thus use the attribute “__free(kfree)”.
>>
>> * Omit two kfree() calls accordingly.
>>
>> * Reduce the scopes for the local variables “obj”
>> and “qman_256_cycles_per_ns”.
>
> Why? No one does this except bcachefs and that was removed.
Have you still got development difficulties with scope reductions for
selected local variables?
https://elixir.bootlin.com/linux/v7.2-rc4/source/include/linux/cleanup.h#L142-L146

Regards,
Markus