[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMfjjQ2a2HdFWcUWV10qP0qVmPS5vGiAJTa_7qGjoCTW5+Lm-Q@mail.gmail.com>
Date: Tue, 16 Sep 2025 23:07:09 +0800
From: Tong <djfkvcing117@...il.com>
To: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: onur-ozkan <work@...rozkan.dev>, lossin@...nel.org, gary@...yguo.net,
alex.gaynor@...il.com, david.m.ertman@...el.com, bjorn3_gh@...tonmail.com,
Greg KH <gregkh@...uxfoundation.org>, ira.weiny@...el.com, leon@...nel.org,
dakr@...nel.org, tmgross@...ch.edu, ojeda@...nel.org, boqun.feng@...il.com,
a.hindborg@...nel.org, aliceryhl@...gle.com
Subject: [PATCH] rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs
rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs
This patch changes the documentation for `BadFdError` in the `fs`
module so that the error variant `EBADF` is referenced via an
intra-doc link (i.e., [`EBADF`]) rather than plain text. This improves
the generated documentation (so the `EBADF` constant is linked), and
helps tools like rust-analyzer to resolve the reference from the docs.
Testing:
- regenerated documentation, confirmed the link to `EBADF` shows up correctly,
- ran doctests to ensure no broken links in docs,
- built affected code with rustfmt / clippy to verify formatting and
lint cleanliness.
Suggested-by: Onur Özkan <work@...rozkan.dev>
Link: https://github.com/Rust-for-Linux/linux/issues/1186
Signed-off-by: djfkvcing117@...il.com
---
>From 87d6b4e61da0db96a018b86baa011b9c6635e665 Mon Sep 17 00:00:00 2001
From: Webb321 <140618222+Webb321@...rs.noreply.github.com>
Date: Tue, 16 Sep 2025 22:58:26 +0800
Subject: [PATCH] rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In `rust/kernel/fs/file.rs`, replace plain text `EBADF` references in
the doc comment of `BadFdError` with intra-doc links [`EBADF`].
This improves the generated documentation (so the `EBADF` constant is
linked), and helps tools like rust-analyzer to resolve the reference
from the docs.
Testing:
- regenerated documentation, confirmed the link to `EBADF` shows up correctly,
- ran doctests to ensure no broken links in docs,
- built affected code with rustfmt / clippy to verify formatting and
lint cleanliness.
Suggested-by: Onur Özkan <work@...rozkan.dev>
Link: https://github.com/Rust-for-Linux/linux/issues/1186
Signed-off-by: djfkvcing117@...il.com
---
rust/kernel/fs/file.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/kernel/fs/file.rs b/rust/kernel/fs/file.rs
index 67a3654f0fd370..f3153f4c8560bb 100644
--- a/rust/kernel/fs/file.rs
+++ b/rust/kernel/fs/file.rs
@@ -448,9 +448,9 @@ impl Drop for FileDescriptorReservation {
}
}
-/// Represents the `EBADF` error code.
+/// Represents the [`EBADF`] error code.
///
-/// Used for methods that can only fail with `EBADF`.
+/// Used for methods that can only fail with [`EBADF`].
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct BadFdError;
Powered by blists - more mailing lists