2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-23 18:14:04 +08:00
linux-next/rust/kernel
Benno Lossin 88c2e1169f rust: macros: improve #[vtable] documentation
Traits marked with `#[vtable]` need to provide default implementations
for optional functions. The C side represents these with `NULL` in the
vtable, so the default functions are never actually called. We do not
want to replicate the default behavior from C in Rust, because that is
not maintainable. Therefore we should use `build_error` in those default
implementations. The error message for that is provided at
`kernel::error::VTABLE_DEFAULT_ERROR`.

Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Finn Behrens <me@kloenk.dev>
Link: https://lore.kernel.org/r/20231026201855.1497680-1-benno.lossin@proton.me
[ Wrapped paragraph to 80 as requested and capitalized sentence. ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2023-12-14 20:14:01 +01:00
..
init rust: init: update expanded macro explanation 2023-08-21 14:31:49 +02:00
sync workqueue: Add rust bindings for v6.7 2023-10-30 20:35:48 -10:00
allocator.rs rust: bindings: rename const binding using sed 2023-12-14 20:14:01 +01:00
build_assert.rs rust: upgrade to Rust 1.68.2 2023-05-31 17:35:03 +02:00
error.rs rust: macros: improve #[vtable] documentation 2023-12-14 20:14:01 +01:00
init.rs rust: kernel: remove #[allow(clippy::new_ret_no_self)] 2023-10-05 21:16:13 +02:00
ioctl.rs rust: ioctl: Add ioctl number manipulation functions 2023-04-22 01:46:45 +02:00
kunit.rs rust: support running Rust documentation tests as KUnit ones 2023-07-19 09:32:53 -06:00
lib.rs rust: workqueue: add helper for defining work_struct fields 2023-09-25 09:46:42 -10:00
prelude.rs rust: add derive macro for Zeroable 2023-08-21 14:31:48 +02:00
print.rs rust: print: use explicit link in documentation 2023-10-15 21:25:08 +02:00
static_assert.rs rust: static_assert: add static_assert! macro 2022-12-04 01:59:16 +01:00
std_vendor.rs rust: upgrade to Rust 1.68.2 2023-05-31 17:35:03 +02:00
str.rs rust: kernel: str: Implement Debug for CString 2023-12-13 00:13:49 +01:00
sync.rs rust: sync: introduce CondVar 2023-04-22 01:46:45 +02:00
task.rs rust: task: remove redundant explicit link 2023-10-15 21:25:08 +02:00
types.rs Rust changes for v6.6 2023-08-29 08:19:46 -07:00
workqueue.rs rust: workqueue: add examples 2023-09-25 09:46:42 -10:00