lkml.org 
[lkml]   [2026]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2026-03-13 06:54    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog