Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: rbtree: add __rust_helper to helpers

This is needed to inline these helpers into Rust code.

Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260105-define-rust-helper-v2-15-51da5f454a67@google.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

authored by

Alice Ryhl and committed by
Miguel Ojeda
ac585bf9 fffdb587

+5 -4
+5 -4
rust/helpers/rbtree.c
··· 2 2 3 3 #include <linux/rbtree.h> 4 4 5 - void rust_helper_rb_link_node(struct rb_node *node, struct rb_node *parent, 6 - struct rb_node **rb_link) 5 + __rust_helper void rust_helper_rb_link_node(struct rb_node *node, 6 + struct rb_node *parent, 7 + struct rb_node **rb_link) 7 8 { 8 9 rb_link_node(node, parent, rb_link); 9 10 } 10 11 11 - struct rb_node *rust_helper_rb_first(const struct rb_root *root) 12 + __rust_helper struct rb_node *rust_helper_rb_first(const struct rb_root *root) 12 13 { 13 14 return rb_first(root); 14 15 } 15 16 16 - struct rb_node *rust_helper_rb_last(const struct rb_root *root) 17 + __rust_helper struct rb_node *rust_helper_rb_last(const struct rb_root *root) 17 18 { 18 19 return rb_last(root); 19 20 }