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

Ioana Ciornei <[email protected]>
Newsgroups org.ozlabs.lists.linuxppc-dev,org.infradead.lists.linux-arm-kernel,org.kernel.vger.kernel-janitors,org.kernel.vger.linux-kernel
Message-ID <lzwhee46xmnhgr2vjwzuoe2ysmlqavhpyod5kn67avwockpzin@dq2pbhluryme>
On Mon, Jul 06, 2026 at 12:40:09PM +0200, Markus Elfring wrote:
> From: Markus Elfring <[email protected]>
> Date: Mon, 6 Jul 2026 11:18:39 +0200
> 
> 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”.

Remove these changes. All variables should be defined at the start of
the function, especially since there is no strong reason not to.

Ioana
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.