Re: [PATCH v1 3/3] rust: net::phy Change module_phy_driver macro to use module_device_table macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 23, 2025 at 8:10 AM FUJITA Tomonori
<fujita.tomonori@xxxxxxxxx> wrote:
>
> +// SAFETY: [`DeviceId`] is a `#[repr(transparent)` wrapper of `struct mdio_device_id`

No need for intra-doc link in normal comments.

Also, missing bracket (which apparently comes from another comment, so
probably copy-pasted).

> +    // This should never be called.
> +    fn index(&self) -> usize {
> +        0
> +    }

Hmm... This isn't great. Could this perhaps be designed differently?
e.g. split into two traits, possibly based one on another, or similar?

Worst case, we should at least do a `debug_assert!` or similar.

Cheers,
Miguel





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux