Diff in rust/kernel/sound/card.rs:4:
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git test/sound-rust-v7.3 head: 070444a8abf14da700680a5331d0a95cd11e578b commit: 8c3e8dd553f3af45e664df85daa4a3e065d274c1 [11/56] ALSA: rust: add sound card abstraction (kernel::sound::card) config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20261106/[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/20261106/[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 errors (new ones prefixed by >>):
PATH=/opt/cross/clang-22/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
INFO PATH=/opt/cross/rustc-1.96.0-bindgen-0.72.1/cargo/bin:/opt/cross/clang-22/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/usr/bin/timeout -k 100 12h /usr/bin/make KCFLAGS=\ -fno-crash-diagnostics\ -Wno-error=return-type\ -Wreturn-type\ -funsigned-char\ -Wundef\ -falign-functions=64 W=1 --keep-going LLVM=1 -j32 -C source O=/kbuild/obj/consumer/x86_64-rhel-9.4-rust ARCH=x86_64 SHELL=/bin/bash rustfmtcheck
make: Entering directory '/kbuild/src'
make[1]: Entering directory '/kbuild/obj/consumer/x86_64-rhel-9.4-rust'
>> Diff in rust/kernel/sound/card.rs:4:
//!
//! C header: [`include/sound/core.h`](srctree/include/sound/core.h)-use crate::{
- bindings,
- device,
- error::to_result,
- prelude::*,
- types::Opaque,
- ThisModule,
-};
+use crate::{bindings, device, error::to_result, prelude::*, types::Opaque, ThisModule};
/// A sound card.
///
Diff in rust/kernel/sound/card.rs:67:
pub fn set_driver(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `driver` is a fixed-size array of 16 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).driver.as_mut_ptr() as *mut u8,
- 16,
- );
+ s.copy_to_raw((*self.as_raw()).driver.as_mut_ptr() as *mut u8, 16);
}
} Diff in rust/kernel/sound/card.rs:78:
pub fn set_short_name(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `shortname` is a fixed-size array of 32 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).shortname.as_mut_ptr() as *mut u8,
- 32,
- );
+ s.copy_to_raw((*self.as_raw()).shortname.as_mut_ptr() as *mut u8, 32);
}
} Diff in rust/kernel/sound/card.rs:89:
pub fn set_long_name(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `longname` is a fixed-size array of 80 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).longname.as_mut_ptr() as *mut u8,
- 80,
- );
+ s.copy_to_raw((*self.as_raw()).longname.as_mut_ptr() as *mut u8, 80);
}
} Diff in rust/kernel/sound/card.rs:100:
pub fn set_mixer_name(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `mixername` is a fixed-size array of 80 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).mixername.as_mut_ptr() as *mut u8,
- 80,
- );
+ s.copy_to_raw((*self.as_raw()).mixername.as_mut_ptr() as *mut u8, 80);
}
} Diff in rust/kernel/sound/card.rs:116:
pub fn as_raw(&self) -> *mut bindings::snd_card {
self.0.get()
}
-
} // SAFETY: `Card` holds only an `Opaque<snd_card>`, whose thread-safety is
>> Diff in rust/kernel/sound/card.rs:4:
//!
//! C header: [`include/sound/core.h`](srctree/include/sound/core.h)-use crate::{
- bindings,
- device,
- error::to_result,
- prelude::*,
- types::Opaque,
- ThisModule,
-};
+use crate::{bindings, device, error::to_result, prelude::*, types::Opaque, ThisModule};
/// A sound card.
///
Diff in rust/kernel/sound/card.rs:67:
pub fn set_driver(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `driver` is a fixed-size array of 16 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).driver.as_mut_ptr() as *mut u8,
- 16,
- );
+ s.copy_to_raw((*self.as_raw()).driver.as_mut_ptr() as *mut u8, 16);
}
} Diff in rust/kernel/sound/card.rs:78:
pub fn set_short_name(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `shortname` is a fixed-size array of 32 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).shortname.as_mut_ptr() as *mut u8,
- 32,
- );
+ s.copy_to_raw((*self.as_raw()).shortname.as_mut_ptr() as *mut u8, 32);
}
} Diff in rust/kernel/sound/card.rs:89:
pub fn set_long_name(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `longname` is a fixed-size array of 80 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).longname.as_mut_ptr() as *mut u8,
- 80,
- );
+ s.copy_to_raw((*self.as_raw()).longname.as_mut_ptr() as *mut u8, 80);
}
} Diff in rust/kernel/sound/card.rs:100:
pub fn set_mixer_name(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `mixername` is a fixed-size array of 80 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).mixername.as_mut_ptr() as *mut u8,
- 80,
- );
+ s.copy_to_raw((*self.as_raw()).mixername.as_mut_ptr() as *mut u8, 80);
}
} Diff in rust/kernel/sound/card.rs:116:
pub fn as_raw(&self) -> *mut bindings::snd_card {
self.0.get()
}
-
} // SAFETY: `Card` holds only an `Opaque<snd_card>`, whose thread-safety is
Diff in rust/kernel/pm.rs:24:
types::ForeignOwnable, //
}; -use core::{
- cell::UnsafeCell,
- marker::PhantomData
-};
+use core::{cell::UnsafeCell, marker::PhantomData};
/// Runtime Power Management modes that determine how a particular PM
/// transition is to be carried out.
>> Diff in rust/kernel/sound/card.rs:4:
//!
//! C header: [`include/sound/core.h`](srctree/include/sound/core.h)-use crate::{
- bindings,
- device,
- error::to_result,
- prelude::*,
- types::Opaque,
- ThisModule,
-};
+use crate::{bindings, device, error::to_result, prelude::*, types::Opaque, ThisModule};
/// A sound card.
///
Diff in rust/kernel/sound/card.rs:67:
pub fn set_driver(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `driver` is a fixed-size array of 16 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).driver.as_mut_ptr() as *mut u8,
- 16,
- );
+ s.copy_to_raw((*self.as_raw()).driver.as_mut_ptr() as *mut u8, 16);
}
} Diff in rust/kernel/sound/card.rs:78:
pub fn set_short_name(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `shortname` is a fixed-size array of 32 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).shortname.as_mut_ptr() as *mut u8,
- 32,
- );
+ s.copy_to_raw((*self.as_raw()).shortname.as_mut_ptr() as *mut u8, 32);
}
} Diff in rust/kernel/sound/card.rs:89:
pub fn set_long_name(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `longname` is a fixed-size array of 80 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).longname.as_mut_ptr() as *mut u8,
- 80,
- );
+ s.copy_to_raw((*self.as_raw()).longname.as_mut_ptr() as *mut u8, 80);
}
} Diff in rust/kernel/sound/card.rs:100:
pub fn set_mixer_name(&self, s: &CStr) {
// SAFETY: `self.as_raw()` is valid; `mixername` is a fixed-size array of 80 bytes.
unsafe {
- s.copy_to_raw(
- (*self.as_raw()).mixername.as_mut_ptr() as *mut u8,
- 80,
- );
+ s.copy_to_raw((*self.as_raw()).mixername.as_mut_ptr() as *mut u8, 80);
}
} Diff in rust/kernel/sound/card.rs:116:
pub fn as_raw(&self) -> *mut bindings::snd_card {
self.0.get()
}
-
} // SAFETY: `Card` holds only an `Opaque<snd_card>`, whose thread-safety is
Diff in rust/kernel/pm.rs:24:
types::ForeignOwnable, //
}; -use core::{
- cell::UnsafeCell,
- marker::PhantomData
-};
+use core::{cell::UnsafeCell, marker::PhantomData};
/// Runtime Power Management modes that determine how a particular PM
/// transition is to be carried out. make[2]: *** [Makefile:2038: rustfmt] Error 123
make[2]: Target 'rustfmtcheck' not remade because of errors. make[1]: Leaving directory '/kbuild/obj/consumer/x86_64-rhel-9.4-rust' make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Target 'rustfmtcheck' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target 'rustfmtcheck' not remade because of errors.
make: Leaving directory '/kbuild/src'
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki