Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH] rust: pin-init: add references to previously initialized fields
       [not found] <20250905140047.3325945-1-lossin@kernel.org>
@ 2025-09-06 14:23 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-09-06 14:23 UTC (permalink / raw)
  To: Benno Lossin, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, Fiona Behrens, Alban Kurti
  Cc: llvm, oe-kbuild-all, rust-for-linux, linux-kernel

Hi Benno,

kernel test robot noticed the following build errors:

[auto build test ERROR on 8f5ae30d69d7543eee0d70083daf4de8fe15d585]

url:    https://github.com/intel-lab-lkp/linux/commits/Benno-Lossin/rust-pin-init-add-references-to-previously-initialized-fields/20250905-220242
base:   8f5ae30d69d7543eee0d70083daf4de8fe15d585
patch link:    https://lore.kernel.org/r/20250905140047.3325945-1-lossin%40kernel.org
patch subject: [PATCH] rust: pin-init: add references to previously initialized fields
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250906/202509062218.Mo9Wsmcd-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250906/202509062218.Mo9Wsmcd-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509062218.Mo9Wsmcd-lkp@intel.com/

All errors (new ones prefixed by >>):

>> error[E0308]: mismatched types
   --> rust/kernel/devres.rs:154:66
   |
   154 |                     bindings::devm_add_action(dev.as_raw(), Some(callback), inner.cast())
   |                                                             ---- ^^^^^^^^ expected fn pointer, found `&mut unsafe extern "C" fn(*mut c_void)`
   |                                                             |
   |                                                             arguments to this enum variant are incorrect
   |
   = note:     expected fn pointer `unsafe extern "C" fn(_)`
   found mutable reference `&mut unsafe extern "C" fn(_)`
   help: the type constructed contains `&mut unsafe extern "C" fn(*mut ffi::c_void)` due to the type of the argument passed
   --> rust/kernel/devres.rs:154:61
   |
   154 |                     bindings::devm_add_action(dev.as_raw(), Some(callback), inner.cast())
   |                                                             ^^^^^--------^
   |                                                                  |
   |                                                                  this argument influences the type of `Some`
   note: tuple variant defined here
   --> /opt/cross/rustc-1.88.0-bindgen-0.72.0/rustup/toolchains/1.88.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:597:5
   |
   597 |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
   |     ^^^^
   help: consider dereferencing the borrow
   |
   154 |                     bindings::devm_add_action(dev.as_raw(), Some(*callback), inner.cast())
   |                                                                  +

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-06 14:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250905140047.3325945-1-lossin@kernel.org>
2025-09-06 14:23 ` [PATCH] rust: pin-init: add references to previously initialized fields kernel test robot

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