[PATCH 0/7] Miscellaneous devres improvements

Danilo Krummrich posted 7 patches 6 days, 4 hours ago
drivers/base/devres.c | 248 ++++++++++++++++++++++++++++--------------
1 file changed, 165 insertions(+), 83 deletions(-)
[PATCH 0/7] Miscellaneous devres improvements
Posted by Danilo Krummrich 6 days, 4 hours ago
This patch series provides some miscellaneous devres improvements.

The most notable change is a more clear separation between the base struct
devres_node and its "subclasses" (such as struct devres and struct devres_group)
as well as the mixup between struct devres and struct devres_group.

This serves three purposes.

  (1) Better maintainability due to clear type separation.

  (2) No waste of memory due to unnecessary minimal alignment for devres
      actions, by introducing its own struct devres_action "subclass".

  (3) Bootstrapping for Rust devres code to embed a struct devres_node itself
      to avoid both the unnecessary minimum alignment of struct devres and the
      indirection through devres action avoiding unnecessary additional memory
      allocations. [1]

However, (3) is just for completeness, the series also stands on its own.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/dakr/linux.git/commit/?h=devres/devres_node&id=6da8ca499fa65992d71c5cb7a51df7260666e695

Danilo Krummrich (7):
  devres: fix missing node debug info in devm_krealloc()
  devres: add devres_node_add()
  devres: add devres_node_init()
  devres: don't require ARCH_DMA_MINALIGN for devres actions
  devres: add free_node callback to struct devres_node
  devres: use guard(spinlock_irqsave) where applicable
  devres: remove unnecessary unlocks in devres_release_group()

 drivers/base/devres.c | 248 ++++++++++++++++++++++++++++--------------
 1 file changed, 165 insertions(+), 83 deletions(-)


base-commit: 289b14592cefe95f7d0ef334873c12b96ce3824f
-- 
2.52.0