Skip to contentSkip to conversation

rust: file: add intra-doc link for 'EBADF'

PATCH Superseded [email protected] 3 participants 4 messages Sep 30, 2025 – Oct 6, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: file: add intra-doc link for 'EBADF'

From: Tong Li <[email protected]>

---
 rust/kernel/fs/file.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
rust/kernel/fs/file.rs +2 -2
index 67a3654f0fd3..f3153f4c8560 100644
@@ -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;
 
Signature · 1 line
2.51.0
#1 lore raw
Quoted 6 lines · On Tue, Sep 30, 2025 at 11:27 AM <[email protected]> wrote:

From: Tong Li <[email protected]>

Normally commits cannot have an empty message -- this one is trivial, so it is not a big deal, but maintainers in general may complain. Up to them, of course.

What you should normally do is explain the "why" of a change, i.e. why we want to add an intra-doc link, its benefits.

Other than that, it seems like the formatting is good. If you fix the
From: header, then the From: line in the body is not needed and Git should not add it anymore, but it is not a blocker.

Thanks!

Cheers,
Miguel

author
#2 lore raw

PATCH v2 1/1 rust: file: add intra-doc link for 'EBADF'

The BadFdError doc comment mentions the EBADF constant but does not currently provide a navigation target for readers of the generated docs. Turning the references into intra-doc links matches the rest of the module and makes the documentation easier to explore.

---
 rust/kernel/fs/file.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
rust/kernel/fs/file.rs +2 -2
index 67a3654f0fd3..f3153f4c8560 100644
@@ -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;
 
Signature · 1 line
2.51.0
maintainer Applied
#3 lore raw
Quoted 8 lines · Tong Li

The BadFdError doc comment mentions the EBADF constant but does not currently provide a navigation target for readers of the generated docs. Turning the references into intra-doc links matches the rest of the module and makes the documentation easier to explore.

[...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] rust: file: add intra-doc link for 'EBADF'

      https://git.kernel.org/vfs/vfs/c/2b0b5bcc45a0