Re: [PATCH v3] rust: add global lock support

From: kernel test robot
Date: Wed Sep 11 2024 - 10:11:23 EST


Hi Alice,

kernel test robot noticed the following build errors:

[auto build test ERROR on 93dc3be19450447a3a7090bd1dfb9f3daac3e8d2]

url: https://github.com/intel-lab-lkp/linux/commits/Alice-Ryhl/rust-add-global-lock-support/20240910-222519
base: 93dc3be19450447a3a7090bd1dfb9f3daac3e8d2
patch link: https://lore.kernel.org/r/20240910-static-mutex-v3-1-5bebd11bdf3b%40google.com
patch subject: [PATCH v3] rust: add global lock support
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240911/202409112144.dcfxjqII-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240911/202409112144.dcfxjqII-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/202409112144.dcfxjqII-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> error[E0432]: unresolved import `super::__static_lock_ty_MY_COUNTER`
--> rust/doctests_kernel_generated.rs:4818:1
|
4818 | / kernel::sync::global_lock! {
4819 | | // SAFETY: Initialized in module initializer before first use.
4820 | | static MY_COUNTER: Mutex<u32> = unsafe { uninit };
4821 | | value: 0;
4822 | | }
| |_^ no `__static_lock_ty_MY_COUNTER` in the root
|
= note: this error originates in the macro `$crate::global_lock` which comes from the expansion of the macro `kernel::sync::global_lock` (in Nightly builds, run with -Z macro-backtrace for more info)
--
>> error[E0432]: unresolved import `super::__static_lock_ty_MY_MUTEX`
--> rust/doctests_kernel_generated.rs:4886:1
|
4886 | / kernel::sync::global_lock! {
4887 | | // SAFETY: Initialized in module initializer before first use.
4888 | | static MY_MUTEX: Mutex<()> = unsafe { uninit };
4889 | | value: ();
4890 | | guard: MyGuard;
4891 | | locked_by: LockedByMyMutex;
4892 | | }
| |_^ no `__static_lock_ty_MY_MUTEX` in the root
|
= note: this error originates in the macro `$crate::global_lock` which comes from the expansion of the macro `kernel::sync::global_lock` (in Nightly builds, run with -Z macro-backtrace for more info)

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