Re: [v2 1/2] soc: fsl: dpio: Use scope-based resource management in dpaa2_io_store_create()
Markus Elfring <[email protected]> Mon, 27 Jul 2026 14:24:55 +0200
| Newsgroups | org.kernel.vger.kernel-janitors,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.ozlabs.lists.linuxppc-dev |
|---|---|
| Message-ID | <[email protected]> |
>> 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 =E2=80=9C__free(kfree)=E2=80=9D.
>>
>> * Reduce the scope for the local variable =E2=80=9Cret=E2=80=9D.
>=20
> Please don't. Let all the variables be defined at the start of each func=
tion.
Do we stumble on another coding style preferences conflict here?
https://elixir.bootlin.com/linux/v7.2-rc4/source/include/linux/cleanup.h#L=
142-L146
>> * Omit two kfree() calls accordingly.
>>
>> * Omit the local variable =E2=80=9Csize=E2=80=9D (for another memory al=
location).
>=20
> Please remove this change, not related to the intention of the patch.
What does hinder to perform the required size determination as a direct pa=
rameter
for a kzalloc() call?
Regards,
Markus