From: Onur <work@onurozkan.dev>
To: Tong <djfkvcing117@gmail.com>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
ojeda@kernel.org, Greg KH <gregkh@linuxfoundation.org>,
alex.gaynor@gmail.com, david.m.ertman@intel.com,
ira.weiny@intel.com, leon@kernel.org, boqun.feng@gmail.com,
gary@garyguo.net, bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu,
dakr@kernel.org
Subject: Re: [PATCH] rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs
Date: Tue, 16 Sep 2025 17:40:11 +0300 [thread overview]
Message-ID: <20250916174011.10c791cb@nimda> (raw)
In-Reply-To: <CAMfjjQ18NYsQh7CVzRs=+sYwve4T5y-vf=zMNLyxQvgYE4+mMA@mail.gmail.com>
Hi Tong,
On Tue, 16 Sep 2025 22:25:41 +0800
Tong <djfkvcing117@gmail.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@example.com>
This is wrong.
>
> ---
>
> From 676dd0d1d9276d5dd2a83469ac392732c0a1f34a Mon Sep 17 00:00:00 2001
> From: Webb321 <140618222+Webb321@users.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@onurozkan.dev>
> Link: https://github.com/Rust-for-Linux/linux/issues/1186
> Signed-off-by: djfkvcing117@gmail.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
next prev parent reply other threads:[~2025-09-16 14:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMfjjQ18NYsQh7CVzRs=+sYwve4T5y-vf=zMNLyxQvgYE4+mMA@mail.gmail.com>
2025-09-16 14:37 ` [PATCH] rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs Greg KH
2025-09-16 14:40 ` Onur [this message]
2025-09-16 15:07 Tong
2025-09-16 15:17 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2025-09-16 17:13 Tong
2025-09-16 18:30 ` Greg KH
2025-09-17 3:38 djfkvcing117
2025-09-17 12:42 ` Onur Özkan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250916174011.10c791cb@nimda \
--to=work@onurozkan.dev \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=david.m.ertman@intel.com \
--cc=djfkvcing117@gmail.com \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).