[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241125.095819.2078794726631634489.fujita.tomonori@gmail.com>
Date: Mon, 25 Nov 2024 09:58:19 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: kuba@...nel.org
Cc: sergeantsagara@...tonmail.com, rust-for-linux@...r.kernel.org,
netdev@...r.kernel.org, fujita.tomonori@...il.com, tmgross@...ch.edu,
ojeda@...nel.org, alex.gaynor@...il.com, boqun.feng@...il.com,
gary@...yguo.net, bjorn3_gh@...tonmail.com, benno.lossin@...ton.me,
a.hindborg@...nel.org, aliceryhl@...gle.com, andrew@...n.ch,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com
Subject: Re: [PATCH net] rust: net::phy scope ThisModule usage in the
module_phy_driver macro
On Sun, 24 Nov 2024 16:27:00 -0800
Jakub Kicinski <kuba@...nel.org> wrote:
>> Fixes: 2fe11d5ab35d ("rust: net::phy add module_phy_driver macro")
>> Signed-off-by: Rahul Rameshbabu <sergeantsagara@...tonmail.com>
>> ---
>>
>> Notes:
>> How I came up with this change:
>>
>> I was working on my own rust bindings and rust driver when I compared my
>> macro_rule to the one used for module_phy_driver. I noticed, if I made a
>> driver that does not use kernel::prelude::*, that the ThisModule type
>> identifier used in the macro would cause an error without being scoped in
>> the macro_rule. I believe the correct implementation for the macro is one
>> where the types used are correctly expanded with needed scopes.
>
> Rust experts, does the patch itself make sense?
Looks good to me.
Powered by blists - more mailing lists