rust/kernel/fs/file.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
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@onurozkan.dev>
Link: https://github.com/Rust-for-Linux/linux/issues/1186
Signed-off-by: djfkvcing117@gmail.com
---
From 87d6b4e61da0db96a018b86baa011b9c6635e665 Mon Sep 17 00:00:00 2001
From: Webb321 <140618222+Webb321@users.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@onurozkan.dev>
Link: https://github.com/Rust-for-Linux/linux/issues/1186
Signed-off-by: djfkvcing117@gmail.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;
On Tue, Sep 16, 2025 at 11:07:09PM +0800, Tong wrote: > 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@onurozkan.dev> > Link: https://github.com/Rust-for-Linux/linux/issues/1186 > Signed-off-by: djfkvcing117@gmail.com > > --- > > >From 87d6b4e61da0db96a018b86baa011b9c6635e665 Mon Sep 17 00:00:00 2001 > From: Webb321 <140618222+Webb321@users.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@onurozkan.dev> > Link: https://github.com/Rust-for-Linux/linux/issues/1186 > > Signed-off-by: djfkvcing117@gmail.com > --- > rust/kernel/fs/file.rs | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) You seem to have 2 changelog texts here, how did that happen? Also, no blank line is needed before your signed-off-by line, AND it should have your name and email address. thanks, greg k-h
© 2016 - 2025 Red Hat, Inc.