public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Miguel Ojeda <ojeda@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Benno Lossin <benno.lossin@proton.me>,
	Boqun Feng <boqun.feng@gmail.com>,
	Andreas Hindborg <a.hindborg@kernel.org>
Subject: Re: linux-next: build failure after merge of the rust tree
Date: Wed, 19 Mar 2025 20:06:42 +1100	[thread overview]
Message-ID: <20250319200642.05825b39@canb.auug.org.au> (raw)
In-Reply-To: <CANiq72=mC67W_O9u6-HpAnqmy5L_A+-t9fW0YYR_0UR+hFvopQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2880 bytes --]

Hi Miguel,

On Wed, 19 Mar 2025 00:47:40 +0100 Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Tue, Mar 18, 2025 at 12:37 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > When I merge the rust tree into linux-next, the complete resolution now
> > looks like this:
> > (the hunk in rust/kernel/sync.rs is needed due to a commit in the tip
> > tree)  
> 
> Thanks!
> 
> I have redone the 2 merges on my side again, following the ones you
> did (i.e. starting on the previous merge you had on 20250318, then
> rust-next, then hrtimer-next) and then compared. I saved it for you
> at:
> 
>     https://github.com/ojeda/linux.git rust-test-merge

Thanks for checking it out.

> There are a few differences, a couple important, another one not much
> -- all coming from the first merge (rust-next one).
> 
> 1) When merging rust-next, the first one is needed to pass `rustfmt`
> in `rust/kernel/sync.rs`:
> 
> -use pin_init;
>  use crate::prelude::*;
>  use crate::types::Opaque;
> +use pin_init;
> 
> Would it be possible for you to run `make ...... rustfmt` after
> merges? It is quite fast (with the amount of code we have :). As far
> as I know, Linus is also doing it, so it is not a huge deal, but it is
> nicer nevertheless to have it clean in linux-next so that CIs can do
> `make ....... rustfmtcheck` (which checks if it is clean).

I have a look into it.

> By the way, concerning this change, we could actually remove that
> line, but since it was in the original commit, I kept it in the merge
> -- we can clean it up in a proper commit later on.
> 
> 2) More importantly, there are a couple changed needed to keep the
> examples building (which are KUnit tests, i.e. under
> `CONFIG_RUST_KERNEL_DOCTESTS`). In `rust/kernel/sync.rs`:
> 
> -    /// # use kernel::{c_str, stack_pin_init};
> +    /// # use kernel::c_str;
>      /// # use kernel::alloc::KBox;
>      /// # use kernel::types::ForeignOwnable;
>      /// # use kernel::sync::{LockClassKey, SpinLock};
> +    /// # use pin_init::stack_pin_init;
> 
> And in `rust/kernel/sync/lock.rs`:
> 
> -    /// # use kernel::{new_spinlock, stack_pin_init,
> sync::lock::{Backend, Guard, Lock}};
> +    /// # use kernel::{new_spinlock, sync::lock::{Backend, Guard, Lock}};
> +    /// # use pin_init::stack_pin_init;
> 
> 3) A trivial difference is that I kept the removal of this newline in
> `rust/pin-init/src/lib.rs`, because the original fix did so (which was
> likely done because the "SAFETY" comment is supposed to "cover" it
> too), but it is not a big deal to keep it as you have it.
> 
>      Option<NonZeroI128>, Option<NonZeroIsize>,
> -
>      {<T>} Option<NonNull<T>>,
> 
> Would it be possible to fix at least 1) and 2)? Thanks a lot!

I added all three to my resolution today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2025-03-19  9:07 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17 10:57 linux-next: build failure after merge of the rust tree Stephen Rothwell
2025-03-17 22:35 ` Miguel Ojeda
2025-03-17 23:35   ` Stephen Rothwell
2025-03-18 11:37     ` Stephen Rothwell
2025-03-18 23:47       ` Miguel Ojeda
2025-03-19  9:06         ` Stephen Rothwell [this message]
2025-03-19  9:18           ` Miguel Ojeda
  -- strict thread matches above, loose matches on Subject: below --
2025-11-17  8:04 Stephen Rothwell
2025-11-17 11:19 ` Alexandre Courbot
2025-11-17 14:51 ` Alice Ryhl
2025-11-17 15:37   ` Tamir Duberstein
2025-11-17 16:11     ` Alice Ryhl
2025-06-24  7:31 Stephen Rothwell
2025-06-24 10:31 ` Miguel Ojeda
2025-06-24 11:12   ` Danilo Krummrich
2025-06-24 12:29     ` Miguel Ojeda
2025-06-24 12:00   ` Danilo Krummrich
2025-06-24 12:14     ` Alexandre Courbot
2025-06-24 12:16       ` Tamir Duberstein
2025-06-24 12:24         ` Alexandre Courbot
2025-06-24 12:29           ` Tamir Duberstein
2025-06-24 12:25     ` Miguel Ojeda
2025-05-27  9:42 Stephen Rothwell
2025-05-27 10:03 ` Miguel Ojeda
2025-05-12  9:40 Stephen Rothwell
2025-05-12 11:52 ` Miguel Ojeda
2025-03-24 10:57 Stephen Rothwell
2025-03-24 11:06 ` Stephen Rothwell
2025-03-24 11:59   ` Danilo Krummrich
2025-03-24 13:29     ` Greg KH
2025-03-24 13:43       ` Danilo Krummrich
2025-03-24 13:52         ` Greg KH
2025-03-24 15:18         ` Miguel Ojeda
2025-03-24 15:27           ` Danilo Krummrich
2025-03-24 15:40             ` Miguel Ojeda
2025-01-10  5:28 Stephen Rothwell
2025-01-10  9:28 ` Alice Ryhl
2025-01-10  9:34   ` Greg Kroah-Hartman
2025-01-10  9:41     ` Alice Ryhl
2025-01-10 10:07       ` Alice Ryhl
2025-01-10 10:08       ` Miguel Ojeda
2025-01-10 10:16     ` Miguel Ojeda
2025-01-10 10:38       ` Miguel Ojeda
2024-12-16  5:25 Stephen Rothwell
2024-12-16 10:31 ` Miguel Ojeda
2024-12-16 10:59   ` Jocelyn Falempe
2024-12-16 16:24     ` Miguel Ojeda
2024-12-16 19:46       ` Jocelyn Falempe
2024-11-11  6:58 Stephen Rothwell
2024-11-11  8:16 ` Miguel Ojeda
2024-11-11  8:28   ` Miguel Ojeda
2024-11-11 14:15     ` Gary Guo
2024-11-11 23:08       ` Miguel Ojeda
2024-11-11 23:58     ` Miguel Ojeda
2024-11-12  1:29       ` Stephen Rothwell
2024-11-12  6:30       ` Stephen Rothwell
2024-11-12  8:50         ` Miguel Ojeda
2021-09-28  4:09 Stephen Rothwell
2021-09-28  4:18 ` Gary Guo
2021-09-28  5:52   ` Stephen Rothwell
2021-09-28 23:37     ` Stephen Rothwell
2021-09-29 17:13       ` Masahiro Yamada
2021-09-29 17:25         ` Miguel Ojeda

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=20250319200642.05825b39@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=a.hindborg@kernel.org \
    --cc=benno.lossin@proton.me \
    --cc=boqun.feng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    /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