Re: [PATCH net-next] nfc: mrvl: use scoped device node handling to simplify cleanup

From: Krzysztof Kozlowski
Date: Fri Aug 16 2024 - 01:12:01 EST


On 16/08/2024 04:08, Jakub Kicinski wrote:
> On Tue, 13 Aug 2024 12:39:04 +0200 Krzysztof Kozlowski wrote:
>> - matched_node = of_get_compatible_child(node, "marvell,nfc-uart");
>> + struct device_node *matched_node __free(device_node) = of_get_compatible_child(node,
>> + "marvell,nfc-uart");
>
> The 100+ character line mixing declaration and code is more than
> I can bear. Sorry.

If by mixing you mean declaration not on top of the code, that's the
preferred style for __free() usage, as expressed by Linus. Constructor
and destructor in one place.

The 100 line, can be solved with wrapping after '=', but of course it is
not particularly pretty.

Let's drop the patch then.

Best regards,
Krzysztof