Re: [PATCH v5 3/6] rust: bitmap: rename IdPool::new() to with_capacity()

From: kernel test robot

Date: Thu Nov 13 2025 - 20:31:37 EST


Hi Alice,

kernel test robot noticed the following build errors:

[auto build test ERROR on 211ddde0823f1442e4ad052a2f30f050145ccada]

url: https://github.com/intel-lab-lkp/linux/commits/Alice-Ryhl/rust-bitmap-add-MAX_LEN-and-MAX_INLINE_LEN-constants/20251112-205752
base: 211ddde0823f1442e4ad052a2f30f050145ccada
patch link: https://lore.kernel.org/r/20251112-binder-bitmap-v5-3-8b9d7c7eca82%40google.com
patch subject: [PATCH v5 3/6] rust: bitmap: rename IdPool::new() to with_capacity()
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20251114/202511140825.Bbsm1dKT-lkp@xxxxxxxxx/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/20251114/202511140825.Bbsm1dKT-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/202511140825.Bbsm1dKT-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from kernel/sched/rq-offsets.c:5:
kernel/sched/sched.h:3743:18: warning: variable 'cpumask' set but not used [-Wunused-but-set-variable]
3743 | struct cpumask *cpumask;
| ^
1 warning generated.
>> error[E0425]: cannot find value `BITS_PER_LONG` in this scope
--> rust/kernel/id_pool.rs:103:43
|
103 | let num_ids = usize::max(num_ids, BITS_PER_LONG);
| ^^^^^^^^^^^^^ not found in this scope
|
help: consider importing one of these constants
|
7 + use crate::bindings::BITS_PER_LONG;
|
7 + use crate::uapi::BITS_PER_LONG;
|
7 + use bindings::BITS_PER_LONG;
|
7 + use uapi::BITS_PER_LONG;
|

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