From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Alice Ryhl <aliceryhl@google.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@lists.linux.dev
Subject: Re: [PATCH] rust: add C FFI types to the prelude
Date: Thu, 22 May 2025 22:05:37 +0200 [thread overview]
Message-ID: <CANiq72=ttuQYrGNDqNZDmBN5G4TUpna+ex8eD85HvOP723frDw@mail.gmail.com> (raw)
In-Reply-To: <Z_0X8Z9M2H0mmcK8@google.com>
On Mon, Apr 14, 2025 at 4:13 PM Alice Ryhl <aliceryhl@google.com> wrote:
>
> Hmm. Maybe, but I think having it at the end is okay. Could we catch
> core::ffi with checkpath instead of clippy? Just search for core::ffi?
Sure, we can add it as a good first issue (Clippy would still be ideal
-- it allows to check all the current code).
I came up with this, which puts the right way first:
Rust kernel code refers to C types, such as ``int``, using type
aliases such as ``c_int``, which are readily available from
the ``kernel`` prelude. Please do not use the aliases from
``core::ffi`` -- they may not map to the correct types.
If neither of you are against that, I will put that in a few days,
including Danilo's tag.
Thanks!
Cheers,
Miguel
next prev parent reply other threads:[~2025-05-22 20:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-13 0:56 [PATCH] rust: add C FFI types to the prelude Miguel Ojeda
2025-04-14 8:46 ` Alice Ryhl
2025-04-14 11:58 ` Danilo Krummrich
2025-04-14 13:22 ` Miguel Ojeda
2025-04-14 14:13 ` Alice Ryhl
2025-05-22 20:05 ` Miguel Ojeda [this message]
2025-05-22 20:10 ` Alice Ryhl
2025-05-25 21:12 ` Miguel Ojeda
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='CANiq72=ttuQYrGNDqNZDmBN5G4TUpna+ex8eD85HvOP723frDw@mail.gmail.com' \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--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=ojeda@kernel.org \
--cc=patches@lists.linux.dev \
--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).