From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3B963911D3 for ; Tue, 12 May 2026 12:46:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778589979; cv=none; b=OdcA6cL0H+gYy3nUU/ZmoWnONYy7vAHAl94+5/d3KGTSMm4JMkkvPOZG8Cm3ZSzU5uF9JmT0WgRkacWvbb1CUgX77p1wZxZ0WuOKNREFj/d3EjU8wsTo6yCDqQyuriY8FfijNWXOj9Kz4Hu2AbsitR8C3qv96qKBNJ77EvMIWc4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778589979; c=relaxed/simple; bh=veSKUSwKfwBcjRSKEYClz3LSwU/uQcMApITIn3blKL0=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=govj8sS+Ex15CRBZ8zPuAndDt82sOb4duBP3AuwqBHPZb/hdw1asMpudF07OYs3YRCZRRgIsKci2DM4klM3RPx1vvMqKr4wT35J8ZYOWArGGuQZZ4p+5mv6UAhq6rTK+1rGvvZLXcbAz5sEQGW1sfEyzEPPsZQ6rZrj3XgxulT8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kmx5stCq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="kmx5stCq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA434C2BCB0; Tue, 12 May 2026 12:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778589979; bh=veSKUSwKfwBcjRSKEYClz3LSwU/uQcMApITIn3blKL0=; h=Subject:To:Cc:From:Date:From; b=kmx5stCq3Bo0xOJl1TX21eTS23nDkGa+63JttLvD7JN+cYg1gMA9tSZ3SwSY3Jchy 8sisK5WsShVSBFOD1G0mVSHBbOtP7y+wt+XWQyOZJBt4erW/5kpS3D9UYTV800IvZA rVBszVUfC4iXc2lh4lP+IXVaR0xXSAU2WU3cwVvo= Subject: FAILED: patch "[PATCH] rust: allow `clippy::collapsible_if` globally" failed to apply to 6.12-stable tree To: ojeda@kernel.org,gary@garyguo.net Cc: From: Date: Tue, 12 May 2026 14:44:10 +0200 Message-ID: <2026051210-epic-emblaze-b4eb@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit 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 . 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 # git commit -s git send-email --to '' --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 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. Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs). Suggested-by: Gary Guo Link: https://lore.kernel.org/rust-for-linux/DGROP5CHU1QZ.1OKJRAUZXE9WC@garyguo.net/ Link: https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [1] Reviewed-by: Gary Guo Link: https://patch.msgid.link/20260426144201.227108-2-ojeda@kernel.org Signed-off-by: Miguel Ojeda diff --git a/Makefile b/Makefile index 621d84aa4700..28f4ae452441 100644 --- a/Makefile +++ b/Makefile @@ -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 \ diff --git a/drivers/android/binder/range_alloc/array.rs b/drivers/android/binder/range_alloc/array.rs index ada1d1b4302e..081d19b09d4b 100644 --- a/drivers/android/binder/range_alloc/array.rs +++ b/drivers/android/binder/range_alloc/array.rs @@ -204,7 +204,6 @@ pub(crate) fn reservation_abort(&mut self, offset: usize) -> Result // 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;