public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs: rust: rbtree: fix incorrect description for `peek_next`
@ 2025-12-12  9:10 WeiKang Guo
  2026-01-04 22:52 ` Miguel Ojeda
  0 siblings, 1 reply; 5+ messages in thread
From: WeiKang Guo @ 2025-12-12  9:10 UTC (permalink / raw)
  To: guoweikang.kernel; +Cc: Miguel Ojeda, stable

The documentation for `Cursor::peek_next` incorrectly describes it as
"Access the previous node without moving the cursor" when it actually
accesses the next node. Update the description to correctly state
"Access the next node without moving the cursor" to match the function
name and implementation.

Reported-by: Miguel Ojeda <ojeda@kernel.org>
Closes: https://github.com/Rust-for-Linux/linux/issues/1205
Fixes: 98c14e40e07a0 ("rust: rbtree: add cursor")
Cc: stable@vger.kernel.org
Signed-off-by: WeiKang Guo <guoweikang.kernel@outlook.com>
---
 rust/kernel/rbtree.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/rbtree.rs b/rust/kernel/rbtree.rs
index 4729eb56827a..cd187e2ca328 100644
--- a/rust/kernel/rbtree.rs
+++ b/rust/kernel/rbtree.rs
@@ -985,7 +985,7 @@ pub fn peek_prev(&self) -> Option<(&K, &V)> {
         self.peek(Direction::Prev)
     }
 
-    /// Access the previous node without moving the cursor.
+    /// Access the next node without moving the cursor.
     pub fn peek_next(&self) -> Option<(&K, &V)> {
         self.peek(Direction::Next)
     }
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] docs: rust: rbtree: fix incorrect description for `peek_next`
@ 2025-12-12  9:31 WeiKang Guo
  2025-12-15 12:13 ` Gary Guo
  2025-12-17 20:39 ` Alice Ryhl
  0 siblings, 2 replies; 5+ messages in thread
From: WeiKang Guo @ 2025-12-12  9:31 UTC (permalink / raw)
  To: ojeda
  Cc: boqun.feng, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl,
	tmgross, akr, mattgilbride, rust-for-linux, linux-kernel, stable,
	WeiKang Guo

The documentation for `Cursor::peek_next` incorrectly describes it as
"Access the previous node without moving the cursor" when it actually
accesses the next node. Update the description to correctly state
"Access the next node without moving the cursor" to match the function
name and implementation.

Reported-by: Miguel Ojeda <ojeda@kernel.org>
Closes: https://github.com/Rust-for-Linux/linux/issues/1205
Fixes: 98c14e40e07a0 ("rust: rbtree: add cursor")
Cc: stable@vger.kernel.org
Signed-off-by: WeiKang Guo <guoweikang.kernel@outlook.com>
---
 rust/kernel/rbtree.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/rbtree.rs b/rust/kernel/rbtree.rs
index 4729eb56827a..cd187e2ca328 100644
--- a/rust/kernel/rbtree.rs
+++ b/rust/kernel/rbtree.rs
@@ -985,7 +985,7 @@ pub fn peek_prev(&self) -> Option<(&K, &V)> {
         self.peek(Direction::Prev)
     }
 
-    /// Access the previous node without moving the cursor.
+    /// Access the next node without moving the cursor.
     pub fn peek_next(&self) -> Option<(&K, &V)> {
         self.peek(Direction::Next)
     }
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] docs: rust: rbtree: fix incorrect description for `peek_next`
  2025-12-12  9:31 [PATCH] docs: rust: rbtree: fix incorrect description for `peek_next` WeiKang Guo
@ 2025-12-15 12:13 ` Gary Guo
  2025-12-17 20:39 ` Alice Ryhl
  1 sibling, 0 replies; 5+ messages in thread
From: Gary Guo @ 2025-12-15 12:13 UTC (permalink / raw)
  To: WeiKang Guo
  Cc: ojeda, boqun.feng, bjorn3_gh, lossin, a.hindborg, aliceryhl,
	tmgross, akr, mattgilbride, rust-for-linux, linux-kernel, stable

On Fri, 12 Dec 2025 17:31:10 +0800
WeiKang Guo <guoweikang.kernel@outlook.com> wrote:

> The documentation for `Cursor::peek_next` incorrectly describes it as
> "Access the previous node without moving the cursor" when it actually
> accesses the next node. Update the description to correctly state
> "Access the next node without moving the cursor" to match the function
> name and implementation.
> 
> Reported-by: Miguel Ojeda <ojeda@kernel.org>
> Closes: https://github.com/Rust-for-Linux/linux/issues/1205
> Fixes: 98c14e40e07a0 ("rust: rbtree: add cursor")
> Cc: stable@vger.kernel.org
> Signed-off-by: WeiKang Guo <guoweikang.kernel@outlook.com>

Reviewed-by: Gary Guo <gary@garyguo.net>

> ---
>  rust/kernel/rbtree.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rust/kernel/rbtree.rs b/rust/kernel/rbtree.rs
> index 4729eb56827a..cd187e2ca328 100644
> --- a/rust/kernel/rbtree.rs
> +++ b/rust/kernel/rbtree.rs
> @@ -985,7 +985,7 @@ pub fn peek_prev(&self) -> Option<(&K, &V)> {
>          self.peek(Direction::Prev)
>      }
>  
> -    /// Access the previous node without moving the cursor.
> +    /// Access the next node without moving the cursor.
>      pub fn peek_next(&self) -> Option<(&K, &V)> {
>          self.peek(Direction::Next)
>      }


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] docs: rust: rbtree: fix incorrect description for `peek_next`
  2025-12-12  9:31 [PATCH] docs: rust: rbtree: fix incorrect description for `peek_next` WeiKang Guo
  2025-12-15 12:13 ` Gary Guo
