summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
authorBenno Lossin <benno.lossin@proton.me>2023-10-26 20:19:33 +0000
committerMiguel Ojeda <ojeda@kernel.org>2023-12-14 20:14:01 +0100
commit88c2e1169f5f0c2ccdd0a001e4447a1b0da2b661 (patch)
treeca6c672d6c4925f404068061c49f294b2dfaacbc /scripts/Makefile.build
parent2dc318ea9681c14c37bad2715097df4380a3c547 (diff)
downloadlinux-stable-88c2e1169f5f0c2ccdd0a001e4447a1b0da2b661.tar.gz
linux-stable-88c2e1169f5f0c2ccdd0a001e4447a1b0da2b661.tar.bz2
linux-stable-88c2e1169f5f0c2ccdd0a001e4447a1b0da2b661.zip
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>
Diffstat (limited to 'scripts/Makefile.build')
0 files changed, 0 insertions, 0 deletions