mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rudraksha Gupta <guptarud@gmail.com>
To: linux-kernel@vger.kernel.org,
	Linux regressions mailing list <regressions@lists.linux.dev>,
	rust-for-linux@vger.kernel.org, Miguel Ojeda <ojeda@kernel.org>
Subject: Re: REGRESSION: armv7 build mismatched types
Date: Thu, 29 May 2025 23:43:55 -0700	[thread overview]
Message-ID: <e70e3c60-4a5e-4635-a21e-c2438abf2a5c@gmail.com> (raw)
In-Reply-To: <700ebe13-c2d3-48e3-800f-8dc327efb6fc@gmail.com>

Unsure why the formatting got messed up. Retrying a second time (if this 
doesn't work, please look at the logs and excuse me).


   RUSTC L rust/ffi.o
   RUSTC L rust/build_error.o
   RUSTC L rust/pin_init.o
   RUSTC L rust/bindings.o
   RUSTC L rust/uapi.o
   EXPORTS rust/exports_bindings_generated.h
   RUSTC L rust/kernel.o
error[E0308]: mismatched types
    --> rust/kernel/lib.rs:234:45
     |
234 |         $crate::assert_same_type(field_ptr, (&raw const 
(*container_ptr).$($fields)*).cast_mut());
     |         ------------------------ --------- 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*const 
drm_device`, found `*mut Opaque<drm_device>`
     |         |                        |
     |         |                        expected all arguments to be 
this `*const drm_device` type because they need to match the type of 
this parameter
     |         arguments to this function are incorrect
     |
    ::: rust/kernel/drm/device.rs:140:18
     |
140 |         unsafe { crate::container_of!(ptr, Self, dev) }.cast_mut()
     |                  ------------------------------------ in this 
macro invocation
     |
     = note: expected raw pointer `*const drm_device`
                found raw pointer `*mut Opaque<drm_device>`
note: function defined here
    --> rust/kernel/lib.rs:241:8
     |
241 | pub fn assert_same_type<T>(_: T, _: T) {}
     |        ^^^^^^^^^^^^^^^^ -  ----  ---- this parameter needs to 
match the `*const drm_device` type of parameter #1
     |                         |  |
     |                         |  parameter #2 needs to match the 
`*const drm_device` type of this parameter
     |                         parameter #1 and parameter #2 both 
reference this parameter `T`
     = note: this error originates in the macro `crate::container_of` 
(in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> rust/kernel/lib.rs:234:45
     |
234 |         $crate::assert_same_type(field_ptr, (&raw const 
(*container_ptr).$($fields)*).cast_mut());
     |         ------------------------ --------- 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*mut 
drm_gem_object`, found `*mut Opaque<drm_gem_object>`
     |         |                        |
     |         |                        expected all arguments to be 
this `*mut drm_gem_object` type because they need to match the type of 
this parameter
     |         arguments to this function are incorrect
     |
    ::: rust/kernel/drm/gem/mod.rs:130:20
     |
130 |         unsafe { &*crate::container_of!(self_ptr, Object<T>, obj) }
     | ---------------------------------------------- in this macro 
invocation
     |
     = note: expected raw pointer `*mut drm_gem_object`
                found raw pointer `*mut Opaque<drm_gem_object>`
note: function defined here
    --> rust/kernel/lib.rs:241:8
     |
241 | pub fn assert_same_type<T>(_: T, _: T) {}
     |        ^^^^^^^^^^^^^^^^ -  ----  ---- this parameter needs to 
match the `*mut drm_gem_object` type of parameter #1
     |                         |  |
     |                         |  parameter #2 needs to match the `*mut 
drm_gem_object` type of this parameter
     |                         parameter #1 and parameter #2 both 
reference this parameter `T`
     = note: this error originates in the macro `crate::container_of` 
(in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> rust/kernel/lib.rs:234:45
     |
234 |         $crate::assert_same_type(field_ptr, (&raw const 
(*container_ptr).$($fields)*).cast_mut());
     |         ------------------------ --------- 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*mut 
drm_gem_object`, found `*mut Opaque<drm_gem_object>`
     |         |                        |
     |         |                        expected all arguments to be 
this `*mut drm_gem_object` type because they need to match the type of 
this parameter
     |         arguments to this function are incorrect
     |
    ::: rust/kernel/drm/gem/mod.rs:273:29
     |
273 |         let this = unsafe { crate::container_of!(obj, Self, obj) };
     | ------------------------------------ in this macro invocation
     |
     = note: expected raw pointer `*mut drm_gem_object`
                found raw pointer `*mut Opaque<drm_gem_object>`
note: function defined here
    --> rust/kernel/lib.rs:241:8
     |
241 | pub fn assert_same_type<T>(_: T, _: T) {}
     |        ^^^^^^^^^^^^^^^^ -  ----  ---- this parameter needs to 
match the `*mut drm_gem_object` type of parameter #1
     |                         |  |
     |                         |  parameter #2 needs to match the `*mut 
drm_gem_object` type of this parameter
     |                         parameter #1 and parameter #2 both 
reference this parameter `T`
     = note: this error originates in the macro `crate::container_of` 
(in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0308`.
make[2]: *** [rust/Makefile:538: rust/kernel.o] Error 1
make[1]: *** 
[/home/pmos/build/src/linux-next-next-20250530/Makefile:1285: prepare] 
Error 2
make: *** [Makefile:248: __sub-make] Error 2


  reply	other threads:[~2025-05-30  6:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-30  6:23 Rudraksha Gupta
2025-05-30  6:43 ` Rudraksha Gupta [this message]
2025-05-30  7:46 ` Thorsten Leemhuis
2025-05-30  9:53 ` Miguel Ojeda
2025-06-03 12:51   ` Thorsten Leemhuis
2025-06-03 13:04     ` Miguel Ojeda
2025-06-03 21:31       ` Stephen Rothwell
2025-06-03 22:26         ` Miguel Ojeda
2025-06-04 10:46         ` Miguel Ojeda
2025-06-04 10:59           ` Rudraksha Gupta

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=e70e3c60-4a5e-4635-a21e-c2438abf2a5c@gmail.com \
    --to=guptarud@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=rust-for-linux@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®