From: Andrew Morton <akpm@linux-foundation•org>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: Eric Dumazet <edumazet@google•com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>,
Miguel Ojeda <ojeda@kernel•org>,
Wedson Almeida Filho <wedsonaf@gmail•com>,
Alice Ryhl <aliceryhl@google•com>
Subject: Re: linux-next: build failure after merge of the mm-nonmm-unstable tree
Date: Wed, 19 Nov 2025 15:48:24 -0800 [thread overview]
Message-ID: <20251119154824.339bfbeb47d149b041f15550@linux-foundation.org> (raw)
In-Reply-To: <20251120101440.0f41ca9b@canb.auug.org.au>
On Thu, 20 Nov 2025 10:14:40 +1100 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
> Hi all,
>
> On Mon, 17 Nov 2025 10:23:10 +1100 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
> >
> > After merging the mm-nonmm-unstable tree, today's linux-next build
> > (x86_64 allmodconfig) failed like this:
> >
> > error[E0425]: cannot find function `rb_first` in crate `bindings`
> > --> rust/kernel/rbtree.rs:209:42
> > |
> > 209 | next: unsafe { bindings::rb_first(&self.root) },
> > | ^^^^^^^^ not found in `bindings`
> >
> > error[E0425]: cannot find function `rb_first` in crate `bindings`
> > --> rust/kernel/rbtree.rs:224:42
> > |
> > 224 | next: unsafe { bindings::rb_first(from_mut(&mut self.root)) },
> > | ^^^^^^^^ not found in `bindings`
> >
> > error[E0425]: cannot find function `rb_first` in crate `bindings`
> > --> rust/kernel/rbtree.rs:249:42
> > |
> > 249 | let current = unsafe { bindings::rb_first(root) };
> > | ^^^^^^^^ not found in `bindings`
> >
> > error[E0425]: cannot find function `rb_last` in crate `bindings`
> > --> rust/kernel/rbtree.rs:264:42
> > |
> > 264 | let current = unsafe { bindings::rb_last(root) };
> > | ^^^^^^^ help: a function with a similar name exists: `sg_last`
> > |
> > ::: rust/bindings/bindings_generated.rs:90155:5
> > |
> > 90155 | pub fn sg_last(s: *mut scatterlist, arg1: ffi::c_uint) -> *mut scatterlist;
> > | --------------------------------------------------------------------------- similarly named function `sg_last` defined here
> >
> > error: aborting due to 4 previous errors
> >
> > For more information about this error, try `rustc --explain E0425`.
> >
> > Caused by commit
> >
> > 84aa8c5fc414 ("rbtree: inline rb_first()")
> >
> > I have reverted that commit and the following one for today.
>
> I am still reverting those commits.
Thanks, I'll disable them for now.
Alice, can you please help us with a fix? Simple patch follows:
--- a/include/linux/rbtree.h~rbtree-inline-rb_first
+++ a/include/linux/rbtree.h
@@ -43,7 +43,21 @@ extern void rb_erase(struct rb_node *, s
/* Find logical next and previous nodes in a tree */
extern struct rb_node *rb_next(const struct rb_node *);
extern struct rb_node *rb_prev(const struct rb_node *);
-extern struct rb_node *rb_first(const struct rb_root *);
+
+/*
+ * This function returns the first node (in sort order) of the tree.
+ */
+static inline struct rb_node *rb_first(const struct rb_root *root)
+{
+ struct rb_node *n;
+
+ n = root->rb_node;
+ if (!n)
+ return NULL;
+ while (n->rb_left)
+ n = n->rb_left;
+ return n;
+}
extern struct rb_node *rb_last(const struct rb_root *);
/* Postorder iteration - always visit the parent after its children */
--- a/lib/rbtree.c~rbtree-inline-rb_first
+++ a/lib/rbtree.c
@@ -460,22 +460,6 @@ void __rb_insert_augmented(struct rb_nod
}
EXPORT_SYMBOL(__rb_insert_augmented);
-/*
- * This function returns the first node (in sort order) of the tree.
- */
-struct rb_node *rb_first(const struct rb_root *root)
-{
- struct rb_node *n;
-
- n = root->rb_node;
- if (!n)
- return NULL;
- while (n->rb_left)
- n = n->rb_left;
- return n;
-}
-EXPORT_SYMBOL(rb_first);
-
struct rb_node *rb_last(const struct rb_root *root)
{
struct rb_node *n;
_
next prev parent reply other threads:[~2025-11-19 23:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-16 23:23 linux-next: build failure after merge of the mm-nonmm-unstable tree Stephen Rothwell
2025-11-19 23:14 ` Stephen Rothwell
2025-11-19 23:48 ` Andrew Morton [this message]
2025-11-20 8:55 ` Miguel Ojeda
2025-11-20 10:01 ` Alice Ryhl
-- strict thread matches above, loose matches on Subject: below --
2026-04-29 9:10 Thierry Reding
2026-03-17 14:32 Mark Brown
2026-03-17 15:06 ` Mathieu Desnoyers
2026-03-17 15:07 ` David CARLIER
2026-02-16 13:58 Mark Brown
2025-12-18 4:30 Stephen Rothwell
2025-12-21 2:58 ` Finn Thain
2025-12-26 16:45 ` Sasha Levin
2025-12-29 8:56 ` Finn Thain
2026-01-01 9:21 ` Finn Thain
2026-01-01 17:01 ` Randy Dunlap
2026-01-01 23:15 ` Finn Thain
2026-01-02 7:29 ` Ard Biesheuvel
2026-01-02 22:09 ` Finn Thain
2025-11-16 22:36 Stephen Rothwell
2025-10-17 13:25 Mark Brown
2025-10-17 21:34 ` Andrew Morton
2025-09-01 1:17 Stephen Rothwell
2025-07-11 0:58 Stephen Rothwell
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=20251119154824.339bfbeb47d149b041f15550@linux-foundation.org \
--to=akpm@linux-foundation$(echo .)org \
--cc=aliceryhl@google$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=ojeda@kernel$(echo .)org \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=wedsonaf@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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