public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: Alban Kurti <kurti@invicto.ai>,
	Benno Lossin <benno.lossin@proton.me>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the rust tree with Linus' tree
Date: Mon, 17 Mar 2025 21:20:47 +1100	[thread overview]
Message-ID: <20250317212047.46580935@canb.auug.org.au> (raw)

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

Hi all,

Today's linux-next merge of the rust tree got a conflict in:

  rust/kernel/init.rs
  rust/pin-init/src/macros.rs

between commits:

  df27cef15360 ("rust: init: fix `Zeroable` implementation for `Option<NonNull<T>>` and `Option<KBox<T>>`")
  6933c1067fe6 ("rust: init: add missing newline to pr_info! calls")

from Linus' tree and commit:

  fbf8fb328d1b ("rust: move pin-init API into its own directory")

and following ones from the rust tree.

I fixed it up (I just used the latter version and applied the following
patch) and can carry the fix as necessary. This is now fixed as far as
linux-next is concerned, but any non trivial conflicts should be
mentioned to your upstream maintainer when your tree is submitted for
merging.  You may also want to consider cooperating with the maintainer
of the conflicting tree to minimise any particularly complex conflicts.

More (or less) may be needed :-(

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 17 Mar 2025 21:16:57 +1100
Subject: [PATCH] fix up for "rust: init: fix `Zeroable` implementation for
 `Option<NonNull<T>>` and `Option<KBox<T>>`"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 rust/pin-init/src/lib.rs | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/rust/pin-init/src/lib.rs b/rust/pin-init/src/lib.rs
index f36b8f8e8730..9cd822388ba2 100644
--- a/rust/pin-init/src/lib.rs
+++ b/rust/pin-init/src/lib.rs
@@ -1446,16 +1446,14 @@ macro_rules! impl_zeroable {
     // SAFETY: `T: Zeroable` and `UnsafeCell` is `repr(transparent)`.
     {<T: ?Sized + Zeroable>} UnsafeCell<T>,
 
-    // SAFETY: All zeros is equivalent to `None` (option layout optimization guarantee).
+    // SAFETY: All zeros is equivalent to `None` (option layout optimization guarantee:
+    // https://doc.rust-lang.org/stable/std/option/index.html#representation).
     Option<NonZeroU8>, Option<NonZeroU16>, Option<NonZeroU32>, Option<NonZeroU64>,
     Option<NonZeroU128>, Option<NonZeroUsize>,
     Option<NonZeroI8>, Option<NonZeroI16>, Option<NonZeroI32>, Option<NonZeroI64>,
     Option<NonZeroI128>, Option<NonZeroIsize>,
 
-    // SAFETY: All zeros is equivalent to `None` (option layout optimization guarantee).
-    //
-    // In this case we are allowed to use `T: ?Sized`, since all zeros is the `None` variant.
-    {<T: ?Sized>} Option<NonNull<T>>,
+    {<T>} Option<NonNull<T>>,
 
     // SAFETY: `null` pointer is valid.
     //
-- 
2.45.2

-- 
Cheers,
Stephen Rothwell

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

             reply	other threads:[~2025-03-17 10:20 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-17 10:20 Stephen Rothwell [this message]
2025-03-17 19:37 ` linux-next: manual merge of the rust tree with Linus' tree Miguel Ojeda
2025-03-17 22:31   ` Stephen Rothwell
2025-03-17 22:35     ` Miguel Ojeda
  -- strict thread matches above, loose matches on Subject: below --
2025-07-21  4:31 Stephen Rothwell
2025-07-21  8:23 ` Miguel Ojeda
2025-03-17 10:05 Stephen Rothwell
2025-03-17 19:36 ` Miguel Ojeda
2024-09-16  8:03 Stephen Rothwell
2024-09-16  8:12 ` Miguel Ojeda
2022-10-04  8:05 Stephen Rothwell
2022-09-12  7:24 Stephen Rothwell
2022-07-25  8:41 Stephen Rothwell
2022-07-25  8:52 ` Miguel Ojeda
2022-07-13 10:34 Stephen Rothwell
2022-07-13 10:50 ` Miguel Ojeda
2022-07-13 11:39 ` Peter Zijlstra
2022-07-15  1:13   ` Miguel Ojeda
2022-07-15  9:01     ` Peter Zijlstra
2022-07-15 11:01       ` Miguel Ojeda
2021-12-10 18:18 broonie
2021-11-03  3:19 Stephen Rothwell
2021-11-03 10:30 ` Miguel Ojeda
2021-11-03 21:01   ` Stephen Rothwell
2021-11-04 12:19     ` Miguel Ojeda
2021-11-04 20:31       ` Stephen Rothwell
2021-11-05 11:00         ` Miguel Ojeda
2021-07-19  6:16 Stephen Rothwell
2021-07-12  0:37 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=20250317212047.46580935@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=benno.lossin@proton.me \
    --cc=kurti@invicto.ai \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --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