Skip to content

Commit ac585bf

Browse files
Darksonnojeda
authored andcommitted
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>
1 parent fffdb58 commit ac585bf

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

rust/helpers/rbtree.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
#include <linux/rbtree.h>
44

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)
78
{
89
rb_link_node(node, parent, rb_link);
910
}
1011

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)
1213
{
1314
return rb_first(root);
1415
}
1516

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)
1718
{
1819
return rb_last(root);
1920
}

0 commit comments

Comments
 (0)