From: Danilo Krummrich <dakr@kernel.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Miguel Ojeda <ojeda@kernel.org>, Greg KH <greg@kroah.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
FUJITA Tomonori <fujita.tomonori@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Tamir Duberstein <tamird@gmail.com>
Subject: Re: linux-next: manual merge of the rust tree with the driver-core tree
Date: Fri, 18 Jul 2025 18:43:32 +0200 [thread overview]
Message-ID: <aHp5tFVOhioQz7ba@pollux> (raw)
In-Reply-To: <20250718204653.1289b26f@canb.auug.org.au>
On Fri, Jul 18, 2025 at 08:46:53PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the rust tree got a conflict in:
>
> rust/kernel/device_id.rs
>
> between commit:
>
> 8d84b32075fb ("rust: device_id: split out index support into a separate trait")
>
> from the driver-core tree and commit:
>
> 5e30550558b1 ("rust: enable `clippy::as_underscore` lint")
>
> from the rust tree.
>
> I fixed it up (see below) 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.
Thanks, the diff looks good!
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc rust/kernel/device_id.rs
> index 8ed2c946144c,3dc72ca8cfc2..000000000000
> --- a/rust/kernel/device_id.rs
> +++ b/rust/kernel/device_id.rs
> @@@ -94,16 -77,14 +94,16 @@@ impl<T: RawDeviceId, U, const N: usize
> // SAFETY: by the safety requirement of `RawDeviceId`, we're guaranteed that `T` is
> // layout-wise compatible with `RawType`.
> raw_ids[i] = unsafe { core::mem::transmute_copy(&ids[i].0) };
> - // SAFETY: by the safety requirement of `RawDeviceId`, this would be effectively
> - // `raw_ids[i].driver_data = i;`.
> - unsafe {
> - raw_ids[i]
> - .as_mut_ptr()
> - .byte_add(T::DRIVER_DATA_OFFSET)
> - .cast::<usize>()
> - .write(i);
> + if let Some(data_offset) = data_offset {
> + // SAFETY: by the safety requirement of this function, this would be effectively
> + // `raw_ids[i].driver_data = i;`.
> + unsafe {
> + raw_ids[i]
> + .as_mut_ptr()
> - .byte_offset(data_offset as _)
> ++ .byte_add(data_offset)
> + .cast::<usize>()
> + .write(i);
> + }
> }
>
> // SAFETY: this is effectively a move: `infos[i] = ids[i].1`. We make a copy here but
next prev parent reply other threads:[~2025-07-18 16:43 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 10:46 linux-next: manual merge of the rust tree with the driver-core tree Stephen Rothwell
2025-07-18 16:43 ` Danilo Krummrich [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-11-20 7:11 Stephen Rothwell
2025-11-20 9:15 ` Miguel Ojeda
2025-11-20 11:27 ` Tamir Duberstein
2025-11-21 4:39 ` Stephen Rothwell
2025-11-21 12:16 ` Tamir Duberstein
2025-11-21 15:56 ` Miguel Ojeda
2025-11-21 16:07 ` Greg KH
2025-11-23 16:39 ` Miguel Ojeda
2025-11-21 19:21 ` Danilo Krummrich
2025-11-14 4:18 Stephen Rothwell
2025-12-05 3:23 ` Stephen Rothwell
2025-11-10 1:31 Stephen Rothwell
2025-11-10 1:24 Stephen Rothwell
2025-12-05 3:22 ` Stephen Rothwell
2025-09-23 16:44 Mark Brown
2025-09-23 16:49 ` Danilo Krummrich
2025-09-23 19:24 ` Miguel Ojeda
2025-09-24 8:04 ` Mark Brown
2025-09-24 8:25 ` Miguel Ojeda
2025-09-16 13:27 Mark Brown
2025-07-23 1:26 Stephen Rothwell
2025-07-23 12:49 ` Miguel Ojeda
2025-07-21 4:25 Stephen Rothwell
2025-07-21 8:24 ` Miguel Ojeda
2025-07-18 11:01 Stephen Rothwell
2025-07-18 10:26 Stephen Rothwell
2025-07-18 10:47 ` Stephen Rothwell
2025-07-15 8:26 Stephen Rothwell
2025-07-15 8:21 Stephen Rothwell
2025-07-11 8:04 Stephen Rothwell
2025-07-11 9:27 ` Tamir Duberstein
2025-07-11 7:59 Stephen Rothwell
2025-07-11 9:48 ` Miguel Ojeda
2025-07-01 7:46 Stephen Rothwell
2025-07-01 9:12 ` Miguel Ojeda
2025-03-21 7:56 Stephen Rothwell
2025-03-21 20:54 ` Miguel Ojeda
2025-04-01 3:21 ` Stephen Rothwell
2025-04-01 7:42 ` Greg KH
2025-01-14 4:46 Stephen Rothwell
2025-01-14 8:39 ` Miguel Ojeda
2025-01-23 3:30 ` Stephen Rothwell
2025-01-14 4:37 Stephen Rothwell
2025-01-14 8:38 ` Miguel Ojeda
2025-01-23 3:28 ` Stephen Rothwell
2025-01-13 4:12 Stephen Rothwell
2025-01-13 11:13 ` Miguel Ojeda
2025-01-23 3:31 ` Stephen Rothwell
2024-12-17 3:09 Stephen Rothwell
2024-12-17 8:15 ` Greg KH
2024-12-18 0:18 ` 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=aHp5tFVOhioQz7ba@pollux \
--to=dakr@kernel.org \
--cc=fujita.tomonori@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=tamird@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.