[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92fca611-a87c-4994-b2fe-bda146ca6c5f@proton.me>
Date: Fri, 20 Oct 2023 17:56:17 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: "Andreas Hindborg (Samsung)" <nmi@...aspace.dk>, FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: netdev@...r.kernel.org, rust-for-linux@...r.kernel.org, andrew@...n.ch, miguel.ojeda.sandonis@...il.com, tmgross@...ch.edu, boqun.feng@...il.com, wedsonaf@...il.com, greg@...ah.com
Subject: Re: [PATCH net-next v5 1/5] rust: core abstractions for network PHY drivers
On 20.10.23 19:26, Andreas Hindborg (Samsung) wrote:
>> +
>> + /// Overrides the default MMD write function for writing a MMD register.
>> + fn write_mmd(_dev: &mut Device, _devnum: u8, _regnum: u16, _val: u16) -> Result {
>> + Err(code::ENOTSUPP)
>> + }
>> +
>> + /// Callback for notification of link change.
>> + fn link_change_notify(_dev: &mut Device) {}
>
> It is probably an error if these functions are called, and so BUG() would be
> appropriate? See the discussion in [1].
Please do not use `BUG()` I wanted to wait for my patch [1] to be merged
before suggesting this, since then Tomo can then just use the constant
that I introduced.
> [1] https://lore.kernel.org/rust-for-linux/20231019171540.259173-1-benno.lossin@proton.me/
--
Cheers,
Benno
Powered by blists - more mailing lists