[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFqIJ6aN_iqEPGAR@pollux>
Date: Tue, 24 Jun 2025 13:12:39 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Alexandre Courbot <acourbot@...dia.com>,
Lyude Paul <lyude@...hat.com>,
Andreas Hindborg <a.hindborg@...nel.org>,
FUJITA Tomonori <fujita.tomonori@...il.com>,
Miguel Ojeda <ojeda@...nel.org>,
Tamir Duberstein <tamird@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the rust tree
On Tue, Jun 24, 2025 at 12:31:52PM +0200, Miguel Ojeda wrote:
> By the way, I also noticed a Clippy warning in `nova-next` (on its
> own, i.e. without merging anything) -- please see below [1].
How do I get this warning to trigger? I did run my usual tests with rustc 1.78
and 1.87.
> [1]
>
> error: mutable borrow from immutable input(s)
> --> rust/kernel/dma.rs:297:78
> |
> 297 | pub unsafe fn as_slice_mut(&self, offset: usize, count:
> usize) -> Result<&mut [T]> {
I think the method isn't wrong, it is unsafe and the safety requirement
explicitly covers this part.
However, we should consider changing it anyways.
> |
> ^^^^^^^^
> |
> note: immutable borrow here
> --> rust/kernel/dma.rs:297:32
> |
> 297 | pub unsafe fn as_slice_mut(&self, offset: usize, count:
> usize) -> Result<&mut [T]> {
> | ^^^^^
> = help: for further information visit
> https://rust-lang.github.io/rust-clippy/master/index.html#mut_from_ref
> = note: `-D clippy::mut-from-ref` implied by `-D warnings`
> = help: to override `-D warnings` add `#[allow(clippy::mut_from_ref)]`
Powered by blists - more mailing lists