public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: "Gary Guo" <gary@garyguo.net>
To: "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
	<alistair23@gmail.com>, <gary@garyguo.net>
Cc: <dakr@kernel.org>, <ljs@kernel.org>, <vbabka@kernel.org>,
	<Liam.Howlett@oracle.com>, <urezki@gmail.com>, <ojeda@kernel.org>,
	<boqun@kernel.org>, <bjorn3_gh@protonmail.com>,
	<lossin@kernel.org>, <a.hindborg@kernel.org>,
	<aliceryhl@google.com>, <tmgross@umich.edu>, <tamird@kernel.org>,
	<work@onurozkan.dev>, <acourbot@nvidia.com>,
	<rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"Alistair Francis" <alistair.francis@wdc.com>
Subject: Re: [PATCH v2] rust: Mark all from() for Error functions inline
Date: Wed, 25 Mar 2026 14:21:08 +0000	[thread overview]
Message-ID: <DHBXHH3C6CP8.2TDI49QZTPHJP@garyguo.net> (raw)
In-Reply-To: <CANiq72nEaqGwnRO6SPJ7Ky85+X-U3ckYa4Z5cg=Uoqi9fwHBMg@mail.gmail.com>

On Wed Mar 25, 2026 at 1:19 AM GMT, Miguel Ojeda wrote:
> On Wed, Mar 25, 2026 at 1:51 AM <alistair23@gmail.com> 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


  reply	other threads:[~2026-03-25 14:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25  0:51 [PATCH v2] rust: Mark all from() for Error functions inline alistair23
2026-03-25  1:19 ` Miguel Ojeda
2026-03-25 14:21   ` Gary Guo [this message]
2026-03-25 15:29   ` Danilo Krummrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DHBXHH3C6CP8.2TDI49QZTPHJP@garyguo.net \
    --to=gary@garyguo.net \
    --cc=Liam.Howlett@oracle.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=alistair.francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=lossin@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=urezki@gmail.com \
    --cc=vbabka@kernel.org \
    --cc=work@onurozkan.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox