[PATCH 12/13] rust: helpers: Remove some task helpers

Alistair Francis posted 13 patches 2 weeks, 3 days ago
There is a newer version of this series
[PATCH 12/13] rust: helpers: Remove some task helpers
Posted by Alistair Francis 2 weeks, 3 days ago
Now that we support wrap-static-fns we no longer need the custom helpers.

Signed-off-by: Alistair Francis <alistair.francis@wdc.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