From: Jimmy Ostler <jtostler1@gmail.com>
To: "Danilo Krummrich" <dakr@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Wedson Almeida Filho" <walmeida@microsoft.com>,
"Filipe Xavier" <felipe_life@live.com>,
"Valentin Obst" <kernel@valentinobst.de>,
"Daniel Sedlak" <daniel@sedlak.dev>,
"Alex Mantel" <alexmantel93@mailbox.org>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
Jimmy Ostler <jtostler1@gmail.com>
Subject: [PATCH v4 0/3] rust: add kunit doctest with doc fixes
Date: Thu, 19 Dec 2024 22:25:30 -0800 [thread overview]
Message-ID: <cover.1734674670.git.jtostler1@gmail.com> (raw)
This patch series adds a doctest for the `ArrayLayout` type, as well as
implements `From<LayoutError> for Error` for the internal `LayoutError`.
This change in the first patch is required for the added rustdoc kunit
test in the third patch to compile.
This series also adds a change to the `stack_try_pin_init` example
documentation, so it correctly imports the `AllocError` kernel type.
Link: https://lore.kernel.org/lkml/20241203051843.291729-1-jtostler1@gmail.com/ [v1]
Link: https://lore.kernel.org/lkml/20241205105627.992587-1-jtostler1@gmail.com/ [v2]
Link: https://lore.kernel.org/lkml/cover.1734477232.git.jtostler1@gmail.com/ [v3]
Signed-off-by: Jimmy Ostler <jtostler1@gmail.com>
---
v3 -> v4: Reword patch one message for clarity
v2 -> v3:
- Remove `From` implementation on `core::alloc::LayoutError`
- Move changes to "rust/kernel/alloc/layout.rs" to separate patch
- Move changes to "rust/kernel/error.rs" to separate patch
- Change documentation in "rust/kernel/init.rs"
- Link [v2]: https://lore.kernel.org/lkml/20241205105627.992587-1-jtostler1@gmail.com/
v1 -> v2 changes:
- Add third assert where length is smaller but still overflows
- Remove rustdoc markdown codeblock languge signifier
- Change tests to return results using `?` instead of panic
- Remove `#[derive(Debug)]` for `LayoutError`
- Add `From<LayoutError> for Error` implementation
- Link [v1]: https://lore.kernel.org/lkml/20241203051843.291729-1-jtostler1@gmail.com/
Jimmy Ostler (3):
rust: error: Change `LayoutError` to internal
rust: error: Update 'stack_try_pin_init' example
rust: alloc: Add doctest for `ArrayLayout`
rust/kernel/alloc/layout.rs | 19 +++++++++++++++++++
rust/kernel/error.rs | 7 ++++---
rust/kernel/init.rs | 22 ++++++++++++++++++----
3 files changed, 41 insertions(+), 7 deletions(-)
base-commit: 0c5928deada15a8d075516e6e0d9ee19011bb000
--
2.47.1
next reply other threads:[~2024-12-20 6:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 6:25 Jimmy Ostler [this message]
2024-12-20 6:25 ` [PATCH v4 1/3] rust: error: Change `LayoutError` to internal Jimmy Ostler
2024-12-20 6:25 ` [PATCH v4 2/3] rust: error: Update 'stack_try_pin_init' example Jimmy Ostler
2024-12-20 6:25 ` [PATCH v4 3/3] rust: alloc: Add doctest for `ArrayLayout` Jimmy Ostler
2025-01-13 14:43 ` [PATCH v4 0/3] rust: add kunit doctest with doc fixes Miguel Ojeda
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=cover.1734674670.git.jtostler1@gmail.com \
--to=jtostler1@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=alexmantel93@mailbox.org \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=daniel@sedlak.dev \
--cc=felipe_life@live.com \
--cc=gary@garyguo.net \
--cc=kernel@valentinobst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=walmeida@microsoft.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).