[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72=S-HnREWAK+8kcJkPabPHSzuKD4k7251+Zw-b9==0-zA@mail.gmail.com>
Date: Mon, 8 Sep 2025 20:39:19 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Joel Fernandes <joelagnelf@...dia.com>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
dakr@...nel.org, acourbot@...dia.com, Alistair Popple <apopple@...dia.com>,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, bjorn3_gh@...tonmail.com,
Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, John Hubbard <jhubbard@...dia.com>, Timur Tabi <ttabi@...dia.com>,
joel@...lfernandes.org, Elle Rhumsaa <elle@...thered-steel.dev>,
Daniel Almeida <daniel.almeida@...labora.com>, nouveau@...ts.freedesktop.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v2 4/4] rust: Move register and bitstruct macros out of Nova
On Mon, Sep 8, 2025 at 7:06 PM Joel Fernandes <joelagnelf@...dia.com> wrote:
>
> The issue I ran into is, without adding it to prelude, the users of register!
> macro will have to import both bitfield! and register! macros explictly, even
> though they're only using register!. I tried to make it work without adding to
> prelude, but couldn't:
>
> use kernel::{bitfield, register};
>
> Also not adding it to prelude, means register! macro has to invoke bitfield with
> $crate prefixed ($crate::bitfield).
I am not sure I follow -- macros should use qualified paths in general
so that they assume as little as possible from the calling
environment.
It should work without the prelude -- what didn't work?
Thanks!
Cheers,
Miguel
Powered by blists - more mailing lists