net: switch to scoped device_for_each_child_node()
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am 20240930-net-device_for_each_child_node_scoped-v2-0-35f09333c1d7@gmail.com change-id 20240930-net-device_for_each_child_node_scoped-ebe62f742847Versions newest first
- v2 Latest2 patches 2 repliesApplied 2/2
- v12 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- Rebase onto net-next.
- Fix commit messages (incomplete path, missing net-next prefix).
- Link to v1: https://lore.kernel.org/r/20240930-net-device_for_each_child_node_scoped-v1-0-bbdd7f9fd649@gmail.com
Patches in v2 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | net: mdio: thunder: switch to scoped device_for_each_child_node()drivers/ | +1 | 0 replies | Applied |
| 2/2 | net: hns: hisilicon: hns_dsaf_mac: switch to scoped device_for_each_child_node()drivers/ | +3 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH net-next v2 0/2] net: switch to scoped device_for_each_child_node()
This series switches from the device_for_each_child_node() macro to its scoped variant. This makes the code more robust if new early exits are added to the loops, because there is no need for explicit calls to fwnode_handle_put(), which also simplifies existing code.
The non-scoped macros to walk over nodes turn error-prone as soon as the loop contains early exits (break, goto, return), and patches to fix them show up regularly, sometimes due to new error paths in an existing loop [1].
Note that the child node is now declared in the macro, and therefore the explicit declaration is no longer required.
The general functionality should not be affected by this modification. If functional changes are found, please report them back as errors.
Link:
https://lore.kernel.org/all/[email protected]/
[1]
---
Changes in v2:
- Rebase onto net-next.
- Fix commit messages (incomplete path, missing net-next prefix).
- Link to v1: https://lore.kernel.org/r/20240930-net-device_for_each_child_node_scoped-v1-0-bbdd7f9fd649@gmail.com
---
Javier Carrasco (2):
net: mdio: thunder: switch to scoped device_for_each_child_node()
net: hns: hisilicon: hns_dsaf_mac: switch to scoped device_for_each_child_node()
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 10 +++------- drivers/net/mdio/mdio-thunder.c | 4 +--- 2 files changed, 4 insertions(+), 10 deletions(-)
---
base-commit: c824deb1a89755f70156b5cdaf569fca80698719
change-id: 20240930-net-device_for_each_child_node_scoped-ebe62f742847
Best regards,
Signature · 1 line
Javier Carrasco <[email protected]>