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

Markus Elfring <[email protected]> Tue, 28 Jul 2026 13:15:16 +0200
Newsgroups gmane.linux.ports.ppc.embedded,gmane.linux.ports.arm.kernel,gmane.linux.kernel,gmane.linux.kernel.janitors
Message-ID <[email protected]>
>> How will development concerns evolve further also according to previous=
 clarification attempts?
>>
>> Clarifying confusion of our variable placement rules caused by cleanup.=
h
>> https://lore.kernel.org/ksummit/CAHk-=3DwhPZoi03ZwphxiW6cuWPtC3nyKYS8_B=
[email protected]/
>> https://lkml.org/lkml/2025/11/18/1766
>=20
> My preference still stands and I do not think they contradict the views
> expressed in the above links:

It seems that more time and guidance adjustments would be needed
to adapt development habits into further directions.


> - Variables which do not have anything to do with cleanup.h should still
>   be defined at the start of the function. This is the case of the
>   qman_256_cycles_per_ns which you moved in 2/2 without any motive.
> - In the case of a variable used with __free, if it can be done, I
>   prefer to see the definition and initialization done at the start of
>   the function.

The discussed function implementations contain also input parameter valida=
tion.
Thus I imagine that it would occasionally be nicer to avoid extra data pro=
cessing accordingly.

Regards,
Markus