[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241107020831.1561063-13-alistair.francis@wdc.com>
Date: Thu, 7 Nov 2024 12:08:30 +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 12/13] rust: helpers: Remove some task helpers
Now that we support wrap-static-fns we no longer need the custom helpers.
Signed-off-by: Alistair Francis <alistair.francis@....com>
---
rust/bindgen_static_functions | 3 +++
rust/bindings/bindings_helper.h | 1 +
rust/helpers/task.c | 10 ----------
3 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/rust/bindgen_static_functions b/rust/bindgen_static_functions
index 0bbc358d03e61..396e2eac88e5c 100644
--- a/rust/bindgen_static_functions
+++ b/rust/bindgen_static_functions
@@ -23,3 +23,6 @@
--allowlist-function spin_lock
--allowlist-function spin_unlock
+
+--allowlist-function get_task_struct
+--allowlist-function put_task_struct
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h
index 0c2964db04076..1d1d921fd55e9 100644
--- a/rust/bindings/bindings_helper.h
+++ b/rust/bindings/bindings_helper.h
@@ -21,6 +21,7 @@
#include <linux/refcount.h>
#include <linux/sched.h>
#include <linux/sched/signal.h>
+#include <linux/sched/task.h>
#include <linux/slab.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
diff --git a/rust/helpers/task.c b/rust/helpers/task.c
index 7ac789232d11c..a3feb47a6c73f 100644
--- a/rust/helpers/task.c
+++ b/rust/helpers/task.c
@@ -7,13 +7,3 @@ struct task_struct *rust_helper_get_current(void)
{
return current;
}
-
-void rust_helper_get_task_struct(struct task_struct *t)
-{
- get_task_struct(t);
-}
-
-void rust_helper_put_task_struct(struct task_struct *t)
-{
- put_task_struct(t);
-}
--
2.47.0
Powered by blists - more mailing lists