rust/kernel/fs/file.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
From af7f05e99ed67f57c83e51ca3a1b3010e3e87762 Mon Sep 17 00:00:00 2001
From: tong <djfkvcing117@gmail.com>
Date: Wed, 17 Sep 2025 00:25:44 +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` in the doc
comment for BadFdError with an intra-doc link [`EBADF`].
This improves the generated documentation (so the `EBADF` constant is
linked), and helps tools such as rust-analyzer to resolve such
references from the docs.
Suggested-by: Onur Özkan <work@onurozkan.dev>
Link: https://github.com/Rust-for-Linux/linux/issues/1186
Signed-off-by: tong <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 67a3654f0fd3..f3153f4c8560 100644
--- a/rust/kernel/fs/file.rs
+++ b/rust/kernel/fs/file.rs
@@ -448,9 +448,9 @@ fn drop(&mut self) {
}
}
-/// 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;
--
2.34.1
On Wed, Sep 17, 2025 at 01:13:38AM +0800, Tong wrote: > >From af7f05e99ed67f57c83e51ca3a1b3010e3e87762 Mon Sep 17 00:00:00 2001 > From: tong <djfkvcing117@gmail.com> > Date: Wed, 17 Sep 2025 00:25:44 +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 Perhaps try using git send-email? That way this will not show up in the body of the message. > In rust/kernel/fs/file.rs, replace plain-text `EBADF` in the doc > comment for BadFdError with an intra-doc link [`EBADF`]. > > This improves the generated documentation (so the `EBADF` constant is > linked), and helps tools such as rust-analyzer to resolve such > references from the docs. > > Suggested-by: Onur Özkan <work@onurozkan.dev> > Link: https://github.com/Rust-for-Linux/linux/issues/1186 > Signed-off-by: tong <djfkvcing117@gmail.com> We need a full name please. thanks, greg k-h
© 2016 - 2025 Red Hat, Inc.