warning: associated items `zeroed` and `as_raw` are never used
kernel test robot
build bottree: https://github.com/AsahiLinux/linux bits/250-aop head: fc24f7e1a3f10a336872c79b3772930633b0205c commit: a5b288a93a0b1675fb51d8b7cdff4c1dfd4314e1 [18/50] rust: io: resource: Add owned Resource initialiser config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20261126/[email protected]/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/20261126/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> warning: associated items `zeroed` and `as_raw` are never used
--> rust/kernel/io/resource.rs:83:19
|
81 | impl Resource {
| ------------- associated items in this implementation
82 | /// Create a new zeroed [`Resource`]
83 | pub(crate) fn zeroed() -> Self { | ^^^^^^
...
90 | pub(crate) fn as_raw(&self) -> *mut bindings::resource {
| ^^^^^^
|
= note: #[warn(dead_code)] (part of #[warn(unused)]) on by default
--
>> warning: used a field initializer for a tuple struct
--> rust/kernel/io/resource.rs:84:9
|
84 | / Resource {
85 | | 0: Opaque::<bindings::resource>::zeroed(),
86 | | }
| |_________^ help: use tuple initialization: `Resource(Opaque::<bindings::resource>::zeroed())`
| = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.96.0/index.html#init_numbered_fields
= note: -W clippy::init-numbered-fields implied by -W clippy::all
= help: to override -W clippy::all add #[allow(clippy::init_numbered_fields)]
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki