[PATCH v2 0/3] of: Use __free() based cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This small series converts the DT code to use __free() based cleanups 
for kfree() and of_node_put(). Using __free() simplifies function exit 
handling. Initial support for struct device_node was added in commit 
9448e55d032d ("of: Add cleanup.h based auto release via 
__free(device_node) markings").

Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
---
Changes in v2:
- Also use cleanup for 'dev' in __of_translate_address()
- Further simplify of_dma_is_coherent() and of_mmio_is_nonposted()
- Link to v1: https://lore.kernel.org/r/20240404-dt-cleanup-free-v1-0-c60e6cba8da9@xxxxxxxxxx

---
Rob Herring (3):
      of: Add a helper to free property struct
      of: Use scope based kfree() cleanups
      of: Use scope based of_node_put() cleanups

 drivers/of/address.c    | 113 +++++++++++++++++-------------------------------
 drivers/of/base.c       |  34 ++++-----------
 drivers/of/dynamic.c    |  37 +++++++---------
 drivers/of/of_private.h |   1 +
 drivers/of/overlay.c    |  11 ++---
 drivers/of/property.c   |  22 +++-------
 drivers/of/resolver.c   |  35 ++++++---------
 drivers/of/unittest.c   |  12 ++---
 8 files changed, 90 insertions(+), 175 deletions(-)
---
base-commit: 4cece764965020c22cff7665b18a012006359095
change-id: 20240404-dt-cleanup-free-6d5334b4b368

Best regards,
-- 
Rob Herring <robh@xxxxxxxxxx>





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux