diff options
| author | Tamir Duberstein <[email protected]> | 2025-07-09 19:31:16 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2025-07-19 21:18:18 +0000 |
| commit | c77f85b347dd506ab6ef047031e75c2d03101187 (patch) | |
| tree | 3439c5282153131f96f3671bb4bd4ca8528d4ea5 /scripts/rustdoc_test_gen.rs | |
| parent | rust: list: add `impl_list_item!` examples (diff) | |
| download | kernel-c77f85b347dd506ab6ef047031e75c2d03101187.tar.gz kernel-c77f85b347dd506ab6ef047031e75c2d03101187.zip | |
rust: list: remove OFFSET constants
Replace `ListLinksSelfPtr::LIST_LINKS_SELF_PTR_OFFSET` with `unsafe fn
raw_get_self_ptr` which returns a pointer to the field rather than
requiring the caller to do pointer arithmetic.
Implement `HasListLinks::raw_get_list_links` in `impl_has_list_links!`,
narrowing the interface of `HasListLinks` and replacing pointer
arithmetic with `container_of!`.
Modify `impl_list_item` to also invoke `impl_has_list_links!` or
`impl_has_list_links_self_ptr!`. This is necessary to allow
`impl_list_item` to see more of the tokens used by
`impl_has_list_links{,_self_ptr}!`.
A similar API change was discussed on the hrtimer series[1].
Link: https://lore.kernel.org/all/[email protected]/ [1]
Tested-by: Alice Ryhl <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Signed-off-by: Tamir Duberstein <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Fixed broken intra-doc links. Used the renamed
`Opaque::cast_into`. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'scripts/rustdoc_test_gen.rs')
0 files changed, 0 insertions, 0 deletions
