Messages in this thread |  | | From | Miguel Ojeda <> | | Date | Tue, 3 Mar 2026 19:07:25 +0100 | | Subject | Re: [RFC v3 13/27] lib: rspdm: Support SPDM get_capabilities |
| |
On Tue, Mar 3, 2026 at 1:09 PM Jonathan Cameron <jonathan.cameron@huawei.com> wrote: > > Can we use bit_u32() or similar here? > We've tried to move to BIT() for similar defines in the C code, so I'm > looking for something along those lines. Provides a form of documentation > that they are single bit fields.
We have these so far:
https://rust.docs.kernel.org/kernel/bits/
Out-of-tree long ago we had also a `bit<T>` generic const function (https://github.com/Rust-for-Linux/linux/blob/rust/rust/kernel/types.rs#L317-L349). I think we also discussed a `bit!` macro at some point.
> This is why I was getting bit grumpy in previous about long lines. > Fair enough if this is only option, but it's not nice for a review process > that relies on patches!
This should be using the kernel imports style, which should make a case like this more readable:
https://docs.kernel.org/rust/coding-guidelines.html#imports
I hope that helps!
Cheers, Miguel
|  |