From: Jakub Kicinski <kuba@kernel.org>
To: Wei Fang <wei.fang@nxp.com>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
claudiu.manoil@nxp.com, vladimir.oltean@nxp.com,
xiaoning.wang@nxp.com, Frank.Li@nxp.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
richardcochran@gmail.com, imx@lists.linux.dev,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v3 net-next 4/6] net: enetc: add ptp timer binding support for i.MX94
Date: Tue, 28 Oct 2025 16:56:43 -0700 [thread overview]
Message-ID: <20251028165643.7ae07efd@kernel.org> (raw)
In-Reply-To: <20251027014503.176237-5-wei.fang@nxp.com>
On Mon, 27 Oct 2025 09:45:01 +0800 Wei Fang wrote:
> + struct device_node *timer_np __free(device_node) = NULL;
Please go back to the code from v2.
Quoting documentation:
Using device-managed and cleanup.h constructs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Netdev remains skeptical about promises of all "auto-cleanup" APIs,
including even ``devm_`` helpers, historically. They are not the preferred
style of implementation, merely an acceptable one.
Use of ``guard()`` is discouraged within any function longer than 20 lines,
``scoped_guard()`` is considered more readable. Using normal lock/unlock is
still (weakly) preferred.
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.
Similar guidance applies to declaring variables mid-function.
See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#using-device-managed-and-cleanup-h-constructs
next prev parent reply other threads:[~2025-10-28 23:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 1:44 [PATCH v3 net-next 0/6] net: enetc: Add i.MX94 ENETC support Wei Fang
2025-10-27 1:44 ` [PATCH v3 net-next 1/6] dt-bindings: net: netc-blk-ctrl: add compatible string for i.MX94 platforms Wei Fang
2025-10-27 1:44 ` [PATCH v3 net-next 2/6] dt-bindings: net: enetc: add compatible string for ENETC with pseduo MAC Wei Fang
2025-10-27 1:45 ` [PATCH v3 net-next 3/6] net: enetc: add preliminary i.MX94 NETC blocks control support Wei Fang
2025-10-27 1:45 ` [PATCH v3 net-next 4/6] net: enetc: add ptp timer binding support for i.MX94 Wei Fang
2025-10-28 23:56 ` Jakub Kicinski [this message]
2025-10-29 0:14 ` Wei Fang
2025-10-27 1:45 ` [PATCH v3 net-next 5/6] net: enetc: add basic support for the ENETC with pseudo MAC " Wei Fang
2025-10-27 8:26 ` Claudiu Manoil
2025-10-27 1:45 ` [PATCH v3 net-next 6/6] net: enetc: add standalone ENETC support " Wei Fang
2025-10-28 23:57 ` [PATCH v3 net-next 0/6] net: enetc: Add i.MX94 ENETC support Jakub Kicinski
2025-10-29 0:13 ` Wei Fang
2025-10-29 0:19 ` Jakub Kicinski
2025-10-29 0:26 ` Wei Fang
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=20251028165643.7ae07efd@kernel.org \
--to=kuba@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=andrew+netdev@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=vladimir.oltean@nxp.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.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.