public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: "Benno Lossin" <benno.lossin@proton.me>
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>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>, "Will Deacon" <will@kernel.org>,
	"Waiman Long" <longman@redhat.com>,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	linux-block@vger.kernel.org
Subject: Re: [PATCH 15/22] rust: make pin-init its own crate
Date: Wed, 05 Mar 2025 15:20:49 +0100	[thread overview]
Message-ID: <8734fra79a.fsf@kernel.org> (raw)
In-Reply-To: <D88DIE85YT01.11H51NPNE3HP6@proton.me> (Benno Lossin's message of "Wed, 05 Mar 2025 13:40:19 +0000")

"Benno Lossin" <benno.lossin@proton.me> writes:

> On Wed Mar 5, 2025 at 1:12 PM CET, Andreas Hindborg wrote:
>> "Benno Lossin" <benno.lossin@proton.me> writes:
>>
>>> Rename relative paths inside of the crate to still refer to the same
>>> items, also rename paths inside of the kernel crate and adjust the build
>>> system to build the crate.
>>>
>>> Signed-off-by: Benno Lossin <benno.lossin@proton.me>
>>> ---
>>
>> [...]
>>
>>> diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs
>>> index 7ff82c82ce0c..8e116e266524 100644
>>> --- a/rust/macros/lib.rs
>>> +++ b/rust/macros/lib.rs
>>> @@ -2,23 +2,20 @@
>>>
>>>  //! Crate for all kernel procedural macros.
>>>
>>> +#![feature(lint_reasons)]
>>
>> Commit message should probably say something about this.
>
> Done.
>
>>> +
>>>  // When fixdep scans this, it will find this string `CONFIG_RUSTC_VERSION_TEXT`
>>>  // and thus add a dependency on `include/config/RUSTC_VERSION_TEXT`, which is
>>>  // touched by Kconfig when the version string from the compiler changes.
>>>
>>>  #[macro_use]
>>> +#[expect(unused_macros)]
>>>  mod quote;
>>>  mod concat_idents;
>>>  mod helpers;
>>>  mod module;
>>>  mod paste;
>>> -#[path = "../pin-init/internal/src/pin_data.rs"]
>>> -mod pin_data;
>>> -#[path = "../pin-init/internal/src/pinned_drop.rs"]
>>> -mod pinned_drop;
>>>  mod vtable;
>>> -#[path = "../pin-init/internal/src/zeroable.rs"]
>>> -mod zeroable;
>>>
>>>  use proc_macro::TokenStream;
>>>
>>> @@ -374,5 +371,3 @@ pub fn paste(input: TokenStream) -> TokenStream {
>>>      paste::expand(&mut tokens);
>>>      tokens.into_iter().collect()
>>>  }
>>> -
>>> -include!("../pin-init/internal/src/lib.rs");
>>> diff --git a/rust/macros/module.rs b/rust/macros/module.rs
>>> index cdf94f4982df..bdd94c79b0d4 100644
>>> --- a/rust/macros/module.rs
>>> +++ b/rust/macros/module.rs
>>> @@ -236,7 +236,7 @@ impl kernel::ModuleMetadata for {type_} {{
>>>              mod __module_init {{
>>>                  mod __module_init {{
>>>                      use super::super::{type_};
>>> -                    use kernel::init::PinInit;
>>> +                    use pin_init::PinInit;
>>>
>>>                      /// The \"Rust loadable module\" mark.
>>>                      //
>>> diff --git a/rust/macros/quote.rs b/rust/macros/quote.rs
>>> index 33a199e4f176..11d241b85ac3 100644
>>> --- a/rust/macros/quote.rs
>>> +++ b/rust/macros/quote.rs
>>> @@ -2,6 +2,7 @@
>>>
>>>  use proc_macro::{TokenStream, TokenTree};
>>>
>>> +#[allow(dead_code)]
>>
>> #[expect(dead_code)] ?
>
> `expect` can't be used here, since `quote.rs` is imported in
> `pin-init/internal/src/lib.rs` and used in that crate. But it is unused
> in the `macros` crate, hence we need to allow it.

Got it 👍


Best regards,
Andreas Hindborg




      reply	other threads:[~2025-03-05 14:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250304225245.2033120-1-benno.lossin@proton.me>
2025-03-04 22:55 ` [PATCH 15/22] rust: make pin-init its own crate Benno Lossin
2025-03-05  9:29   ` Fiona Behrens
2025-03-05 12:12   ` Andreas Hindborg
2025-03-05 13:40     ` Benno Lossin
2025-03-05 14:20       ` Andreas Hindborg [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=8734fra79a.fsf@kernel.org \
    --to=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=gregkh@linuxfoundation.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=will@kernel.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