diff options
| author | Alvin Sun <alvin.sun@linux.dev> | 2026-08-11 14:39:46 +0800 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2026-08-12 09:36:26 +0200 |
| commit | 7d3e99e93382f1a49eab5afe78586a66907e4ff3 (patch) | |
| tree | b1ed8619b752857ccfaf02a4d81ce85f9447add3 /tools/perf/scripts/python/flamegraph.py | |
| parent | 98f256e2726262473bfc9e24f3f5cd3509424da4 (diff) | |
rust: macros: auto-insert OwnerModule in #[vtable]
Auto-add `type OwnerModule: ::kernel::ModuleMetadata;` as a required
associated type on the trait side if not already defined, and
auto-insert `type OwnerModule = crate::LocalModule;` on the impl side
if not explicitly provided, eliminating the need to manually declare
and implement `OwnerModule` in every vtable trait and impl.
Assisted-by: opencode:glm-5.2
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Suggested-by: Gary Guo <gary@garyguo.net>
Link: https://lore.kernel.org/all/DIMMWHUOLPSH.13JFRHDKDQJGO@garyguo.net
Reviewed-by: Gary Guo <gary@garyguo.net>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Alvin Sun <alvin.sun@linux.dev>
Link: https://patch.msgid.link/20260811-fix-fops-owner-v10-4-7e71776f9dbe@linux.dev
[ Fixed `rusttest` by adding a dummy `LocalModule`. Removed interim
`#[allow(dead_code)]`. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
