[PATCH v2 26/27] rust: workqueue: add __rust_helper to helpers

Alice Ryhl posted 27 patches 1 month ago
[PATCH v2 26/27] rust: workqueue: add __rust_helper to helpers
Posted by Alice Ryhl 1 month ago
This is needed to inline these helpers into Rust code.

Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
---
 rust/helpers/workqueue.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/rust/helpers/workqueue.c b/rust/helpers/workqueue.c
index b2b82753509bf5dbd0f4ddebb96a95a51e5976b1..ce1c3a5b215028cc04e2f4a7d9c9c60931792e07 100644
--- a/rust/helpers/workqueue.c
+++ b/rust/helpers/workqueue.c
@@ -2,9 +2,11 @@
 
 #include <linux/workqueue.h>
 
-void rust_helper_init_work_with_key(struct work_struct *work, work_func_t func,
-				    bool onstack, const char *name,
-				    struct lock_class_key *key)
+__rust_helper void rust_helper_init_work_with_key(struct work_struct *work,
+						  work_func_t func,
+						  bool onstack,
+						  const char *name,
+						  struct lock_class_key *key)
 {
 	__init_work(work, onstack);
 	work->data = (atomic_long_t)WORK_DATA_INIT();

-- 
2.52.0.351.gbe84eed79e-goog
Re: [PATCH v2 26/27] rust: workqueue: add __rust_helper to helpers
Posted by Tejun Heo 3 weeks, 5 days ago
On Mon, Jan 05, 2026 at 12:42:39PM +0000, Alice Ryhl wrote:
> This is needed to inline these helpers into Rust code.
> 
> Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
> Reviewed-by: Gary Guo <gary@garyguo.net>
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>

Acked-by: Tejun Heo <tj@kernel.org>

Please route through the rust tree.

Thanks.

-- 
tejun