diff options
| author | Takashi Iwai <tiwai@suse.de> | 2024-10-02 21:29:16 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2024-10-02 21:29:16 +0200 |
| commit | 0c436dfe5c25d0931b164b944165259f95e5281f (patch) | |
| tree | 7b1d3d8d7bc600f218af0ca6ed9a4f7527f88e5f /scripts/gdb/linux/rbtree.py | |
| parent | 3f7f36a4559ef78a6418c5f0447fbfbdcf671956 (diff) | |
| parent | eb1df4bbf53c29babf68fcb36e80d9c62a345257 (diff) | |
Merge tag 'asoc-fix-v6.12-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.12
A bunch of fixes here that came in during the merge window and the first
week of release, plus some new quirks and device IDs. There's nothing
major here, it's a bit bigger than it might've been due to there being
no fixes sent during the merge window due to your vacation.
Diffstat (limited to 'scripts/gdb/linux/rbtree.py')
| -rw-r--r-- | scripts/gdb/linux/rbtree.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/gdb/linux/rbtree.py b/scripts/gdb/linux/rbtree.py index fe462855eefd..fcbcc5f4153c 100644 --- a/scripts/gdb/linux/rbtree.py +++ b/scripts/gdb/linux/rbtree.py @@ -9,6 +9,18 @@ from linux import utils rb_root_type = utils.CachedType("struct rb_root") rb_node_type = utils.CachedType("struct rb_node") +def rb_inorder_for_each(root): + def inorder(node): + if node: + yield from inorder(node['rb_left']) + yield node + yield from inorder(node['rb_right']) + + yield from inorder(root['rb_node']) + +def rb_inorder_for_each_entry(root, gdbtype, member): + for node in rb_inorder_for_each(root): + yield utils.container_of(node, gdbtype, member) def rb_first(root): if root.type == rb_root_type.get_type(): |
