Re: [PATCH v8 2/6] rust: rbtree: add red-black tree implementation backed by the C version
From: Boqun Feng
Date: Tue Jul 30 2024 - 18:06:45 EST
On Sat, Jul 27, 2024 at 08:30:47PM +0000, Matt Gilbride wrote:
[...]
> diff --git a/rust/helpers.c b/rust/helpers.c
> index 4c8b7b92a4f4..608b38c0b3e8 100644
> --- a/rust/helpers.c
> +++ b/rust/helpers.c
> @@ -157,6 +157,13 @@ void rust_helper_init_work_with_key(struct work_struct *work, work_func_t func,
> }
> EXPORT_SYMBOL_GPL(rust_helper_init_work_with_key);
>
> +void rust_helper_rb_link_node(struct rb_node *node, struct rb_node *parent,
> + struct rb_node **rb_link)
> +{
> + rb_link_node(node, parent, rb_link);
> +}
> +EXPORT_SYMBOL_GPL(rust_helper_rb_link_node);
> +
Just FYI, this will trigger a conflict because of:
53ed0af49642 ("rust: add a rust helper for krealloc()")
Regards,
Boqun
> /*
> * `bindgen` binds the C `size_t` type as the Rust `usize` type, so we can
> * use it in contexts where Rust expects a `usize` like slice (array) indices.
> diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
> index 9a943d99c71a..dc2678803637 100644
[...]