rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs
@ 2025-09-16 17:13 Tong
  2025-09-16 18:30 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Tong @ 2025-09-16 17:13 UTC (permalink / raw)
  To: linux-kernel, rust-for-linux; +Cc: onur-ozkan

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs
@ 2025-09-17  3:38 djfkvcing117
  2025-09-17 12:42 ` Onur Özkan
  0 siblings, 1 reply; 8+ messages in thread
From: djfkvcing117 @ 2025-09-17  3:38 UTC (permalink / raw)
  To: linux-kernel, rust-for-linux; +Cc: Onur, gregkh, lossin, gary, Tong Li

From: Tong Li <djfkvcing117@gmail.com>

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 Li <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


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs
@ 2025-09-16 15:07 Tong
  2025-09-16 15:17 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Tong @ 2025-09-16 15:07 UTC (permalink / raw)
  To: rust-for-linux, linux-kernel
  Cc: onur-ozkan, lossin, gary, alex.gaynor, david.m.ertman, bjorn3_gh,
	Greg KH, ira.weiny, leon, dakr, tmgross, ojeda, boqun.feng,
	a.hindborg, aliceryhl

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: Onur Özkan <work@onurozkan.dev>
Link: https://github.com/Rust-for-Linux/linux/issues/1186
Signed-off-by: djfkvcing117@gmail.com

---

From 87d6b4e61da0db96a018b86baa011b9c6635e665 Mon Sep 17 00:00:00 2001
From: Webb321 <140618222+Webb321@users.noreply.github.com>
Date: Tue, 16 Sep 2025 22:58:26 +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` references in
the doc comment of `BadFdError` with intra-doc links [`EBADF`].
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: 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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/kernel/fs/file.rs b/rust/kernel/fs/file.rs
index 67a3654f0fd370..f3153f4c8560bb 100644
--- a/rust/kernel/fs/file.rs
+++ b/rust/kernel/fs/file.rs
@@ -448,9 +448,9 @@ impl Drop for FileDescriptorReservation {
     }
 }

-/// 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;

^ permalink raw reply related	[flat|nested] 8+ messages in thread
[parent not found: <CAMfjjQ18NYsQh7CVzRs=+sYwve4T5y-vf=zMNLyxQvgYE4+mMA@mail.gmail.com>]

end of thread, other threads:[~2025-09-17 12:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 17:13 [PATCH] rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs Tong
2025-09-16 18:30 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2025-09-17  3:38 djfkvcing117
2025-09-17 12:42 ` Onur Özkan
2025-09-16 15:07 Tong
2025-09-16 15:17 ` Greg KH
     [not found] <CAMfjjQ18NYsQh7CVzRs=+sYwve4T5y-vf=zMNLyxQvgYE4+mMA@mail.gmail.com>
2025-09-16 14:37 ` Greg KH
2025-09-16 14:40 ` Onur

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).