mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Igor Korotin <igor.korotin@yahoo.com>
To: benno.lossin@proton.me
Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	Igor Korotin <igor.korotin@yahoo.com>
Subject: [PATCH v2 0/1] rust: macros: Fix macro referencing core and kernel crates v2
Date: Fri, 28 Mar 2025 18:03:11 +0000	[thread overview]
Message-ID: <20250328180312.2025317-1-igor.korotin@yahoo.com> (raw)
In-Reply-To: <D8RHIOTYBFI5.3ETKTDNGZW3FH@proton.me>

> > To prevent issues where user-defined modules named `core` or `kernel`
> > could be picked up instead of the standard ones, update macros to use
> > absolute paths, `::core::...` and `::kernel::...`, for core and kernel
> > references.
> 
> Please split this sentence up into smaller parts. Also "standard ones"
> sounds weird to me, `core` and `kernel` are crates and not modules.

Simplified the commit message.

> > Suggested-by: y86-dev <y86-dev@protonmail.com>
> 
> Please use my real name and other mail address instead:
>    
>     Benno Lossin <benno.lossin@proton.me>

Sure. Tried to find your creds via your github profile/commits without 
success.

> > Closes: https://github.com/Rust-for-Linux/linux/issues/1150
> > Signed-off-by: Igor Korotin <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/lib.rs          | 6 +++---
> >  scripts/rustdoc_test_gen.rs  | 8 ++++++--
> >  8 files changed, 21 insertions(+), 17 deletions(-)
> 
> There are also some occurrences of `kernel::` & `core::` in proc macros,
> for example:
> - rust/macros/kunit.rs:129
> - rust/macros/module.rs:347
> - ...
> 
> Could you also add those to the patch? Thanks!
> 
> (line numbers after applying your patch to rust-next)

Agreed. Fixed references in auto-generated code in files
1. rust/macros/kunit.rs            
2. rust/macros/module.rs           
3. scripts/rustdoc_test_builder.rs 
4. scripts/rustdoc_test_gen.rs     

-- 
2.43.0


  reply	other threads:[~2025-03-28 18:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28  0:49 [PATCH] rust: macros: Fix macro referencing core and kernel crates Benno Lossin
2025-03-28 18:03 ` Igor Korotin [this message]
2025-03-28 18:03   ` [PATCH v2 1/1] rust: macros: Fix macro referencing core and kernel crates v2 Igor Korotin
2025-03-28 21:50     ` Benno Lossin
2025-03-29 12:28     ` Miguel Ojeda
2025-03-28 21:48   ` [PATCH v2 0/1] " Benno Lossin

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=20250328180312.2025317-1-igor.korotin@yahoo.com \
    --to=igor.korotin@yahoo.com \
    --cc=benno.lossin@proton.me \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rust-for-linux@vger.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

all inboxes | Powered by JetHome®