Skip to content

Miscellaneous devres improvements

Danilo Krummrich driver-core lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7devres: fix missing node debug info in devm_krealloc()drivers/base/devres.c+2 -00 replies
2/7devres: add devres_node_add()drivers/base/devres.c+9 -80 replies
3/7devres: add devres_node_init()drivers/base/devres.c+9 -60 replies
4/7devres: don't require ARCH_DMA_MINALIGN for devres actionsdrivers/base/devres.c+102 -450 replies
5/7devres: add free_node callback to struct devres_nodedrivers/base/devres.c+45 -120 replies
6/7devres: use guard(spinlock_irqsave) where applicabledrivers/base/devres.c+6 -170 replies
7/7devres: remove unnecessary unlocks in devres_release_group()drivers/base/devres.c+3 -60 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGreg Kroah-Hartman
SeriesR-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] Miscellaneous devres improvements

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

Signature · 1 line
2.52.0