From: "Onur Özkan" <work@onurozkan.dev>
To: "Benno Lossin" <lossin@kernel.org>
Cc: <rust-for-linux@vger.kernel.org>, <dakr@kernel.org>,
<ojeda@kernel.org>, <alex.gaynor@gmail.com>,
<boqun.feng@gmail.com>, <gary@garyguo.net>,
<bjorn3_gh@protonmail.com>, <a.hindborg@kernel.org>,
<aliceryhl@google.com>, <tmgross@umich.edu>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 0/3] rust: make various `alloc` functions `const fn`
Date: Sun, 20 Jul 2025 18:17:21 +0300 [thread overview]
Message-ID: <20250720181721.54ab9faf@nimda.home> (raw)
In-Reply-To: <DBGYNQJJ0JI6.P280ZLVZUSO6@kernel.org>
On Sun, 20 Jul 2025 16:43:49 +0200
"Benno Lossin" <lossin@kernel.org> wrote:
> On Sun Jul 20, 2025 at 11:48 AM CEST, Onur Özkan wrote:
> > This patch series makes various functions in the
> > `alloc` crate const fn.
> >
> > Each patch corresponds to a different module within
> > the same `alloc` crate.
> >
> > Onur Özkan (3):
> > rust: make `allocator::aligned_size` a `const fn`
> > rust: make `ArrayLayout::new_unchecked` a `const fn`
> > rust: make `kvec::Vec` functions `const fn`
> >
> > rust/kernel/alloc/allocator.rs | 2 +-
> > rust/kernel/alloc/kvec.rs | 10 +++++-----
> > rust/kernel/alloc/layout.rs | 2 +-
> > 3 files changed, 7 insertions(+), 7 deletions(-)
>
> This looks sensible, any particular reason for why you need them
> const?
>
> For the entire series:
>
> Reviewed-by: Benno Lossin <lossin@kernel.org>
>
> ---
> Cheers,
> Benno
Personally, I don't have a specific reason. I thought the change is
harmless and might extend functionality for other people in the future.
It could also (although less likely) help the compiler optimize things
further.
Regards,
Onur
next prev parent reply other threads:[~2025-07-20 15:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-20 9:48 [PATCH v1 0/3] rust: make various `alloc` functions `const fn` Onur Özkan
2025-07-20 9:48 ` [PATCH v1 1/3] rust: make `allocator::aligned_size` a " Onur Özkan
2025-08-17 16:50 ` Miguel Ojeda
2025-07-20 9:48 ` [PATCH v1 2/3] rust: make `ArrayLayout::new_unchecked` " Onur Özkan
2025-07-20 9:48 ` [PATCH v1 3/3] rust: make `kvec::Vec` functions " Onur Özkan
2025-07-20 14:43 ` [PATCH v1 0/3] rust: make various `alloc` " Benno Lossin
2025-07-20 15:17 ` Onur Özkan [this message]
2025-07-20 15:42 ` Miguel Ojeda
2025-07-21 6:13 ` Onur Özkan
2025-07-21 20:13 ` Miguel Ojeda
2025-07-21 11:31 ` Alice Ryhl
2025-08-15 18:01 ` 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=20250720181721.54ab9faf@nimda.home \
--to=work@onurozkan.dev \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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;
as well as URLs for NNTP newsgroup(s).