[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250107035058.818539-10-alistair@alistair23.me>
Date: Tue, 7 Jan 2025 13:50:56 +1000
From: Alistair Francis <alistair@...stair23.me>
To: bhelgaas@...gle.com,
rust-for-linux@...r.kernel.org,
lukas@...ner.de,
gary@...yguo.net,
akpm@...ux-foundation.org,
tmgross@...ch.edu,
boqun.feng@...il.com,
ojeda@...nel.org,
linux-cxl@...r.kernel.org,
bjorn3_gh@...tonmail.com,
a.hindborg@...nel.org,
me@...enk.dev,
linux-kernel@...r.kernel.org,
aliceryhl@...gle.com,
alistair.francis@....com,
linux-pci@...r.kernel.org,
benno.lossin@...ton.me,
alex.gaynor@...il.com,
Jonathan.Cameron@...wei.com
Cc: alistair23@...il.com,
wilfred.mallawa@....com,
Alistair Francis <alistair@...stair23.me>,
Dirk Behme <dirk.behme@...bosch.com>
Subject: [PATCH v5 09/11] rust: helpers: Remove some spinlock helpers
Now that we support wrap-static-fns we no longer need the custom helpers.
Signed-off-by: Alistair Francis <alistair@...stair23.me>
Tested-by: Dirk Behme <dirk.behme@...bosch.com>
---
rust/bindgen_static_functions | 4 ++++
rust/helpers/spinlock.c | 15 ---------------
2 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/rust/bindgen_static_functions b/rust/bindgen_static_functions
index 407dd091ddec..9d6c44e277b5 100644
--- a/rust/bindgen_static_functions
+++ b/rust/bindgen_static_functions
@@ -20,3 +20,7 @@
--allowlist-function refcount_dec_and_test
--allowlist-function signal_pending
+
+--allowlist-function spin_lock
+--allowlist-function spin_unlock
+--allowlist-function spin_trylock
diff --git a/rust/helpers/spinlock.c b/rust/helpers/spinlock.c
index 5971fdf6f755..72ca0208ed10 100644
--- a/rust/helpers/spinlock.c
+++ b/rust/helpers/spinlock.c
@@ -15,18 +15,3 @@ void rust_helper___spin_lock_init(spinlock_t *lock, const char *name,
spin_lock_init(lock);
#endif /* CONFIG_DEBUG_SPINLOCK */
}
-
-void rust_helper_spin_lock(spinlock_t *lock)
-{
- spin_lock(lock);
-}
-
-void rust_helper_spin_unlock(spinlock_t *lock)
-{
- spin_unlock(lock);
-}
-
-int rust_helper_spin_trylock(spinlock_t *lock)
-{
- return spin_trylock(lock);
-}
--
2.47.1
Powered by blists - more mailing lists