Re: [PATCH v2 1/2] soc: fsl: dpio: Use scope-based resource management in dpaa2_io_store_create()
Ioana Ciornei <[email protected]> Mon, 27 Jul 2026 15:08:17 +0300
| Newsgroups | org.kernel.vger.kernel-janitors,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.ozlabs.lists.linuxppc-dev |
|---|---|
| Message-ID | <y2h44um2grcbecnpkck44cvudugha6df2itq2uy5y46whxjouh@yy2kebig3ia5> |
On Mon, Jul 06, 2026 at 12:38:08PM +0200, Markus Elfring wrote: > From: Markus Elfring <[email protected]> > Date: Mon, 6 Jul 2026 10:34:43 +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)”. > > * Reduce the scope for the local variable “ret”. Please don't. Let all the variables be defined at the start of each function. > > * Omit two kfree() calls accordingly. > > * Omit the local variable “size” (for another memory allocation). Please remove this change, not related to the intention of the patch. Ioana