From: Ritvik Gupta <ritvikfoss@gmail.com>
To: tglx@kernel.org, peterz@infradead.org, ojeda@kernel.org,
boqun@kernel.org, gary@garyguo.net, bjorn3_gh@protonmail.com,
lossin@kernel.org, a.hindborg@kernel.org, aliceryhl@google.com,
tmgross@umich.edu, dakr@kernel.org
Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
skhan@linuxfoundation.org
Subject: [PATCH v2 1/2] rust: prelude: re-export `unsafe_precondition_assert!`
Date: Tue, 19 May 2026 04:31:24 +0530 [thread overview]
Message-ID: <20260518230125.476165-2-ritvikfoss@gmail.com> (raw)
In-Reply-To: <20260518230125.476165-1-ritvikfoss@gmail.com>
Re-export `unsafe_precondition_assert!` so the users can
import the macro directly via `kernel::prelude::*`
instead of `kernel::safety::unsafe_precondition_assert`.
Suggested-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://lore.kernel.org/rust-for-linux/CANiq72=5PUubJDYD57yhEC117tzNo9h6d=7f8OiengaExmGnyQ@mail.gmail.com/
Signed-off-by: Ritvik Gupta <ritvikfoss@gmail.com>
---
rust/kernel/prelude.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/rust/kernel/prelude.rs b/rust/kernel/prelude.rs
index 44edf72a4a24..dabacb5be332 100644
--- a/rust/kernel/prelude.rs
+++ b/rust/kernel/prelude.rs
@@ -101,6 +101,7 @@
try_init,
try_pin_init,
uaccess::UserPtr,
+ unsafe_precondition_assert,
ThisModule, //
};
--
2.54.0
next prev parent reply other threads:[~2026-05-18 22:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 23:01 [PATCH v2 0/2] rust: re-export `unsafe_precondition_assert!` and use in cpu module Ritvik Gupta
2026-05-18 23:01 ` Ritvik Gupta [this message]
2026-05-18 23:01 ` [PATCH v2 2/2] rust: cpu: use `unsafe_precondition_assert!` Ritvik Gupta
2026-05-19 5:41 ` Miguel Ojeda
2026-05-21 17:02 ` Ritvik Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260518230125.476165-2-ritvikfoss@gmail.com \
--to=ritvikfoss@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=peterz@infradead.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tglx@kernel.org \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.