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

Markus Elfring <[email protected]>
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-=whPZoi03ZwphxiW6cuWPtC3nyKYS8_BThgztCdgPWP1WA@mail.gmail.com/
>> 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
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.