[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241114005631.818440-11-alistair@alistair23.me>
Date: Thu, 14 Nov 2024 10:56:30 +1000
From: Alistair Francis <alistair@...stair23.me>
To: linux-kernel@...r.kernel.org,
benno.lossin@...ton.me,
boqun.feng@...il.com,
me@...enk.dev,
alex.gaynor@...il.com,
a.hindborg@...nel.org,
gary@...yguo.net,
aliceryhl@...gle.com,
alistair.francis@....com,
bjorn3_gh@...tonmail.com,
tmgross@...ch.edu,
rust-for-linux@...r.kernel.org,
ojeda@...nel.org
Cc: alistair23@...il.com,
Alistair Francis <alistair@...stair23.me>,
Dirk Behme <dirk.behme@...bosch.com>
Subject: [PATCH v4 10/11] 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@...stair23.me>
Tested-by: Dirk Behme <dirk.behme@...bosch.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 9d6c44e277b5..8bc291a7a799 100644
--- a/rust/bindgen_static_functions
+++ b/rust/bindgen_static_functions
@@ -24,3 +24,6 @@
--allowlist-function spin_lock
--allowlist-function spin_unlock
--allowlist-function spin_trylock
+
+--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 e21a5f260e3c..63b78a833303 100644
--- a/rust/bindings/bindings_helper.h
+++ b/rust/bindings/bindings_helper.h
@@ -22,6 +22,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 190fdb2c8e2f..788865464134 100644
--- a/rust/helpers/task.c
+++ b/rust/helpers/task.c
@@ -6,13 +6,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