From: Andreas Hindborg <a.hindborg@kernel.org>
To: "Stephen Rothwell" <sfr@canb.auug.org.au>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Danilo Krummrich" <dakr@kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Linux Next Mailing List" <linux-next@vger.kernel.org>,
"Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>
Subject: Re: linux-next: build failure after merge of the rust-xarray tree
Date: Mon, 28 Apr 2025 14:25:50 +0200 [thread overview]
Message-ID: <877c344gmp.fsf@kernel.org> (raw)
In-Reply-To: <20250428203943.51dd39d5@canb.auug.org.au> (Stephen Rothwell's message of "Mon, 28 Apr 2025 20:39:43 +1000")
Hi Stephen,
"Stephen Rothwell" <sfr@canb.auug.org.au> writes:
> Hi all,
>
> After merging the rust-xarray tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
>
> I don't know what caused this, but it is presumably an interaction
> between this tree and the mm-unstable and drm-nova trees.
>
> I have dropped the rust-xarray tree for today.
The diff below should solve the conflict.
Best regards,
Andreas Hindborg
diff --git a/rust/kernel/auxiliary.rs b/rust/kernel/auxiliary.rs
index 5c072960dee0..bc94850ef322 100644
--- a/rust/kernel/auxiliary.rs
+++ b/rust/kernel/auxiliary.rs
@@ -73,7 +73,9 @@ extern "C" fn probe_callback(
// Let the `struct auxiliary_device` own a reference of the driver's private data.
// SAFETY: By the type invariant `adev.as_raw` returns a valid pointer to a
// `struct auxiliary_device`.
- unsafe { bindings::auxiliary_set_drvdata(adev.as_raw(), data.into_foreign()) };
+ unsafe {
+ bindings::auxiliary_set_drvdata(adev.as_raw(), data.into_foreign().cast())
+ };
}
Err(err) => return Error::to_errno(err),
}
@@ -89,7 +91,7 @@ extern "C" fn remove_callback(adev: *mut bindings::auxiliary_device) {
// SAFETY: `remove_callback` is only ever called after a successful call to
// `probe_callback`, hence it's guaranteed that `ptr` points to a valid and initialized
// `KBox<T>` pointer created through `KBox::into_foreign`.
- drop(unsafe { KBox::<T>::from_foreign(ptr) });
+ drop(unsafe { KBox::<T>::from_foreign(ptr.cast()) });
}
}
diff --git a/rust/kernel/miscdevice.rs b/rust/kernel/miscdevice.rs
index a4bc6016f037..f33c13c3ff97 100644
--- a/rust/kernel/miscdevice.rs
+++ b/rust/kernel/miscdevice.rs
@@ -253,7 +253,7 @@ impl<T: MiscDevice> MiscdeviceVTable<T> {
// SAFETY: This is a Rust Miscdevice, so we call `into_foreign` in `open` and
// `from_foreign` in `release`, and `fops_mmap` is guaranteed to be called between those
// two operations.
- let device = unsafe { <T::Ptr as ForeignOwnable>::borrow(private) };
+ let device = unsafe { <T::Ptr as ForeignOwnable>::borrow(private.cast()) };
// SAFETY: The caller provides a vma that is undergoing initial VMA setup.
let area = unsafe { VmaNew::from_raw(vma) };
// SAFETY:
next prev parent reply other threads:[~2025-04-28 12:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tAJ0jyptJ0jLaRp9siDw8y2iw3S7GeuC05Uncum-qihlIKfCfEVhQbGNuTengQ0kWpnNp7OoTITxbEdf6nDTCw==@protonmail.internalid>
2025-04-28 10:39 ` linux-next: build failure after merge of the rust-xarray tree Stephen Rothwell
2025-04-28 10:41 ` Stephen Rothwell
2025-04-28 12:25 ` Andreas Hindborg [this message]
2025-04-29 7:44 ` Stephen Rothwell
2025-04-29 15:33 ` Miguel Ojeda
2025-05-01 8:32 ` Stephen Rothwell
2025-05-01 9:02 ` Miguel Ojeda
2025-04-30 10:23 Stephen Rothwell
2025-04-30 10:42 ` Viresh Kumar
2025-05-01 8:29 ` Stephen Rothwell
2025-05-01 9:41 ` Andreas Hindborg
2025-05-01 10:24 ` Viresh Kumar
2025-05-01 12:19 ` Stephen Rothwell
2025-05-02 5:17 ` Viresh Kumar
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=877c344gmp.fsf@kernel.org \
--to=a.hindborg@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dakr@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=sfr@canb.auug.org.au \
/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