mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
rust: tests: drop 'use crate' in bitmap and atomic KUnit tests
The following patch makes usage of macros::kunit_tests crate conditional on the corresponding configs. When the configs are disabled, compiler warns on unused crate. So, embed it in unit test declaration. Signed-off-by: Yury Norov <ynorov@nvidia.com> Reviewed-by: David Gow <david@davidgow.net> Acked-by: Gary Guo <gary@garyguo.net> Link: https://patch.msgid.link/20260417031531.315281-2-ynorov@nvidia.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
838a0871cb
commit
90b67443f0
|
|
@ -499,9 +499,7 @@ pub fn next_zero_bit(&self, start: usize) -> Option<usize> {
|
|||
}
|
||||
}
|
||||
|
||||
use macros::kunit_tests;
|
||||
|
||||
#[kunit_tests(rust_kernel_bitmap)]
|
||||
#[macros::kunit_tests(rust_kernel_bitmap)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use kernel::alloc::flags::GFP_KERNEL;
|
||||
|
|
|
|||
|
|
@ -154,9 +154,7 @@ fn rhs_into_delta(rhs: usize) -> isize_atomic_repr {
|
|||
}
|
||||
}
|
||||
|
||||
use crate::macros::kunit_tests;
|
||||
|
||||
#[kunit_tests(rust_atomics)]
|
||||
#[macros::kunit_tests(rust_atomics)]
|
||||
mod tests {
|
||||
use super::super::*;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user