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

From: Markus Elfring

Date: Tue Jul 28 2026 - 07:16:47 EST


>> 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-=whPZoi03ZwphxiW6cuWPtC3nyKYS8_BThgztCdgPWP1WA@xxxxxxxxxxxxxx/
>> https://lkml.org/lkml/2025/11/18/1766
>
> 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 validation.
Thus I imagine that it would occasionally be nicer to avoid extra data processing accordingly.

Regards,
Markus