public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the rust-xarray tree
@ 2025-04-30 10:23 Stephen Rothwell
  2025-04-30 10:42 ` Viresh Kumar
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2025-04-30 10:23 UTC (permalink / raw)
  To: Andreas Hindborg, Viresh Kumar
  Cc: Tamir Duberstein, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

After merging the rust-xarray tree, today's linux-next build (x86_64
allmodconfig) failed like this:

rror[E0308]: mismatched types
   --> rust/kernel/cpufreq.rs:633:37
    |
633 |             Some(unsafe { T::borrow(self.as_ref().driver_data) })
    |                           --------- ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*mut <... as ForeignOwnable>::PointedTo`, found `*mut c_void`
    |                           |
    |                           arguments to this function are incorrect
    |
    = note: expected raw pointer `*mut <T as ForeignOwnable>::PointedTo`
               found raw pointer `*mut c_void`
note: associated function defined here
   --> rust/kernel/types.rs:98:15
    |
98  |     unsafe fn borrow<'a>(ptr: *mut Self::PointedTo) -> Self::Borrowed<'a>;
    |               ^^^^^^
help: consider constraining the associated type `<T as ForeignOwnable>::PointedTo` to `c_void`
    |
628 |     pub fn data<T: ForeignOwnable<PointedTo = c_void>>(&mut self) -> Option<<T>::Borrowed<'_>> {
    |                                  ++++++++++++++++++++

error[E0308]: mismatched types
   --> rust/kernel/cpufreq.rs:660:62
    |
660 |                 unsafe { <T as ForeignOwnable>::from_foreign(self.as_ref().driver_data) },
    |                          ----------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*mut <... as ForeignOwnable>::PointedTo`, found `*mut c_void`
    |                          |
    |                          arguments to this function are incorrect
    |
    = note: expected raw pointer `*mut <T as ForeignOwnable>::PointedTo`
               found raw pointer `*mut c_void`
note: associated function defined here
   --> rust/kernel/types.rs:63:15
    |
63  |     unsafe fn from_foreign(ptr: *mut Self::PointedTo) -> Self;
    |               ^^^^^^^^^^^^
help: consider constraining the associated type `<T as ForeignOwnable>::PointedTo` to `c_void`
    |
653 |     fn clear_data<T: ForeignOwnable<PointedTo = c_void>>(&mut self) -> Option<T> {
    |                                    ++++++++++++++++++++

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.

Caused by commit

  a68f46e83747 ("rust: types: add `ForeignOwnable::PointedTo`")

interacting with commit

  254df142ab42 ("rust: cpufreq: Add initial abstractions for cpufreq framework")

from the cpufreq-arm tree.

I don't know how to fix this up, so I have dropped the rust-xarray tree
for today.

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <tAJ0jyptJ0jLaRp9siDw8y2iw3S7GeuC05Uncum-qihlIKfCfEVhQbGNuTengQ0kWpnNp7OoTITxbEdf6nDTCw==@protonmail.internalid>]

end of thread, other threads:[~2025-05-02  5:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30 10:23 linux-next: build failure after merge of the rust-xarray tree 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
     [not found] <tAJ0jyptJ0jLaRp9siDw8y2iw3S7GeuC05Uncum-qihlIKfCfEVhQbGNuTengQ0kWpnNp7OoTITxbEdf6nDTCw==@protonmail.internalid>
2025-04-28 10:39 ` Stephen Rothwell
2025-04-28 10:41   ` Stephen Rothwell
2025-04-28 12:25   ` Andreas Hindborg
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox