Messages in this thread |  | | From | Miguel Ojeda <> | | Date | Fri, 13 Mar 2026 06:53:54 +0100 | | Subject | Re: [RFC v3 12/27] lib: rspdm: Support SPDM get_version |
| |
On Fri, Mar 13, 2026 at 6:36 AM Alistair Francis <alistair23@gmail.com> wrote: > > This is a public function that matches the C implementation, hence the > arguments being fixed in the previous patch.
Since you have it in a C header and in `bindings_helper.h`, then you should be able to use `#[export]`, which will do a typecheck that the signatures match (it also does the `no_mangle`, so you can replace it):
https://rust.docs.kernel.org/macros/attr.export.html
> This is just how the linter formats it when I run ` LLVM=1 make > rustfmt`. I don't really want to be manually formatting things
Please use the "kernel vertical style" for imports (it is done automatically by `rustfmt` too by adding the `//`):
https://docs.kernel.org/rust/coding-guidelines.html#imports
We have `size_of`, `align_of` and so on in the prelude, so you can use those directly:
https://rust.docs.kernel.org/kernel/prelude/index.html
I hope that helps!
Cheers, Miguel
|  |