[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241107020831.1561063-9-alistair.francis@wdc.com>
Date: Thu, 7 Nov 2024 12:08:26 +1000
From: Alistair Francis <alistair23@...il.com>
To: alex.gaynor@...il.com,
benno.lossin@...ton.me,
gary@...yguo.net,
linux-kernel@...r.kernel.org,
ojeda@...nel.org,
rust-for-linux@...r.kernel.org,
bjorn3_gh@...tonmail.com,
alistair.francis@....com,
me@...enk.dev,
a.hindborg@...nel.org,
tmgross@...ch.edu,
boqun.feng@...il.com,
aliceryhl@...gle.com
Cc: alistair23@...il.com
Subject: [PATCH 08/13] rust: helpers: Remove rbtree helper
Now that we support wrap-static-fns we no longer need the custom helper.
Signed-off-by: Alistair Francis <alistair.francis@....com>
---
rust/bindgen_static_functions | 2 ++
rust/bindings/bindings_helper.h | 1 +
rust/helpers/helpers.c | 1 -
rust/helpers/rbtree.c | 9 ---------
4 files changed, 3 insertions(+), 10 deletions(-)
delete mode 100644 rust/helpers/rbtree.c
diff --git a/rust/bindgen_static_functions b/rust/bindgen_static_functions
index ded5b816f3041..e464dc1f56820 100644
--- a/rust/bindgen_static_functions
+++ b/rust/bindgen_static_functions
@@ -13,3 +13,5 @@
--allowlist-function kunit_get_current_test
--allowlist-function kmap_local_page
+
+--allowlist-function rb_link_node
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h
index 084468123416e..d389944186479 100644
--- a/rust/bindings/bindings_helper.h
+++ b/rust/bindings/bindings_helper.h
@@ -17,6 +17,7 @@
#include <linux/jiffies.h>
#include <linux/mdio.h>
#include <linux/phy.h>
+#include <linux/rbtree.h>
#include <linux/refcount.h>
#include <linux/sched.h>
#include <linux/slab.h>
diff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c
index 61ace53675c04..7f9ffde471da3 100644
--- a/rust/helpers/helpers.c
+++ b/rust/helpers/helpers.c
@@ -10,7 +10,6 @@
#include "bug.c"
#include "build_assert.c"
#include "page.c"
-#include "rbtree.c"
#include "refcount.c"
#include "signal.c"
#include "slab.c"
diff --git a/rust/helpers/rbtree.c b/rust/helpers/rbtree.c
deleted file mode 100644
index 6d404b84a9b53..0000000000000
--- a/rust/helpers/rbtree.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-
-#include <linux/rbtree.h>
-
-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);
-}
--
2.47.0
Powered by blists - more mailing lists