[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202509121607.yxpZ3HBS-lkp@intel.com>
Date: Fri, 12 Sep 2025 16:41:14 +0800
From: kernel test robot <lkp@...el.com>
To: Onur Özkan <work@...rozkan.dev>,
rust-for-linux@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, daniel@...lak.dev,
dirk.behme@...bosch.com, felipe_life@...e.com, tamird@...il.com,
dakr@...nel.org, tmgross@...ch.edu, aliceryhl@...gle.com,
a.hindborg@...nel.org, lossin@...nel.org, bjorn3_gh@...tonmail.com,
gary@...yguo.net, boqun.feng@...il.com, alex.gaynor@...il.com,
ojeda@...nel.org,
Onur Özkan <work@...rozkan.dev>
Subject: Re: [PATCH v2 1/1] rust: refactor to_result to return the original
value
Hi Onur,
kernel test robot noticed the following build errors:
[auto build test ERROR on broonie-regulator/for-next]
[cannot apply to driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus rafael-pm/linux-next rafael-pm/bleeding-edge rust/alloc-next rust/rust-next char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus akpm-mm/mm-everything pci/next pci/for-linus rust/rust-block-next linus/master v6.17-rc5 next-20250912]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Onur-zkan/rust-refactor-to_result-to-return-the-original-value/20250910-010803
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
patch link: https://lore.kernel.org/r/20250909170013.16025-2-work%40onurozkan.dev
patch subject: [PATCH v2 1/1] rust: refactor to_result to return the original value
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250912/202509121607.yxpZ3HBS-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/20250912/202509121607.yxpZ3HBS-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509121607.yxpZ3HBS-lkp@intel.com/
All errors (new ones prefixed by >>):
>> error[E0277]: the trait bound `i32: From<()>` is not satisfied
--> rust/kernel/configfs.rs:181:17
|
>> 179 | crate::error::to_result(
| ----------------------- required by a bound introduced by this call
180 | // SAFETY: We initialized `this.subsystem` according to C API contract above.
181 | unsafe { bindings::configfs_register_subsystem(this.subsystem.get()) },
| ^^^^^^^^^-----------------------------------------------------------^^
| | |
| | this tail expression is of type `i32`
| the trait `From<()>` is not implemented for `i32`
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<CpuId>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= note: required for `()` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<()>`
= note: required for `()` to implement `TryInto<i32>`
note: required by a bound in `error::to_result`
--> rust/kernel/error.rs:382:15
|
380 | pub fn to_result<T>(code: T) -> Result<T>
| --------- required by a bound in this function
381 | where
382 | T: Copy + TryInto<i32>,
| ^^^^^^^^^^^^ required by this bound in `to_result`
--
>> error[E0277]: the trait bound `i32: From<()>` is not satisfied
--> rust/kernel/net/phy/reg.rs:122:19
|
122 | to_result(unsafe {
| _________---------_^
| | |
| | required by a bound introduced by this call
123 | | bindings::mdiobus_write((*phydev).mdio.bus, (*phydev).mdio.addr, self.0.into(), val)
| | ------------------------------------------------------------------------------------ this tail expression is of type `i32`
124 | | })
| |_________^ the trait `From<()>` is not implemented for `i32`
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<CpuId>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= note: required for `()` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<()>`
= note: required for `()` to implement `TryInto<i32>`
note: required by a bound in `error::to_result`
--> rust/kernel/error.rs:382:15
|
380 | pub fn to_result<T>(code: T) -> Result<T>
| --------- required by a bound in this function
381 | where
382 | T: Copy + TryInto<i32>,
| ^^^^^^^^^^^^ required by this bound in `to_result`
--
>> error[E0277]: the trait bound `i32: From<()>` is not satisfied
--> rust/kernel/net/phy/reg.rs:211:19
|
211 | to_result(unsafe {
| _________---------_^
| | |
| | required by a bound introduced by this call
212 | | bindings::phy_write_mmd(phydev, self.devad.0.into(), self.regnum.into(), val)
| | ----------------------------------------------------------------------------- this tail expression is of type `i32`
213 | | })
| |_________^ the trait `From<()>` is not implemented for `i32`
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<CpuId>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= note: required for `()` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<()>`
= note: required for `()` to implement `TryInto<i32>`
note: required by a bound in `error::to_result`
--> rust/kernel/error.rs:382:15
|
380 | pub fn to_result<T>(code: T) -> Result<T>
| --------- required by a bound in this function
381 | where
382 | T: Copy + TryInto<i32>,
| ^^^^^^^^^^^^ required by this bound in `to_result`
--
>> error[E0277]: the trait bound `i32: From<()>` is not satisfied
--> rust/kernel/net/phy.rs:219:19
|
219 | to_result(unsafe { bindings::genphy_soft_reset(phydev) })
| --------- ^^^^^^^^^-----------------------------------^^
| | | |
| | | this tail expression is of type `i32`
| | the trait `From<()>` is not implemented for `i32`
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<CpuId>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= note: required for `()` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<()>`
= note: required for `()` to implement `TryInto<i32>`
note: required by a bound in `error::to_result`
--> rust/kernel/error.rs:382:15
|
380 | pub fn to_result<T>(code: T) -> Result<T>
| --------- required by a bound in this function
381 | where
382 | T: Copy + TryInto<i32>,
| ^^^^^^^^^^^^ required by this bound in `to_result`
--
>> error[E0277]: the trait bound `i32: From<()>` is not satisfied
--> rust/kernel/net/phy.rs:227:19
|
227 | to_result(unsafe { bindings::phy_init_hw(phydev) })
| --------- ^^^^^^^^^-----------------------------^^
| | | |
| | | this tail expression is of type `i32`
| | the trait `From<()>` is not implemented for `i32`
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<CpuId>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= note: required for `()` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<()>`
= note: required for `()` to implement `TryInto<i32>`
note: required by a bound in `error::to_result`
--> rust/kernel/error.rs:382:15
|
380 | pub fn to_result<T>(code: T) -> Result<T>
| --------- required by a bound in this function
381 | where
382 | T: Copy + TryInto<i32>,
| ^^^^^^^^^^^^ required by this bound in `to_result`
--
>> error[E0277]: the trait bound `i32: From<()>` is not satisfied
--> rust/kernel/net/phy.rs:235:19
|
235 | to_result(unsafe { bindings::_phy_start_aneg(phydev) })
| --------- ^^^^^^^^^---------------------------------^^
| | | |
| | | this tail expression is of type `i32`
| | the trait `From<()>` is not implemented for `i32`
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<CpuId>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= note: required for `()` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<()>`
= note: required for `()` to implement `TryInto<i32>`
note: required by a bound in `error::to_result`
--> rust/kernel/error.rs:382:15
|
380 | pub fn to_result<T>(code: T) -> Result<T>
| --------- required by a bound in this function
381 | where
382 | T: Copy + TryInto<i32>,
| ^^^^^^^^^^^^ required by this bound in `to_result`
--
>> error[E0277]: the trait bound `i32: From<()>` is not satisfied
--> rust/kernel/net/phy.rs:243:19
|
243 | to_result(unsafe { bindings::genphy_resume(phydev) })
| --------- ^^^^^^^^^-------------------------------^^
| | | |
| | | this tail expression is of type `i32`
| | the trait `From<()>` is not implemented for `i32`
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<CpuId>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= note: required for `()` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<()>`
= note: required for `()` to implement `TryInto<i32>`
note: required by a bound in `error::to_result`
--> rust/kernel/error.rs:382:15
|
380 | pub fn to_result<T>(code: T) -> Result<T>
| --------- required by a bound in this function
381 | where
382 | T: Copy + TryInto<i32>,
| ^^^^^^^^^^^^ required by this bound in `to_result`
--
>> error[E0277]: the trait bound `i32: From<()>` is not satisfied
--> rust/kernel/net/phy.rs:251:19
|
251 | to_result(unsafe { bindings::genphy_suspend(phydev) })
| --------- ^^^^^^^^^--------------------------------^^
| | | |
| | | this tail expression is of type `i32`
| | the trait `From<()>` is not implemented for `i32`
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<CpuId>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= note: required for `()` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<()>`
= note: required for `()` to implement `TryInto<i32>`
note: required by a bound in `error::to_result`
--> rust/kernel/error.rs:382:15
|
380 | pub fn to_result<T>(code: T) -> Result<T>
| --------- required by a bound in this function
381 | where
382 | T: Copy + TryInto<i32>,
| ^^^^^^^^^^^^ required by this bound in `to_result`
--
>> error[E0277]: the trait bound `i32: From<()>` is not satisfied
--> rust/kernel/net/phy.rs:264:19
|
264 | to_result(unsafe { bindings::genphy_update_link(phydev) })
| --------- ^^^^^^^^^------------------------------------^^
| | | |
| | | this tail expression is of type `i32`
| | the trait `From<()>` is not implemented for `i32`
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<CpuId>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= note: required for `()` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<()>`
= note: required for `()` to implement `TryInto<i32>`
note: required by a bound in `error::to_result`
--> rust/kernel/error.rs:382:15
|
380 | pub fn to_result<T>(code: T) -> Result<T>
| --------- required by a bound in this function
381 | where
382 | T: Copy + TryInto<i32>,
| ^^^^^^^^^^^^ required by this bound in `to_result`
--
>> error[E0277]: the trait bound `i32: From<()>` is not satisfied
--> rust/kernel/net/phy.rs:272:19
|
272 | to_result(unsafe { bindings::genphy_read_lpa(phydev) })
| --------- ^^^^^^^^^---------------------------------^^
| | | |
| | | this tail expression is of type `i32`
| | the trait `From<()>` is not implemented for `i32`
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<CpuId>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= note: required for `()` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<()>`
= note: required for `()` to implement `TryInto<i32>`
note: required by a bound in `error::to_result`
--> rust/kernel/error.rs:382:15
|
380 | pub fn to_result<T>(code: T) -> Result<T>
| --------- required by a bound in this function
381 | where
382 | T: Copy + TryInto<i32>,
| ^^^^^^^^^^^^ required by this bound in `to_result`
--
>> error[E0277]: the trait bound `i32: From<()>` is not satisfied
--> rust/kernel/net/phy.rs:280:19
|
280 | to_result(unsafe { bindings::genphy_read_abilities(phydev) })
| --------- ^^^^^^^^^---------------------------------------^^
| | | |
| | | this tail expression is of type `i32`
| | the trait `From<()>` is not implemented for `i32`
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
`i32` implements `From<CpuId>`
`i32` implements `From<bool>`
`i32` implements `From<i16>`
`i32` implements `From<i8>`
`i32` implements `From<u16>`
`i32` implements `From<u8>`
= note: required for `()` to implement `Into<i32>`
= note: required for `i32` to implement `TryFrom<()>`
= note: required for `()` to implement `TryInto<i32>`
note: required by a bound in `error::to_result`
--> rust/kernel/error.rs:382:15
|
380 | pub fn to_result<T>(code: T) -> Result<T>
| --------- required by a bound in this function
381 | where
382 | T: Copy + TryInto<i32>,
| ^^^^^^^^^^^^ required by this bound in `to_result`
..
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists