mbox series

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

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

Message

Zhang Zekun Aug. 30, 2024, 3:58 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.

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 | 46 +++++----------
 drivers/pci/controller/pci-tegra.c      | 74 ++++++++-----------------
 drivers/pci/controller/pcie-apple.c     |  4 +-
 drivers/pci/controller/pcie-mediatek.c  | 15 ++---
 drivers/pci/controller/pcie-mt7621.c    | 15 ++---
 5 files changed, 49 insertions(+), 105 deletions(-)