]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop some unneeded 6.6 rust patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 11:35:13 +0000 (12:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 11:35:13 +0000 (12:35 +0100)
queue-6.6/rust-allow-clippy-needless_lifetimes.patch [deleted file]
queue-6.6/rust-relax-most-deny-level-lints-to-warnings.patch [deleted file]
queue-6.6/series

diff --git a/queue-6.6/rust-allow-clippy-needless_lifetimes.patch b/queue-6.6/rust-allow-clippy-needless_lifetimes.patch
deleted file mode 100644 (file)
index b5fff9f..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-From b64fdc48b7eaeece3ef525bb3e950b314f93dcd6 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Sat, 16 Nov 2024 19:15:37 +0100
-Subject: rust: allow `clippy::needless_lifetimes`
-
-From: Miguel Ojeda <ojeda@kernel.org>
-
-[ Upstream commit 60fc1e6750133620e404d40b93df5afe32e3e6c6 ]
-
-In beta Clippy (i.e. Rust 1.83.0), the `needless_lifetimes` lint has
-been extended [1] to suggest eliding `impl` lifetimes, e.g.
-
-    error: the following explicit lifetimes could be elided: 'a
-    --> rust/kernel/list.rs:647:6
-        |
-    647 | impl<'a, T: ?Sized + ListItem<ID>, const ID: u64> FusedIterator for Iter<'a, T, ID> {}
-        |      ^^                                                                  ^^
-        |
-        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
-        = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
-        = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
-    help: elide the lifetimes
-        |
-    647 - impl<'a, T: ?Sized + ListItem<ID>, const ID: u64> FusedIterator for Iter<'a, T, ID> {}
-    647 + impl<T: ?Sized + ListItem<ID>, const ID: u64> FusedIterator for Iter<'_, T, ID> {}
-
-A possibility would have been to clean them -- the RFC patch [2] did
-this, while asking if we wanted these cleanups. There is an open issue
-[3] in Clippy about being able to differentiate some of the new cases,
-e.g. those that do not involve introducing `'_`. Thus it seems others
-feel similarly.
-
-Thus, for the time being, we decided to `allow` the lint.
-
-Link: https://github.com/rust-lang/rust-clippy/pull/13286 [1]
-Link: https://lore.kernel.org/rust-for-linux/20241012231300.397010-1-ojeda@kernel.org/ [2]
-Link: https://github.com/rust-lang/rust-clippy/issues/13514 [3]
-Reviewed-by: Alice Ryhl <aliceryhl@google.com>
-Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
-Link: https://lore.kernel.org/r/20241116181538.369355-1-ojeda@kernel.org
-Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile b/Makefile
-index 0be58613bfe0..31b4fc9f5ccb 100644
---- a/Makefile
-+++ b/Makefile
-@@ -469,6 +469,7 @@ export rust_common_flags := --edition=2021 \
-                           -Wclippy::let_unit_value -Wclippy::mut_mut \
-                           -Wclippy::needless_bitwise_bool \
-                           -Wclippy::needless_continue \
-+                          -Aclippy::needless_lifetimes \
-                           -Wclippy::no_mangle_with_rust_abi \
-                           -Wclippy::dbg_macro
--- 
-2.39.5
-
diff --git a/queue-6.6/rust-relax-most-deny-level-lints-to-warnings.patch b/queue-6.6/rust-relax-most-deny-level-lints-to-warnings.patch
deleted file mode 100644 (file)
index 8441ec6..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-From 0953c79b5a2e3eb9a0c0752e7d76bbaf0f6f8666 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 9 Jul 2024 18:05:59 +0200
-Subject: rust: relax most deny-level lints to warnings
-
-From: Miguel Ojeda <ojeda@kernel.org>
-
-[ Upstream commit f8f88aa25a03ce1e0fc8a9842840988b870f0c37 ]
-
-Since we are starting to support several Rust toolchains, lints (including
-Clippy ones) now may behave differently and lint groups may include
-new lints.
-
-Therefore, to maximize the chances a given version works, relax some
-deny-level lints to warnings. It may also make our lives a bit easier
-while developing new code or refactoring.
-
-To be clear, the requirements for in-tree code are still the same, since
-Rust code still needs to be warning-free (patches should be clean under
-`WERROR=y`) and the set of lints is not changed.
-
-`unsafe_op_in_unsafe_fn` is left unmodified, i.e. as an error, since it is
-becoming the default in the language (warn-by-default in Rust 2024 [1] and
-ideally an error later on) and thus it should also be very well tested. In
-addition, it is simple enough that it should not have false positives
-(unlike e.g. `rust_2018_idioms`'s `explicit_outlives_requirements`).
-
-`non_ascii_idents` is left unmodified as well, i.e. as an error, since
-it is unlikely one gains any productivity during development if it
-were a warning (in fact, it may be worse, since it is likely one made
-a typo). In addition, it should not have false positives.
-
-Finally, put the two `-D` ones at the top and take the chance to do one
-per line.
-
-Link: https://github.com/rust-lang/rust/pull/112038 [1]
-Reviewed-by: Finn Behrens <me@kloenk.dev>
-Tested-by: Benno Lossin <benno.lossin@proton.me>
-Tested-by: Andreas Hindborg <a.hindborg@samsung.com>
-Link: https://lore.kernel.org/r/20240709160615.998336-5-ojeda@kernel.org
-Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
-Stable-dep-of: 60fc1e675013 ("rust: allow `clippy::needless_lifetimes`")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- Makefile      | 24 +++++++++++++-----------
- rust/Makefile |  4 ++--
- 2 files changed, 15 insertions(+), 13 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index ec4d9d1d9b7a..0be58613bfe0 100644
---- a/Makefile
-+++ b/Makefile
-@@ -457,17 +457,19 @@ KBUILD_USERLDFLAGS := $(USERLDFLAGS)
- # host programs.
- export rust_common_flags := --edition=2021 \
-                           -Zbinary_dep_depinfo=y \
--                          -Dunsafe_op_in_unsafe_fn -Drust_2018_idioms \
--                          -Dunreachable_pub -Dnon_ascii_idents \
-+                          -Dunsafe_op_in_unsafe_fn \
-+                          -Dnon_ascii_idents \
-+                          -Wrust_2018_idioms \
-+                          -Wunreachable_pub \
-                           -Wmissing_docs \
--                          -Drustdoc::missing_crate_level_docs \
--                          -Dclippy::correctness -Dclippy::style \
--                          -Dclippy::suspicious -Dclippy::complexity \
--                          -Dclippy::perf \
--                          -Dclippy::let_unit_value -Dclippy::mut_mut \
--                          -Dclippy::needless_bitwise_bool \
--                          -Dclippy::needless_continue \
--                          -Dclippy::no_mangle_with_rust_abi \
-+                          -Wrustdoc::missing_crate_level_docs \
-+                          -Wclippy::correctness -Wclippy::style \
-+                          -Wclippy::suspicious -Wclippy::complexity \
-+                          -Wclippy::perf \
-+                          -Wclippy::let_unit_value -Wclippy::mut_mut \
-+                          -Wclippy::needless_bitwise_bool \
-+                          -Wclippy::needless_continue \
-+                          -Wclippy::no_mangle_with_rust_abi \
-                           -Wclippy::dbg_macro
- KBUILD_HOSTCFLAGS   := $(KBUILD_USERHOSTCFLAGS) $(HOST_LFS_CFLAGS) $(HOSTCFLAGS)
-@@ -572,7 +574,7 @@ KBUILD_RUSTFLAGS := $(rust_common_flags) \
-                   -Csymbol-mangling-version=v0 \
-                   -Crelocation-model=static \
-                   -Zfunction-sections=n \
--                  -Dclippy::float_arithmetic
-+                  -Wclippy::float_arithmetic
- KBUILD_AFLAGS_KERNEL :=
- KBUILD_CFLAGS_KERNEL :=
-diff --git a/rust/Makefile b/rust/Makefile
-index 333b9a482473..12b9d78fd25c 100644
---- a/rust/Makefile
-+++ b/rust/Makefile
-@@ -422,7 +422,7 @@ ifneq ($(or $(CONFIG_ARM64),$(and $(CONFIG_RISCV),$(CONFIG_64BIT))),)
- endif
- $(obj)/core.o: private skip_clippy = 1
--$(obj)/core.o: private skip_flags = -Dunreachable_pub
-+$(obj)/core.o: private skip_flags = -Wunreachable_pub
- $(obj)/core.o: private rustc_objcopy = $(foreach sym,$(redirect-intrinsics),--redefine-sym $(sym)=__rust$(sym))
- $(obj)/core.o: private rustc_target_flags = $(core-cfgs)
- $(obj)/core.o: $(RUST_LIB_SRC)/core/src/lib.rs scripts/target.json FORCE
-@@ -433,7 +433,7 @@ $(obj)/compiler_builtins.o: $(src)/compiler_builtins.rs $(obj)/core.o FORCE
-       $(call if_changed_dep,rustc_library)
- $(obj)/alloc.o: private skip_clippy = 1
--$(obj)/alloc.o: private skip_flags = -Dunreachable_pub
-+$(obj)/alloc.o: private skip_flags = -Wunreachable_pub
- $(obj)/alloc.o: private rustc_target_flags = $(alloc-cfgs)
- $(obj)/alloc.o: $(src)/alloc/lib.rs $(obj)/compiler_builtins.o FORCE
-       $(call if_changed_dep,rustc_library)
--- 
-2.39.5
-
index d7e7e9e7638dfe767a176cea5530637983e9eb15..d4fcfe87ea9128cf69b23e35426d9e9967e4075c 100644 (file)
@@ -11,8 +11,6 @@ smb-client-stop-flooding-dmesg-in-smb2_calc_signatur.patch
 smb-client-fix-use-after-free-of-signing-key.patch
 usb-dwc3-gadget-add-missing-check-for-single-port-ra.patch
 sched-initialize-idle-tasks-only-once.patch
-rust-relax-most-deny-level-lints-to-warnings.patch
-rust-allow-clippy-needless_lifetimes.patch
 numa-optimize-detection-of-memory-with-no-node-id-as.patch
 memblock-allow-zero-threshold-in-validate_numa_conve.patch
 ext4-convert-to-new-timestamp-accessors.patch