Re: [PATCH] rust: io: convert ResourceSize to newtype
From: kernel test robot
Date: Mon Dec 08 2025 - 13:49:50 EST
Hi Moritz,
kernel test robot noticed the following build errors:
[auto build test ERROR on 473b9f331718267815649cd93801da832200db71]
url: https://github.com/intel-lab-lkp/linux/commits/Moritz-Zielke-via-B4-Relay/rust-io-convert-ResourceSize-to-newtype/20251204-012104
base: 473b9f331718267815649cd93801da832200db71
patch link: https://lore.kernel.org/r/20251203-res-size-newtype-v1-1-22ed0b8a7a18%40gmail.com
patch subject: [PATCH] rust: io: convert ResourceSize to newtype
config: um-randconfig-r064-20251207 (https://download.01.org/0day-ci/archive/20251209/202512090237.rE4zx0Ob-lkp@xxxxxxxxx/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project a805147ac1ba123916de182babb0831fbb148756)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251209/202512090237.rE4zx0Ob-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512090237.rE4zx0Ob-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> error[E0605]: non-primitive cast: `ResourceSize` as `usize`
--> drivers/gpu/nova-core/firmware/gsp.rs:234:25
|
234 | let num_pages = (sg_entry.dma_len() as usize).div_ceil(GSP_PAGE_SIZE);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki