Re: [PATCH] pmdomain: rockchip: Simplify dropping OF node reference

Markus Elfring
2024-09-13T13:18:04Z

Dear Krzysztof,

I noticed also this contribution.
I found it easy to convert it also into the following small script variant
for the semantic patch language (Coccinelle software).

@adjustment@
expression e, x;
@@
+of_node_put(e);
if (...)
{
<+... when != e = x
- of_node_put(e);
...+>
}
-of_node_put(e);

58 patches were accordingly generated for source files of the software “Linux next-20240913”.
How would we like to tackle remaining update candidates according to similar transformation patterns?

Regards,
Markus