mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andreas Hindborg <a.hindborg@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Danilo Krummrich <dakr@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the rust-xarray tree
Date: Mon, 28 Apr 2025 20:41:01 +1000	[thread overview]
Message-ID: <20250428204101.40a35c07@canb.auug.org.au> (raw)
In-Reply-To: <20250428203943.51dd39d5@canb.auug.org.au>

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

Hi all,

On Mon, 28 Apr 2025 20:39:43 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the rust-xarray tree, today's linux-next build (x86_64
> allmodconfig) failed like this:

error[E0308]: mismatched types
  --> rust/kernel/auxiliary.rs:76:73
   |
55 | impl<T: Driver + 'static> Adapter<T> {
   |      - found this type parameter
...
76 |                 unsafe { bindings::auxiliary_set_drvdata(adev.as_raw(), data.into_foreign()) };
   |                          -------------------------------                ^^^^^^^^^^^^^^^^^^^ expected `*mut c_void`, found `*mut T`
   |                          |
   |                          arguments to this function are incorrect
   |
   = note: expected raw pointer `*mut c_void`
              found raw pointer `*mut T`
note: function defined here
  --> rust/bindings/bindings_helpers_generated.rs:5:12
   |
5  |     pub fn auxiliary_set_drvdata(adev: *mut auxiliary_device, data: *mut ffi::c_void);
   |            ^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
  --> rust/kernel/auxiliary.rs:92:47
   |
55 | impl<T: Driver + 'static> Adapter<T> {
   |      - expected this type parameter
...
92 |         drop(unsafe { KBox::<T>::from_foreign(ptr) });
   |                       ----------------------- ^^^ expected `*mut T`, found `*mut c_void`
   |                       |
   |                       arguments to this function are incorrect
   |
   = note: expected raw pointer `*mut T`
              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;
   |               ^^^^^^^^^^^^

error[E0308]: mismatched types
   --> rust/kernel/miscdevice.rs:256:66
    |
256 |         let device = unsafe { <T::Ptr as ForeignOwnable>::borrow(private) };
    |                               ---------------------------------- ^^^^^^^ expected `*mut <... as ForeignOwnable>::PointedTo`, found `*mut c_void`
    |                               |
    |                               arguments to this function are incorrect
    |
    = note: expected raw pointer `*mut <<T as MiscDevice>::Ptr as ForeignOwnable>::PointedTo`
               found raw pointer `*mut c_void`
    = help: consider constraining the associated type `<<T as MiscDevice>::Ptr as ForeignOwnable>::PointedTo` to `c_void` or calling a method that returns `<<T as MiscDevice>::Ptr as ForeignOwnable>::PointedTo`
    = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
note: associated function defined here
   --> rust/kernel/types.rs:98:15
    |
98  |     unsafe fn borrow<'a>(ptr: *mut Self::PointedTo) -> Self::Borrowed<'a>;
    |               ^^^^^^

error: aborting due to 3 previous errors

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

> 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.

-- 
Cheers,
Stephen Rothwell

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

  reply	other threads:[~2025-04-28 10:41 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 ` Stephen Rothwell
2025-04-28 10:41   ` Stephen Rothwell [this message]
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
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=20250428204101.40a35c07@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=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 \
    /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

all inboxes | Powered by JetHome®