Re: [PATCH v3 0/4] rust: extend `module!` macro with integer parameter support

Miguel Ojeda
2024-12-16T15:48:35Z

On Mon, Dec 16, 2024 at 4:39 PM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> Agreed. I would suggest to consider marking it as a Rust reference
> driver, since it is a prime candidate for it:
>
> https://rust-for-linux.com/rust-reference-drivers
>
> That way, it is clearer that the duplication is meant to build the
> abstractions and temporary in the long-term.
>
> Then we can also easily track which ones are meant to be those, and
> Greg can get justifiably angry at you/us if the duplication isn't
> resolved when the right time comes... :)

By the way, I half-jokingly suggested this elsewhere, but we could
trivially allow module parameters only for particular modules, i.e.
only allow to use the `params` key here if the name matches `rnull`
(or if they set a special flag or whatever).

Yes, it is a hack, but it would give people pause when trying to use
the feature, i.e. to think twice. And, to me, it makes sense to
encode/acknowledge this kind of thing explicitly anyway.

So if that would unblock this and reduce the chance of repeating
mistakes of the past, then we can easily do that too.

Cheers,
Miguel