All of lore.kernel.org
 help / color / mirror / Atom feed
* [norov:bitmap_param 20/21] error[E0308]: mismatched types
@ 2026-07-22  7:24 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-22  7:24 UTC (permalink / raw)
  To: Yury Norov; +Cc: oe-kbuild-all

Hi Yury,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://github.com/norov/linux bitmap_param
head:   2ebf9d0d17a23d79cfabad902c9bf18f47c2adc9
commit: a13ae5f39450bd51f39aa7519689c3372e8225f0 [20/21] bitmap: use unsigned long for bit indices and sizes
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260722/202607220950.H3Z5brzF-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260722/202607220950.H3Z5brzF-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/202607220950.H3Z5brzF-lkp@intel.com/

All errors (new ones prefixed by >>):

>> error[E0308]: mismatched types
   --> rust/kernel/bitmap.rs:260:52
   |
   260 |         let ptr = unsafe { bindings::bitmap_zalloc(nbits_u32, flags.as_raw()) };
   |                            ----------------------- ^^^^^^^^^ expected `usize`, found `u32`
   |                            |
   |                            arguments to this function are incorrect
   |
   note: function defined here
   --> rust/bindings/bindings_generated.rs:24157:12
   |
   24157 |     pub fn bitmap_zalloc(nbits: ffi::c_ulong, flags: gfp_t) -> *mut ffi::c_ulong;
   |            ^^^^^^^^^^^^^
   help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
   |
   260 |         let ptr = unsafe { bindings::bitmap_zalloc(nbits_u32.try_into().unwrap(), flags.as_raw()) };
   |                                                             ++++++++++++++++++++

--
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:[~2026-07-22  7:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22  7:24 [norov:bitmap_param 20/21] error[E0308]: mismatched types kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.