[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250916174011.10c791cb@nimda>
Date: Tue, 16 Sep 2025 17:40:11 +0300
From: Onur <work@...rozkan.dev>
To: Tong <djfkvcing117@...il.com>
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
ojeda@...nel.org, Greg KH <gregkh@...uxfoundation.org>,
alex.gaynor@...il.com, david.m.ertman@...el.com, ira.weiny@...el.com,
leon@...nel.org, boqun.feng@...il.com, gary@...yguo.net,
bjorn3_gh@...tonmail.com, lossin@...nel.org, a.hindborg@...nel.org,
aliceryhl@...gle.com, tmgross@...ch.edu, dakr@...nel.org
Subject: Re: [PATCH] rust/fs: use intra-doc link for `EBADF` in `BadFdError`
docs
Hi Tong,
On Tue, 16 Sep 2025 22:25:41 +0800
Tong <djfkvcing117@...il.com> 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: https://github.com/onur-ozkan
> Link: https://github.com/Rust-for-Linux/linux/issues/1186
> Signed-off-by: Your Name <your.email@...mple.com>
This is wrong.
>
> ---
>
> From 676dd0d1d9276d5dd2a83469ac392732c0a1f34a Mon Sep 17 00:00:00 2001
> From: Webb321 <140618222+Webb321@...rs.noreply.github.com>
> Date: Tue, 16 Sep 2025 22:15:25 +0800
> Subject: [PATCH] rust/fs: use intra-doc link for `EBADF` in
> `BadFdError` docs
>
> In `rust/kernel/fs/file.rs`, replace plain text `EBADF` references in
> the doc comment of `BadFdError` with intra-doc links [`EBADF`].
>
> 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: https://github.com/onur-ozkan
Should be: 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 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/rust/kernel/fs/file.rs b/rust/kernel/fs/file.rs
> index 35fd5db35c4652..761a9074d65205 100644
> --- a/rust/kernel/fs/file.rs
> +++ b/rust/kernel/fs/file.rs
> @@ -447,7 +447,7 @@ impl Drop for FileDescriptorReservation { } }
> -/// Represents the `EBADF` error code.
> +/// Represents the [`EBADF`] error code.
> ///
> /// Used for methods that can only fail with `EBADF`.
You missed fixing the second `EBADF` here.
> #[derive(Copy, Clone, Eq, PartialEq)]
Thanks,
Onur
Powered by blists - more mailing lists