Re: [PATCH v2] rust: Mark all from() for Error functions inline
From: Gary Guo
Date: Wed Mar 25 2026 - 10:26:03 EST
On Wed Mar 25, 2026 at 1:19 AM GMT, Miguel Ojeda wrote:
> On Wed, Mar 25, 2026 at 1:51 AM <alistair23@xxxxxxxxx> wrote:
>>
>> 1: https://lkml.org/lkml/2026/3/13/962
>
> For links, please use the Link: tag (and also please use
> lore.kernel.org for mailing list links), e.g. it would usually look
> like:
>
> Link: https://lore.kernel.org/... [1]
>
> (By the way, the idea was to create a "good first issue" for new
> contributors in our issue tracker, but of course it is also good to
> get this done)
>
>> rust/kernel/alloc/kvec/errors.rs | 3 +++
>> rust/kernel/xarray.rs | 1 +
>
> Thanks for Cc'ing the maintainers on this -- now the maintainers may
> give their Acked-by's! :)
>
>> rust/kernel/ptr/projection.rs | 2 +-
>
> Gary: there is no `build_assert!` in sight, so it is fine, but perhaps
> you wanted to have it more forcefully inlined because it was trivial?
I just `#[inline(always)]` everything there :)
I don't think this path is actually exercised by `build_assert!()`, so it is
fine.
>
>> rust/syn/error.rs | 1 +
>
> We don't want to change `syn`, since it is a vendored crate. It also
> runs just in the host, so it doesn't matter if it is inline or not.
I wouldn't mind having it, but it should go separately and not be part of this
patch.
Best,
Gary