FAILED: patch "[PATCH] rust: allow `clippy::collapsible_if` globally" failed to apply to 6.12-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 2adc8664018c1cc595c7c0c98474a33c7fe32a85
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051210-epic-emblaze-b4eb@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 2adc8664018c1cc595c7c0c98474a33c7fe32a85 Mon Sep 17 00:00:00 2001
From: Miguel Ojeda <[email protected]>
Date: Sun, 26 Apr 2026 16:42:01 +0200
Subject: [PATCH] rust: allow clippy::collapsible_if globally
Similar to clippy::collapsible_match (globally allowed in the previous commit), the clippy::collapsible_if lint [1] can make code harder to read in certain cases.
Thus just let developers decide on their own.
In addition, remove the existing expect we had.
Makefile +1 -0
@@ -486,6 +486,7 @@ export rust_common_flags := --edition=2021 \ -Wclippy::as_ptr_cast_mut \ -Wclippy::as_underscore \ -Wclippy::cast_lossless \ + -Aclippy::collapsible_if \ -Aclippy::collapsible_match \ -Wclippy::ignored_unit_patterns \ -Aclippy::incompatible_msrv \
drivers/android/binder/range_alloc/array.rs +0 -1
@@ -204,7 +204,6 @@ pub(crate) fn reservation_abort(&mut self, offset: usize) -> Result<FreedRange>// caller will mark them as unused, which means that they can be freed if the system comes // under memory pressure. let mut freed_range =FreedRange ::interior_pages (offset, size); -#[expect(clippy::collapsible_if)] // reads better like this if offset %PAGE_SIZE !=0 {if i ==0 || self.ranges[i -1 ].endpoint () <= (offset &PAGE_MASK ) { freed_range.start_page_idx -=1 ;
Quoted 5 lines · On Tue, May 12, 2026 at 2:46 PM <[email protected]> wrote:
The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Since otherwise there would be conflicts, I sent it as a reply to the other one:
https://lore.kernel.org/stable/[email protected]/
(I could have made them a series)
Cheers,
Miguel