mbox series

[net-next,v3,00/13] net: Simplified with scoped function

Message ID 20240829063118.67453-1-ruanjinjie@huawei.com (mailing list archive)
Headers show
Series net: Simplified with scoped function | expand

Message

Jinjie Ruan Aug. 29, 2024, 6:31 a.m. UTC
Simplify with scoped for each OF child loop and __free(), as well as
dev_err_probe().

Changes in v3:
- Sort the variables, longest first, shortest last.
- Add Reviewed-by.

Changes in v2:
- Subject prefix: next -> net-next.
- Split __free() from scoped for each OF child loop clean.
- Fix use of_node_put() instead of __free() for the 5th patch.

Jinjie Ruan (13):
  net: stmmac: dwmac-sun8i: Use for_each_child_of_node_scoped()
  net: stmmac: dwmac-sun8i: Use __free() to simplify code
  net: dsa: realtek: Use for_each_child_of_node_scoped()
  net: dsa: realtek: Use __free() to simplify code
  net: phy: Fix missing of_node_put() for leds
  net: phy: Use for_each_available_child_of_node_scoped()
  net: mdio: mux-mmioreg: Simplified with scoped function
  net: mdio: mux-mmioreg: Simplified with dev_err_probe()
  net: mv643xx_eth: Simplify with scoped for each OF child loop
  net: dsa: microchip: Use scoped function to simplfy code
  net: dsa: microchip: Use __free() to simplfy code
  net: bcmasp: Simplify with scoped for each OF child loop
  net: bcmasp: Simplify with __free()

 drivers/net/dsa/microchip/ksz_common.c        | 12 ++---
 drivers/net/dsa/realtek/rtl8366rb.c           | 21 +++-----
 drivers/net/ethernet/broadcom/asp2/bcmasp.c   | 18 +++----
 drivers/net/ethernet/marvell/mv643xx_eth.c    |  5 +-
 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 20 +++-----
 drivers/net/mdio/mdio-mux-mmioreg.c           | 51 ++++++++-----------
 drivers/net/phy/phy_device.c                  |  7 +--
 7 files changed, 51 insertions(+), 83 deletions(-)

Comments

Andrew Lunn Aug. 29, 2024, 12:43 p.m. UTC | #1
On Thu, Aug 29, 2024 at 02:31:05PM +0800, Jinjie Ruan wrote:
> Simplify with scoped for each OF child loop and __free(), as well as
> dev_err_probe().

I said the for_each_child_of_node_scoped() parts are fine. The
__free() parts are ugly, and i would like to reject them. So please
post just the for_each_child_of_node_scoped() parts for merging, while
we discuss what to do about __free().

    Andrew

---
pw-bot: cr
Jinjie Ruan Aug. 30, 2024, 2:03 a.m. UTC | #2
On 2024/8/29 20:43, Andrew Lunn wrote:
> On Thu, Aug 29, 2024 at 02:31:05PM +0800, Jinjie Ruan wrote:
>> Simplify with scoped for each OF child loop and __free(), as well as
>> dev_err_probe().
> 
> I said the for_each_child_of_node_scoped() parts are fine. The
> __free() parts are ugly, and i would like to reject them. So please
> post just the for_each_child_of_node_scoped() parts for merging, while
> we discuss what to do about __free().

Sure.

> 
>     Andrew
> 
> ---
> pw-bot: cr