All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] of: add of_property_alloc/free() and of_node_alloc()
@ 2022-06-01  8:17 ` Clément Léger
  0 siblings, 0 replies; 22+ messages in thread
From: Clément Léger @ 2022-06-01  8:17 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
	Rob Herring, Frank Rowand, Nathan Lynch, Laurent Dufour,
	Daniel Henrique Barboza, David Gibson, Andrew Morton,
	David Hildenbrand, Ohhoon Kwon, Aneesh Kumar K.V, YueHaibing
  Cc: Clément Léger, linuxppc-dev, linux-kernel, devicetree,
	Allan Nielsen, Horatiu Vultur, Steen Hegelund, Thomas Petazzoni,
	Bjorn Helgaas, Lizhi Hou

In order to be able to create new nodes and properties dynamically from
drivers, add of_property_alloc/free() and of_node_alloc(). These
functions can be used to create new nodes and properties flagged with
OF_DYNAMIC and to free them.

Some powerpc code was already doing such operations and thus, these
functions have been used to replace the manual creation of nodes and
properties.

---

Changes in V2:
- Remove of_node_free()
- Rework property allocation to allocate both property and value with
  1 allocation
- Rework node allocation to allocate name at the same time the node is
  allocated
- Remove extern from definitions
- Remove of_property_alloc() value_len parameter and add more
  explanation for the arguments
- Add a check in of_property_free to check OF_DYNAMIC flag
- Add a commit which constify the property argument of
  of_property_check_flags()

Clément Léger (4):
  of: constify of_property_check_flags() prop argument
  of: dynamic: add of_property_alloc() and of_property_free()
  of: dynamic: add of_node_alloc()
  powerpc/pseries: use of_property_alloc/free() and of_node_alloc()

 arch/powerpc/platforms/pseries/dlpar.c        |  51 +------
 .../platforms/pseries/hotplug-memory.c        |  21 +--
 arch/powerpc/platforms/pseries/reconfig.c     |  45 ++----
 drivers/of/dynamic.c                          | 134 ++++++++++++------
 drivers/of/of_private.h                       |  21 ++-
 include/linux/of.h                            |  25 +++-
 6 files changed, 153 insertions(+), 144 deletions(-)

-- 
2.36.0


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-06-06  8:50 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01  8:17 [PATCH v2 0/4] of: add of_property_alloc/free() and of_node_alloc() Clément Léger
2022-06-01  8:17 ` Clément Léger
2022-06-01  8:17 ` [PATCH v2 1/4] of: constify of_property_check_flags() prop argument Clément Léger
2022-06-01  8:17   ` Clément Léger
2022-06-03 20:24   ` Rob Herring
2022-06-03 20:24     ` Rob Herring
2022-06-01  8:17 ` [PATCH v2 2/4] of: dynamic: add of_property_alloc() and of_property_free() Clément Léger
2022-06-01  8:17   ` Clément Léger
2022-06-01 22:32   ` Tyrel Datwyler
2022-06-01 22:32     ` Tyrel Datwyler
2022-06-02  6:58     ` Clément Léger
2022-06-02  6:58       ` Clément Léger
2022-06-02 18:10       ` Tyrel Datwyler
2022-06-02 18:10         ` Tyrel Datwyler
2022-06-01  8:18 ` [PATCH v2 3/4] of: dynamic: add of_node_alloc() Clément Léger
2022-06-01  8:18   ` Clément Léger
2022-06-01  8:18 ` [PATCH v2 4/4] powerpc/pseries: use of_property_alloc/free() and of_node_alloc() Clément Léger
2022-06-01  8:18   ` Clément Léger
2022-06-03 20:14   ` Rob Herring
2022-06-03 20:14     ` Rob Herring
2022-06-06  8:45     ` Clément Léger
2022-06-06  8:45       ` Clément Léger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.