From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: Frank.Li@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
conor+dt@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH net-next v4 3/4] net: mdio: make device map changes hotplug-safe
Date: Sat, 08 Aug 2026 03:54:57 +0000 [thread overview]
Message-ID: <20260808035458.46D571F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260806-submit-mdio-of-dynamic-v2-v4-3-4beb0c50d5ba@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The 'dynamic' removal flag is hardcoded to false across all API boundaries, rendering the dynamic firmware-node reference dropping and exclusive firmware removal transactions unreachable dead code.
--
--- Patch [3]: [PATCH net-next v4 3/4] net: mdio: make device map changes hotplug-safe ---
Note: The format of this review has been altered to use a free-form summary
rather than inline patch quoting due to automated recitation restrictions.
commit ea45b70c0d34732ca4b03fdec7b5cb7a401e48fb
Author: James Hilliard <james.hilliard1@gmail.com>
Subject: net: mdio: make device map changes hotplug-safe
This patch serializes device-map state and reserves addresses while
registration is in progress to make MDIO device map changes hotplug-safe.
It also adds logic to handle dynamic removals and overlay node cleanup.
[Severity: Medium]
The commit message states that the patch will "Drop a dynamically removed
device's firmware-node reference after device_del() so it does not keep an
overlay node alive."
However, looking at the implementations of phy_device_remove() and
mdio_device_remove(), both functions unconditionally pass false to the internal
__phy_device_remove() and __mdio_device_remove() functions for the dynamic
parameter. Similarly, bus teardown in mdiobus_remove_devices() also passes
false.
Because this dynamic flag is always false across all public API boundaries,
the dynamic cleanup branch inside mdiobus_finish_remove() appears to be
unreachable dead code.
Is this intentional, or were there plans to export a specific dynamic removal
API that callers could use to trigger this logic?
Additionally, since phy_device_remove() and mdio_device_remove() return
void, if the dynamic flag were ever set to true and the internal remove
function returned an error like -EBUSY (for instance, if the PHY is still
attached), wouldn't that error be silently ignored by the void wrapper,
potentially leaving the device in the bus map while the caller assumes it
was successfully freed?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260806-submit-mdio-of-dynamic-v2-v4-0-4beb0c50d5ba@gmail.com?part=3
next prev parent reply other threads:[~2026-08-08 3:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 3:54 [PATCH net-next v4 0/4] net: mdio: support dynamic OF device changes James Hilliard
2026-08-07 3:54 ` [PATCH net-next v4 1/4] net: phy: cache MDIO bus owner before dropping PHY reference James Hilliard
2026-08-07 3:54 ` [PATCH net-next v4 2/4] net: mdio: factor out OF child registration helpers James Hilliard
2026-08-07 3:54 ` [PATCH net-next v4 3/4] net: mdio: make device map changes hotplug-safe James Hilliard
2026-08-08 3:54 ` sashiko-bot [this message]
2026-08-07 3:54 ` [PATCH net-next v4 4/4] net: mdio: support dynamic OF device changes James Hilliard
2026-08-07 13:15 ` [PATCH net-next v4 0/4] " Andrew Lunn
2026-08-07 14:59 ` James Hilliard
2026-08-07 15:09 ` Andrew Lunn
2026-08-07 16:41 ` James Hilliard
2026-08-07 17:14 ` Andrew Lunn
2026-08-07 18:48 ` James Hilliard
2026-08-07 19:16 ` Andrew Lunn
2026-08-07 19:33 ` James Hilliard
2026-08-07 20:25 ` Andrew Lunn
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=20260808035458.46D571F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=james.hilliard1@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox