[PATCH v2 2/3] rust: bitops: add __rust_helper to helpers

Alice Ryhl posted 3 patches 1 month, 3 weeks ago
[PATCH v2 2/3] rust: bitops: add __rust_helper to helpers
Posted by Alice Ryhl 1 month, 3 weeks 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>
---
 rust/helpers/bitops.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rust/helpers/bitops.c b/rust/helpers/bitops.c
index 5d0861d29d3f..f875692ead30 100644
--- a/rust/helpers/bitops.c
+++ b/rust/helpers/bitops.c
@@ -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);
-- 
2.52.0.305.g3fc767764a-goog