rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Asahi Lina <lina@asahilina.net>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Wedson Almeida Filho" <wedsonaf@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	asahi@lists.linux.dev, linux-arch@vger.kernel.org
Subject: Re: [PATCH v3] rust: ioctl: Add ioctl number manipulation functions
Date: Thu, 23 Mar 2023 23:00:20 +0900	[thread overview]
Message-ID: <be81649f-ff58-8c0a-8594-94ea1bd2ee4a@asahilina.net> (raw)
In-Reply-To: <CANiq72nk+KSz6X0Lxg4kc_Bui=17XhboJ6q6j8gRg7Nsshziug@mail.gmail.com>

On 23/03/2023 22.05, Miguel Ojeda wrote:
> On Thu, Mar 23, 2023 at 1:34 PM Asahi Lina <lina@asahilina.net> wrote:
>>
>> Changes in v3:
>> - Actually made the change intended in v2.
>> - Link to v2: https://lore.kernel.org/r/20230224-rust-ioctl-v2-1-5325e76a92df@asahilina.net
>>
>> Changes in v2:
>> - Changed from assert!() to build_assert!() (static_assert!() can't work
>>    here)
>> - Link to v1: https://lore.kernel.org/r/20230224-rust-ioctl-v1-1-5142d365a934@asahilina.net
> 
> It seems `#[inline(always)]` got added to a few of those, right? (The
> addition looks fine to me, but just to understand if is it an omission
> in the changelog, or an unintended change, or intended for another
> reason).

Ah yes, I should've mentioned that! build_assert!() only works for stuff 
that can be const-optimized at build time, which requires inlining. 
Otherwise this change immediately causes build failures since generic 
variants of the functions get compiled (and since they're public 
functions, cannot be optimized out at link time).

> 
> Thanks!
> 
> Cheers,
> Miguel
> 

~~ Lina


      reply	other threads:[~2023-03-23 14:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 12:33 [PATCH v3] rust: ioctl: Add ioctl number manipulation functions Asahi Lina
2023-03-23 13:05 ` Miguel Ojeda
2023-03-23 14:00   ` Asahi Lina [this message]

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=be81649f-ff58-8c0a-8594-94ea1bd2ee4a@asahilina.net \
    --to=lina@asahilina.net \
    --cc=alex.gaynor@gmail.com \
    --cc=arnd@arndb.de \
    --cc=asahi@lists.linux.dev \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=wedsonaf@gmail.com \
    /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).