All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Benno Lossin" <lossin@kernel.org>
To: "Igor Korotin" <igor.korotin@yahoo.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>
Cc: "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>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v4] rust: macros: Fix macro referencing core and kernel crates
Date: Sun, 18 May 2025 09:33:08 +0200	[thread overview]
Message-ID: <D9Z41NMNT28E.50YJYE4DC9M7@kernel.org> (raw)
In-Reply-To: <20250516122349.1944895-1-igor.korotin@yahoo.com>

On Fri May 16, 2025 at 2:23 PM CEST, Igor Korotin wrote:
> Fix macros and auto-generated code to use absolute paths, `::core::...`
> and `::kernel::...`, for core and kernel references. This prevents issues
> where user-defined modules named `core` or `kernel` could be picked up
> instead of the `core` or `kernel` crates.
>
> Suggested-by: Benno Lossin <benno.lossin@proton.me>
> Closes: https://github.com/Rust-for-Linux/linux/issues/1150
> Signed-off-by: Igor Korotin <igor.korotin@yahoo.com>
> ---
>
> Changes since v3:
>  - rebased changes on top of the branch rust-next
>  - added one fix in auto-generated code in file rust/macros/module.rs
>  - link to v3: https://lore.kernel.org/rust-for-linux/20250331102451.2362415-1-igor.korotin@yahoo.com/
> Changes since v2:
>  - rewrote commit message
>  - link to v2: https://lore.kernel.org/lkml/20250328180312.2025317-2-igor.korotin@yahoo.com/
> Changes since v1:
>  - rewrote commit message
>  - Added fixes in auto-generated code in files rust/macros/kunit.rs, 
>    rust/macros/module.rs, scripts/rustdoc_test_builder.rs,
>    scripts/rustdoc_test_gen.rs thanks to Benno
>  - link to v1: https://lore.kernel.org/lkml/20250326182302.5650-1-igor.korotin@yahoo.com/
>
>  rust/ffi.rs                     |  2 +-
>  rust/kernel/device.rs           |  2 +-
>  rust/kernel/device_id.rs        |  4 ++--
>  rust/kernel/kunit.rs            |  8 ++++----
>  rust/kernel/static_assert.rs    |  4 ++--
>  rust/kernel/str.rs              |  4 ++--
>  rust/macros/kunit.rs            | 22 +++++++++++-----------
>  rust/macros/lib.rs              |  6 +++---
>  rust/macros/module.rs           | 31 ++++++++++++++++---------------
>  scripts/rustdoc_test_builder.rs |  6 +++---
>  scripts/rustdoc_test_gen.rs     | 16 ++++++++++------
>  11 files changed, 55 insertions(+), 50 deletions(-)

The changes look good, there is one rustfmt issue the bot detected, but
Miguel can take care of that when picking the patch, so no need to send
a new version just for that.

I tried to find any instances that you might have overlooked, but
couldn't find any :) I didn't write a script to find them all though, so
I might also have missed some. Would be great if someone else also could
try to find any missing ones.

Reviewed-by: Benno Lossin <lossin@kernel.org>

---
Cheers,
Benno

  parent reply	other threads:[~2025-05-18  7:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250516122349.1944895-1-igor.korotin.ref@yahoo.com>
2025-05-16 12:23 ` [PATCH v4] rust: macros: Fix macro referencing core and kernel crates Igor Korotin
2025-05-17 21:36   ` kernel test robot
2025-05-18  7:33   ` Benno Lossin [this message]
2025-05-19 14:20   ` Miguel Ojeda
2025-05-19 14:33     ` Benno Lossin
2025-05-19 16:09     ` Igor Korotin
2025-05-19 16:49       ` Miguel Ojeda
2025-05-20  8:37         ` Igor Korotin
2025-05-19 16:45   ` [PATCH v5] " igor.korotin.linux
2025-05-19 17:10     ` Miguel Ojeda
2025-05-20  8:54       ` Igor Korotin
2025-05-21 14:12     ` Miguel Ojeda
2025-05-21 15:08       ` Greg KH
2025-05-22 22:14     ` 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=D9Z41NMNT28E.50YJYE4DC9M7@kernel.org \
    --to=lossin@kernel.org \
    --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=igor.korotin@yahoo.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.