Re: error[E0560]: struct `bindings::file_operations` has no field named `compat_ioctl`
From: Alice Ryhl
Date: Mon Dec 01 2025 - 05:06:30 EST
On Sun, Nov 30, 2025 at 08:47:52AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 6bda50f4333fa61c07f04f790fdd4e2c9f4ca610
> commit: f893691e742688ae21ad597c5bba13bef54706cd rust: miscdevice: add base miscdevice abstraction
> date: 1 year, 2 months ago
> config: arm64-randconfig-r073-20251130 (https://download.01.org/0day-ci/archive/20251130/202511300859.35d9m0hj-lkp@xxxxxxxxx/config)
> compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project b3428bb966f1de8aa48375ffee0eba04ede133b7)
> rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251130/202511300859.35d9m0hj-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/202511300859.35d9m0hj-lkp@xxxxxxxxx/
>
> All errors (new ones prefixed by >>):
>
> >> error[E0560]: struct `bindings::file_operations` has no field named `compat_ioctl`
> --> rust/kernel/miscdevice.rs:161:13
> |
> 161 | compat_ioctl: if T::HAS_COMPAT_IOCTL {
> | ^^^^^^^^^^^^ `bindings::file_operations` does not have this field
> |
> = note: available fields are: `_address`
Hmm, that's weird. Use of compat_ioctl in this file is guarded behind
CONFIG_COMPAT, which should be sufficient. And this doesn't seem to just
be another UML failure.
Any ideas?
Alice