From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2247DC5AD7B for ; Mon, 10 Aug 2026 22:25:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 46B4510E9ED; Mon, 10 Aug 2026 22:25:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="euduUV6I"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9425510E9ED for ; Mon, 10 Aug 2026 22:25:33 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 15C1F6001D; Mon, 10 Aug 2026 22:25:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F098E1F000E9; Mon, 10 Aug 2026 22:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786400732; bh=ekDFqJQI2Yz8ZpLPXEvnu+7Loc6fimyyDwLc6ggBW8A=; h=Date:Subject:Cc:To:From:References:In-Reply-To; b=euduUV6IBiNgWrzraW66ig7gCW5o2VIUdZ2euN9+HH7E6efccB3fO4j6zzcciS1f3 DKBaIL4jNk+pJw67emLPjWIc7mraOA7G3VkG8Hcl4/m9HUTkaXeD6dNo+1TfheEhkx h4oVbL00C4j19kowsBIz8Nmj4S8E7pU5PdvlqJW/1O4U/tsPVgYgZPI+wkItCKWG94 mQLahGMDdWjBSOHDWLMTDkVo2vABeP2kqRA4qjCsGIE3zVi6x32JU4/zrs2vVTfecq n+MoS9opNV00kolJp/+w4YQn5KQKZAVrJWJBpdlMZ/KiKgUZjHZnqH0GhjbOLScAES H6ou3ASQ7qT7A== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 11 Aug 2026 00:25:25 +0200 Message-Id: Subject: Re: [PATCH v2 03/12] rust: num: add Bounded::shr_exact Cc: "Alexandre Courbot" , "Yury Norov" , "Miguel Ojeda" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "Daniel Almeida" , "Tamir Duberstein" , =?utf-8?q?Onur_=C3=96zkan?= , "David Airlie" , "Simona Vetter" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "Jonathan Corbet" , "Shuah Khan" , "John Hubbard" , "Alistair Popple" , "Timur Tabi" , , , , , To: "Eliot Courtney" From: "Danilo Krummrich" References: <20260810-pramin-split-v2-0-65a00b3c7309@nvidia.com> <20260810-pramin-split-v2-3-65a00b3c7309@nvidia.com> In-Reply-To: <20260810-pramin-split-v2-3-65a00b3c7309@nvidia.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon Aug 10, 2026 at 3:55 PM CEST, Eliot Courtney wrote: > Add `shr_exact` in the vein of `try_shrink` which shifts a bounded right > only if it loses no set bits. This is useful for getting a shifted down > integer while simultaneously checking that it's aligned. > > Signed-off-by: Eliot Courtney > Acked-by: Alexandre Courbot Reviewed-by: Danilo Krummrich