Re: [PATCH] Introduce Tyr

From: Miguel Ojeda
Date: Sat Jun 28 2025 - 05:31:46 EST


On Sat, Jun 28, 2025 at 2:13 AM Daniel Almeida
<daniel.almeida@xxxxxxxxxxxxx> wrote:
>
> Also, for some reason the Clippy lint did not save me this time.

Hmm... it should -- I tried to build it and Clippy reports it. There
is also another warning too [1].

I see the compiler reporting [2] too.

By the way, do you need to depend on `CONFIG_REGULATOR`?

Thanks!

Cheers,
Miguel

[1]

error: this operation has no effect
--> drivers/gpu/drm/tyr/regs.rs:221:16
|
221 | (3 << 2) | ((w as u32) << 0) | ((r as u32) << 1)
| ^^^^^^^^^^^^^^^^^ help: consider reducing it to:
`((w as u32))`

[2]

error: variable does not need to be mutable
--> rust/kernel/regulator.rs:295:29
|
295 | pub fn try_into_enabled(mut self) ->
Result<Regulator<Enabled>, Error<Disabled>> {
| ----^^^^

error: variable does not need to be mutable
--> rust/kernel/regulator.rs:324:30
|
324 | pub fn try_into_disabled(mut self) ->
Result<Regulator<Disabled>, Error<Enabled>> {
| ----^^^^