@ 2025-12-17 20:39 ` Alice Ryhl
  1 sibling, 0 replies; 5+ messages in thread
From: Alice Ryhl @ 2025-12-17 20:39 UTC (permalink / raw)
  To: WeiKang Guo
  Cc: ojeda, boqun.feng, gary, bjorn3_gh, lossin, a.hindborg, tmgross,
	akr, mattgilbride, rust-for-linux, linux-kernel, stable

On Fri, Dec 12, 2025 at 05:31:10PM +0800, WeiKang Guo wrote:
> The documentation for `Cursor::peek_next` incorrectly describes it as
> "Access the previous node without moving the cursor" when it actually
> accesses the next node. Update the description to correctly state
> "Access the next node without moving the cursor" to match the function
> name and implementation.
> 
> Reported-by: Miguel Ojeda <ojeda@kernel.org>
> Closes: https://github.com/Rust-for-Linux/linux/issues/1205
> Fixes: 98c14e40e07a0 ("rust: rbtree: add cursor")
> Cc: stable@vger.kernel.org
> Signed-off-by: WeiKang Guo <guoweikang.kernel@outlook.com>

Reviewed-by: Alice Ryhl <aliceryhl@google.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] docs: rust: rbtree: fix incorrect description for `peek_next`
  2025-12-12  9:10 WeiKang Guo
@ 2026-01-04 22:52 ` Miguel Ojeda
  0 siblings, 0 replies; 5+ messages in thread
From: Miguel Ojeda @ 2026-01-04 22:52 UTC (permalink / raw)
  To: WeiKang Guo; +Cc: Miguel Ojeda, stable

On Fri, Dec 12, 2025 at 10:10 AM WeiKang Guo
<guoweikang.kernel@outlook.com> wrote:
>
> The documentation for `Cursor::peek_next` incorrectly describes it as
> "Access the previous node without moving the cursor" when it actually
> accesses the next node. Update the description to correctly state
> "Access the next node without moving the cursor" to match the function
> name and implementation.
>
> Reported-by: Miguel Ojeda <ojeda@kernel.org>
> Closes: https://github.com/Rust-for-Linux/linux/issues/1205
> Fixes: 98c14e40e07a0 ("rust: rbtree: add cursor")
> Cc: stable@vger.kernel.org
> Signed-off-by: WeiKang Guo <guoweikang.kernel@outlook.com>

This was sent earlier at:

    https://lore.kernel.org/rust-for-linux/20251107093921.3379954-1-m18080292938@163.com/

So I picked that one. I merged the tags there.

Thanks a lot for sending it, nevertheless!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-04 22:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-12  9:31 [PATCH] docs: rust: rbtree: fix incorrect description for `peek_next` WeiKang Guo
2025-12-15 12:13 ` Gary Guo
2025-12-17 20:39 ` Alice Ryhl
  -- strict thread matches above, loose matches on Subject: below --
2025-12-12  9:10 WeiKang Guo
2026-01-04 22:52 ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox