[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250107035058.818539-4-alistair@alistair23.me>
Date: Tue, 7 Jan 2025 13:50:50 +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 03/11] rust: helpers: Remove err helper
Now that we support wrap-static-fns we no longer need the custom helper.
Signed-off-by: Alistair Francis <alistair@...stair23.me>
Tested-by: Dirk Behme <dirk.behme@...bosch.com>
---
rust/bindgen_static_functions | 4 ++++
rust/helpers/err.c | 18 ------------------
rust/helpers/helpers.c | 1 -
3 files changed, 4 insertions(+), 19 deletions(-)
delete mode 100644 rust/helpers/err.c
diff --git a/rust/bindgen_static_functions b/rust/bindgen_static_functions
index 42e45ce34221..0269efa83c61 100644
--- a/rust/bindgen_static_functions
+++ b/rust/bindgen_static_functions
@@ -5,3 +5,7 @@
--allowlist-function blk_mq_rq_to_pdu
--allowlist-function blk_mq_rq_from_pdu
+
+--allowlist-function ERR_PTR
+--allowlist-function IS_ERR
+--allowlist-function PTR_ERR
diff --git a/rust/helpers/err.c b/rust/helpers/err.c
deleted file mode 100644
index 544c7cb86632..000000000000
--- a/rust/helpers/err.c
+++ /dev/null
@@ -1,18 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-
-#include <linux/err.h>
-
-__force void *rust_helper_ERR_PTR(long err)
-{
- return ERR_PTR(err);
-}
-
-bool rust_helper_IS_ERR(__force const void *ptr)
-{
- return IS_ERR(ptr);
-}
-
-long rust_helper_PTR_ERR(__force const void *ptr)
-{
- return PTR_ERR(ptr);
-}
diff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c
index 1d31672c147c..675f8eae0475 100644
--- a/rust/helpers/helpers.c
+++ b/rust/helpers/helpers.c
@@ -11,7 +11,6 @@
#include "build_assert.c"
#include "build_bug.c"
#include "cred.c"
-#include "err.c"
#include "fs.c"
#include "jump_label.c"
#include "kunit.c"
--
2.47.1
Powered by blists - more mailing lists