lkml.org 
[lkml]   [2025]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 05/46] rust: bitops: add __rust_helper to helpers
From
This is needed to inline these helpers into Rust code.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Yury Norov <yury.norov@gmail.com>
---
rust/helpers/bitops.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/rust/helpers/bitops.c b/rust/helpers/bitops.c
index 5d0861d29d3f0d705a014ae4601685828405f33b..85be08b50a7c39e0627e4a2bbeaec110bf591ee5 100644
--- a/rust/helpers/bitops.c
+++ b/rust/helpers/bitops.c
@@ -2,22 +2,25 @@

#include <linux/bitops.h>

-void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
+__rust_helper void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
{
__set_bit(nr, addr);
}

-void rust_helper___clear_bit(unsigned long nr, unsigned long *addr)
+__rust_helper void rust_helper___clear_bit(unsigned long nr,
+ unsigned long *addr)
{
__clear_bit(nr, addr);
}

-void rust_helper_set_bit(unsigned long nr, volatile unsigned long *addr)
+__rust_helper void rust_helper_set_bit(unsigned long nr,
+ volatile unsigned long *addr)
{
set_bit(nr, addr);
}

-void rust_helper_clear_bit(unsigned long nr, volatile unsigned long *addr)
+__rust_helper void rust_helper_clear_bit(unsigned long nr,
+ volatile unsigned long *addr)
{
clear_bit(nr, addr);
}
--
2.52.0.158.g65b55ccf14-goog


\
 
 \ /
  Last update: 2025-12-02 20:40    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog