]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: binder: add __rust_helper to helpers
authorAlice Ryhl <aliceryhl@google.com>
Tue, 2 Dec 2025 19:37:27 +0000 (19:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Dec 2025 11:10:47 +0000 (12:10 +0100)
This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20251202-define-rust-helper-v1-3-a2e13cbc17a6@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rust/helpers/binder.c

index 224d38a92f1d985d78767d5a72f5ff60765b8508..a2327f1b3c9443df0ecd33275f98d4719f0ab8f1 100644 (file)
@@ -7,20 +7,21 @@
 #include <linux/list_lru.h>
 #include <linux/task_work.h>
 
-unsigned long rust_helper_list_lru_count(struct list_lru *lru)
+__rust_helper unsigned long rust_helper_list_lru_count(struct list_lru *lru)
 {
        return list_lru_count(lru);
 }
 
-unsigned long rust_helper_list_lru_walk(struct list_lru *lru,
-                                       list_lru_walk_cb isolate, void *cb_arg,
-                                       unsigned long nr_to_walk)
+__rust_helper unsigned long rust_helper_list_lru_walk(struct list_lru *lru,
+                                                     list_lru_walk_cb isolate,
+                                                     void *cb_arg,
+                                                     unsigned long nr_to_walk)
 {
        return list_lru_walk(lru, isolate, cb_arg, nr_to_walk);
 }
 
-void rust_helper_init_task_work(struct callback_head *twork,
-                               task_work_func_t func)
+__rust_helper void rust_helper_init_task_work(struct callback_head *twork,
+                                             task_work_func_t func)
 {
        init_task_work(twork, func);
 }