From: Coia Prant <coiaprant@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
linux-rockchip@lists.infradead.org
Subject: Re: [PATCH net-next] net: pcs: xpcs-rk: use cleanup.h for platform_device reference
Date: Mon, 23 Nov 2026 23:15:15 +0800 [thread overview]
Message-ID: <CF84A604-EB2D-44D6-BADF-53D85C975EB1@gmail.com> (raw)
In-Reply-To: <814be8ca-6fe4-401a-af4e-206f1b67be74@lunn.ch>
On November 23, 2026 11:11:00 PM GMT+08:00, Andrew Lunn <andrew@lunn.ch> wrote:
>On Mon, Nov 23, 2026 at 08:30:53PM +0800, Coia Prant wrote:
>> Use the __free(platform_device_put) cleanup action to manage the
>> platform_device reference obtained from of_find_device_by_node().
>>
>> This removes the need for explicit put_device() calls on every failure
>> path and at the end of the successful path, simplifying the function
>> and reducing the chance of reference leaks or double puts.
>>
>> Signed-off-by: Coia Prant <coiaprant@gmail.com>
>
>https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
>
>Low level cleanup constructs (such as __free()) can be used when
>building APIs and helpers, especially scoped iterators. However,
>direct use of __free() within networking core and drivers is
>discouraged.
>
> Andrew
>
>---
>pw-bot: cr
Understood, thanks for the pointer. I have no plan to change this and will
keep the explicit put_device() calls as-is. Dropping this patch.
- Coia
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: Coia Prant <coiaprant@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
linux-rockchip@lists.infradead.org
Subject: Re: [PATCH net-next] net: pcs: xpcs-rk: use cleanup.h for platform_device reference
Date: Mon, 23 Nov 2026 23:15:15 +0800 [thread overview]
Message-ID: <CF84A604-EB2D-44D6-BADF-53D85C975EB1@gmail.com> (raw)
In-Reply-To: <814be8ca-6fe4-401a-af4e-206f1b67be74@lunn.ch>
On November 23, 2026 11:11:00 PM GMT+08:00, Andrew Lunn <andrew@lunn.ch> wrote:
>On Mon, Nov 23, 2026 at 08:30:53PM +0800, Coia Prant wrote:
>> Use the __free(platform_device_put) cleanup action to manage the
>> platform_device reference obtained from of_find_device_by_node().
>>
>> This removes the need for explicit put_device() calls on every failure
>> path and at the end of the successful path, simplifying the function
>> and reducing the chance of reference leaks or double puts.
>>
>> Signed-off-by: Coia Prant <coiaprant@gmail.com>
>
>https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
>
>Low level cleanup constructs (such as __free()) can be used when
>building APIs and helpers, especially scoped iterators. However,
>direct use of __free() within networking core and drivers is
>discouraged.
>
> Andrew
>
>---
>pw-bot: cr
Understood, thanks for the pointer. I have no plan to change this and will
keep the explicit put_device() calls as-is. Dropping this patch.
- Coia
next prev parent reply other threads:[~2026-11-23 15:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 12:30 [PATCH net-next] net: pcs: xpcs-rk: use cleanup.h for platform_device reference Coia Prant
2026-11-23 12:30 ` Coia Prant
2026-11-23 15:11 ` Andrew Lunn
2026-11-23 15:11 ` Andrew Lunn
2026-11-23 15:15 ` Coia Prant [this message]
2026-11-23 15:15 ` Coia Prant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CF84A604-EB2D-44D6-BADF-53D85C975EB1@gmail.com \
--to=coiaprant@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.