mbox series

[v3,0/6] Simplify code with _scoped() helper functions

Message ID 20240831040413.126417-1-zhangzekun11@huawei.com (mailing list archive)
Headers show
Series Simplify code with _scoped() helper functions | expand

Message

zhangzekun (A) Aug. 31, 2024, 4:04 a.m. UTC
Use _scoped() functions to iterate through the child node, and we don't
need to call of_node_put() manually. This can simplify the code a bit.

v2:
- Use dev_err_probe() to simplify code.
- Fix spelling error in commit message.

v3:
- Fix a spelling error.
- wrap the line when it is too long.

Zhang Zekun (6):
  PCI: kirin: Use helper function
    for_each_available_child_of_node_scoped()
  PCI: kirin: Tidy up _probe() related function with dev_err_probe()
  PCI: mediatek: Use helper function
    for_each_available_child_of_node_scoped()
  PCI: mt7621: Use helper function
    for_each_available_child_of_node_scoped()
  PCI: apple: Use helper function for_each_child_of_node_scoped()
  PCI: tegra: Use helper function for_each_child_of_node_scoped()

 drivers/pci/controller/dwc/pcie-kirin.c | 50 ++++++----------
 drivers/pci/controller/pci-tegra.c      | 80 +++++++++----------------
 drivers/pci/controller/pcie-apple.c     |  4 +-
 drivers/pci/controller/pcie-mediatek.c  | 15 ++---
 drivers/pci/controller/pcie-mt7621.c    | 15 ++---
 5 files changed, 58 insertions(+), 106 deletions(-)