Re: [PATCH v3 2/4] rust: driver: Add ACPI id table support to Adapter trait

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

 



On Mon, Jun 9, 2025 at 4:07 PM Igor Korotin
<igor.korotin.linux@xxxxxxxxx> wrote:
>
> 1. rename it to `_dev`. This is nasty to my opinion, because it is misleading.

Yes, please do not change the name that would be use in the "normal/full case".

> 2. add #[alloc(unused_variables)] on top of it. Also not good since it
> will suppress
> all other possible unused_variables as well.

This can be done conditionally with `cfg_attr`, but it is not great.

> 3. The third option is `let _ = dev;` in `#[cfg(not(CONFIG_OF))]`
> section. I came to
> it while I was writing this reply. This looks like the best option of
> three in my opinion.

Yeah.

Cheers,
Miguel





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux