summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2026-08-29 14:42:54 +0200
committerDanilo Krummrich <dakr@kernel.org>2026-09-04 17:58:43 +0200
commit9dc6cedcd971d084a64a9bd11d9c822e1125b798 (patch)
tree76d50db409ae63831b6baa11d75d08e840b7be3d /tools/lib/python/kdoc/python_version.py
parentcee9395acd8043be0644b25c34bfa86623f2b935 (diff)
rust: debugfs: drop 'static bound from ScopedDir file creation methods
Drop the T: 'static bound from ScopedDir's file creation methods (read_binary_file(), read_only_file(), etc.) to support registering debugfs files backed by types that contain non-'static references, such as dma::Coherent<'a, T>. The previous 'static bound existed because ScopedDir::create_file() took &'static FileOps<T>, and &'static requires T: 'static for well- formedness. However, this was overly conservative: the file_operations pointer passed to the C debugfs API just needs to be 'static, not the entire FileOps<T>. Store &'static bindings::file_operations in FileOps<T> instead of the file_operations by value. In each trait impl, take a reference to the file_operations struct within the const block; since bindings::file_operations does not mention T, the reference is promoted to 'static regardless of T's lifetime parameters. Replace the Deref impl with an explicit fops() method that returns the stored &'static reference. Link: https://lore.kernel.org/driver-core/20260830193824.471089-2-dakr@kernel.org Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://patch.msgid.link/20260830193824.471089-2-dakr@kernel.org [ Remove unrelated change from Self to T. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions