Files
linux/rust
Danilo Krummrich a2595ed138 rust: kernel: add LocalModule fallback for #[vtable] impls
Like commit 98f256e272 ("rust: doctest: add LocalModule fallback
for #[vtable] ThisModule"), add another `LocalModule` struct with a
null-pointer `ModuleMetadata` `impl` for the `kernel` crate, so that
`crate::LocalModule` (auto-inserted by `#[vtable]`) resolves correctly
when there is no `module!` macro.

This will be needed by DRM to use `#[vtable]` `impl` blocks in KUnit
tests within the `kernel` crate [1].

Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/rust-for-linux/DKNAS52KYWLD.M15VEC6U0F6R@kernel.org/ [1]
[ Created commit out of the diff in the link above. Fixed the
  `clippy::undocumented_unsafe_blocks` lint by wrapping with a block
  like in the other commit too. Added `#[allow(dead_code)]` until we
  actually (and unconditionally, i.e. KUnit tests may be not enabled)
  use it. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2026-08-13 11:58:59 +02:00
..
2025-11-24 17:15:43 +01:00
2025-11-24 17:15:47 +01:00
2025-03-19 23:22:21 +01:00
2022-12-04 01:59:16 +01:00
2025-10-22 07:47:27 +02:00