diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2026-06-26 20:36:14 +0200 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-07-11 19:47:00 +0200 |
| commit | 7488dc14b05aa4a478497ee1b498a4a46ab9428c (patch) | |
| tree | 49bfefb844034c74ef7d1f5abcbbf23512992699 /tools/perf/scripts/python/task-analyzer.py | |
| parent | e7e6bf5af80e7454ebb92a998a2ab931cb27204f (diff) | |
rust: io: mem: return DevresLt from IoMem/ExclusiveIoMem::into_devres()
Implement ForLt and CovariantForLt for IoMem<'static, SIZE> and
ExclusiveIoMem<'static, SIZE> so that DevresLt can shorten the stored
'static lifetime back to the caller's borrow lifetime.
CovariantForLt is sound because both types only hold &'a Device<Bound>,
which is covariant over 'a.
Since DevresLt::new() handles the lifetime transmutation internally,
into_devres() no longer needs an explicit transmute to 'static.
Add DevresIoMem<SIZE> and DevresExclusiveIoMem<SIZE> type aliases.
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260626183630.2585057-8-dakr@kernel.org
[ Add default SIZE parameter to DevresIoMem. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
