]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: bitops: add __rust_helper to helpers
authorAlice Ryhl <aliceryhl@google.com>
Wed, 17 Dec 2025 13:51:30 +0000 (13:51 +0000)
committerYury Norov (NVIDIA) <yury.norov@gmail.com>
Tue, 6 Jan 2026 17:14:10 +0000 (12:14 -0500)
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>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
rust/helpers/bitops.c

index 5d0861d29d3f0d705a014ae4601685828405f33b..f875692ead30ab4f60b3e123014f82cd492556b1 100644 (file)
@@ -2,21 +2,25 @@
 
 #include <linux/bitops.h>
 
+__rust_helper
 void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
 {
        __set_bit(nr, addr);
 }
 
+__rust_helper
 void rust_helper___clear_bit(unsigned long nr, unsigned long *addr)
 {
        __clear_bit(nr, addr);
 }
 
+__rust_helper
 void rust_helper_set_bit(unsigned long nr, volatile unsigned long *addr)
 {
        set_bit(nr, addr);
 }
 
+__rust_helper
 void rust_helper_clear_bit(unsigned long nr, volatile unsigned long *addr)
 {
        clear_bit(nr, addr);