From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Abhinav Ananthu" <abhinav.ogl@gmail.com>,
"Rafael J . Wysocki" <rafael@kernel.org>,
"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" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
linux-pm@vger.kernel.org, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] rust: cpufreq: Ensure C ABI compatibility in all unsafe
Date: Thu, 19 Jun 2025 09:32:05 +0200 [thread overview]
Message-ID: <CANiq72muPYoPGLrb7jYWMqbWgknMuWJSPMdFPRQMFduFsDTs0Q@mail.gmail.com> (raw)
In-Reply-To: <20250619065713.hm5ye2uhikaei2xo@vireshk-i7>
On Thu, Jun 19, 2025 at 8:57 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> I think the one in prelude points to core::ffi::* instead, while we
> want to use kernel::ffi::* ?
>
> Miguel ?
The one in the `kernel` prelude points to the kernel ones (the core
ones should not be used anymore).
> Also why does prelude use ::ffi::* instead of kernel::ffi::* ? I was always a
> bit confused about it.
It is because we define them in a crate called `ffi`, not in the
`kernel` one; and we also re-export it in `kernel`.
In any case, from now on, one should just refer to them directly as
`c_*` (please use the `kernel` prelude for that) -- please see:
https://docs.kernel.org/rust/coding-guidelines.html#c-ffi-types
I hope that helps!
Cheers,
Miguel
next prev parent reply other threads:[~2025-06-19 7:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 10:18 [PATCH v3] rust: cpufreq: Ensure C ABI compatibility in all unsafe Abhinav Ananthu
2025-06-19 6:57 ` Viresh Kumar
2025-06-19 7:32 ` Miguel Ojeda [this message]
2025-06-19 7:59 ` Viresh Kumar
2025-06-19 8:16 ` Viresh Kumar
[not found] ` <CAGR7w80V_Atc_DuF1RGOFHbvXd1V2j8mMbN3yg+Q6oytiJwNbw@mail.gmail.com>
2025-06-19 8:40 ` Viresh Kumar
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=CANiq72muPYoPGLrb7jYWMqbWgknMuWJSPMdFPRQMFduFsDTs0Q@mail.gmail.com \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=abhinav.ogl@gmail.com \
--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=linux-pm@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=viresh.kumar@linaro.org \
/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).