Following the Rust compiler bump, we can now update Clippy's MSRV we set in the configuration, which will improve the diagnostics it generates.
Thus do so and clean a few of the `allow`s that are not needed anymore. Reviewed-by: Tamir Duberstein <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Reviewed-by: Gary Guo <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]> --- .clippy.toml | 2 +- drivers/gpu/nova-core/gsp/cmdq.rs | 6 +----- rust/kernel/ptr.rs | 1 - rust/kernel/transmute.rs | 2 -- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.clippy.toml b/.clippy.toml index a51de9a46380..b0a78cc8be20 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -msrv = "1.78.0" +msrv = "1.85.0" check-private-items = true diff --git a/drivers/gpu/nova-core/gsp/cmdq.rs b/drivers/gpu/nova-core/gsp/cmdq.rs index 46819a82a51a..d9f69366642a 100644 --- a/drivers/gpu/nova-core/gsp/cmdq.rs +++ b/drivers/gpu/nova-core/gsp/cmdq.rs @@ -281,7 +281,6 @@ fn allocate_command(&mut self, size: usize) -> Result<GspCommand<'_>> { let (slice_1, slice_2) = { let (slice_1, slice_2) = self.driver_write_area(); - #[allow(clippy::incompatible_msrv)] (slice_1.as_flattened_mut(), slice_2.as_flattened_mut()) }; @@ -572,10 +571,7 @@ fn wait_for_msg(&self, timeout: Delta) -> Result<GspMessage<'_>> { Delta::from_millis(1), timeout, ) - .map(|(slice_1, slice_2)| { - #[allow(clippy::incompatible_msrv)] - (slice_1.as_flattened(), slice_2.as_flattened()) - })?; + .map(|(slice_1, slice_2)| (slice_1.as_flattened(), slice_2.as_flattened()))?; // Extract the `GspMsgElement`. let (header, slice_1) = GspMsgElement::from_bytes_prefix(slice_1).ok_or(EIO)?; diff --git a/rust/kernel/ptr.rs b/rust/kernel/ptr.rs index c7788656a162..91811f5e27de 100644 --- a/rust/kernel/ptr.rs +++ b/rust/kernel/ptr.rs @@ -81,7 +81,6 @@ pub const fn new_checked(align: usize) -> Option<Self> { /// This is equivalent to [`align_of`], but with the return value provided as an [`Alignment`]. #[inline(always)] pub const fn of<T>() -> Self { - #![allow(clippy::incompatible_msrv)] // This cannot panic since alignments are always powers of two. // // We unfortunately cannot use `new` as it would require the `generic_const_exprs` feature. diff --git a/rust/kernel/transmute.rs b/rust/kernel/transmute.rs index 5711580c9f9b..b9e6eadc08f5 100644 --- a/rust/kernel/transmute.rs +++ b/rust/kernel/transmute.rs @@ -49,7 +49,6 @@ fn from_bytes(bytes: &[u8]) -> Option<&Self> let slice_ptr = bytes.as_ptr().cast::<Self>(); let size = size_of::<Self>(); - #[allow(clippy::incompatible_msrv)] if bytes.len() == size && slice_ptr.is_aligned() { // SAFETY: Size and alignment were just checked. unsafe { Some(&*slice_ptr) } @@ -92,7 +91,6 @@ fn from_bytes_mut(bytes: &mut [u8]) -> Option<&mut Self> let slice_ptr = bytes.as_mut_ptr().cast::<Self>(); let size = size_of::<Self>(); - #[allow(clippy::incompatible_msrv)] if bytes.len() == size && slice_ptr.is_aligned() { // SAFETY: Size and alignment were just checked. unsafe { Some(&mut *slice_ptr) } -- 2.53.0
