rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs
PATCH 1/1 rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs
From: Tong Li <[email protected]>
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.
--- rust/kernel/fs/file.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
rust/kernel/fs/file.rs +2 -2
@@ -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.34.1
Onur Özkan
reviewerQuoted 22 lines · On Wed, 17 Sep 2025 11:38:33 +0800 [email protected] wrote:
From: Tong Li <[email protected]>
In
rust/kernel/fs/file.rs, replace plain-textEBADFin the doc comment for BadFdError with an intra-doc link [EBADF].This improves the generated documentation (so the
EBADFconstant is linked), and helps tools such as rust-analyzer to resolve such references from the docs.Suggested-by Onur Özkan <[email protected]>Signed-off-by Tong Li <[email protected]>--- rust/kernel/fs/file.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)rust/kernel/fs/file.rs +0
-0@@ -448,9 +448,9 @@ fn drop(&mut self) { }
rust/kernel/fs/file.rs fn drop(&mut self) { · line 456
Quoted 10 lines
rust/kernel/fs/file.rs +2
-2} -/// 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 ;
Hi Tong,
The description doesn't follow the style guidelines (lines are too long). Please run ./scripts/checkpatch.pl $path_to_patch_file to verify before submitting patches.
Also, make sure to version your patches with each revision (e.g., git format-patch $commit -vN). There are already several patches with the same titles on the mailing list.
Thanks,
Onur