[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241114005631.818440-5-alistair@alistair23.me>
Date: Thu, 14 Nov 2024 10:56:24 +1000
From: Alistair Francis <alistair@...stair23.me>
To: linux-kernel@...r.kernel.org,
benno.lossin@...ton.me,
boqun.feng@...il.com,
me@...enk.dev,
alex.gaynor@...il.com,
a.hindborg@...nel.org,
gary@...yguo.net,
aliceryhl@...gle.com,
alistair.francis@....com,
bjorn3_gh@...tonmail.com,
tmgross@...ch.edu,
rust-for-linux@...r.kernel.org,
ojeda@...nel.org
Cc: alistair23@...il.com,
Alistair Francis <alistair@...stair23.me>,
Dirk Behme <dirk.behme@...bosch.com>
Subject: [PATCH v4 04/11] rust: helpers: Remove kunit 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 | 2 ++
rust/bindings/bindings_helper.h | 1 +
rust/helpers/helpers.c | 1 -
rust/helpers/kunit.c | 8 --------
4 files changed, 3 insertions(+), 9 deletions(-)
delete mode 100644 rust/helpers/kunit.c
diff --git a/rust/bindgen_static_functions b/rust/bindgen_static_functions
index 0269efa83c61..b4032d277e72 100644
--- a/rust/bindgen_static_functions
+++ b/rust/bindgen_static_functions
@@ -9,3 +9,5 @@
--allowlist-function ERR_PTR
--allowlist-function IS_ERR
--allowlist-function PTR_ERR
+
+--allowlist-function kunit_get_current_test
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h
index a80783fcbe04..00b1c1c3ab76 100644
--- a/rust/bindings/bindings_helper.h
+++ b/rust/bindings/bindings_helper.h
@@ -14,6 +14,7 @@
#include <linux/ethtool.h>
#include <linux/firmware.h>
#include <linux/jiffies.h>
+#include <kunit/test-bug.h>
#include <linux/mdio.h>
#include <linux/phy.h>
#include <linux/refcount.h>
diff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c
index e089ecdf091f..60b3fdc5c2de 100644
--- a/rust/helpers/helpers.c
+++ b/rust/helpers/helpers.c
@@ -10,7 +10,6 @@
#include "bug.c"
#include "build_assert.c"
#include "build_bug.c"
-#include "kunit.c"
#include "mutex.c"
#include "page.c"
#include "rbtree.c"
diff --git a/rust/helpers/kunit.c b/rust/helpers/kunit.c
deleted file mode 100644
index b85a4d394c11..000000000000
--- a/rust/helpers/kunit.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-
-#include <kunit/test-bug.h>
-
-struct kunit *rust_helper_kunit_get_current_test(void)
-{
- return kunit_get_current_test();
-}
--
2.47.0
Powered by blists - more mailing lists