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 A53EB366546; Thu, 5 Mar 2026 12:36:59 +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=1772714219; cv=none; b=cO0v0XfHU4xfAhCjALDDkxwhZMM793ZaHzvA276WKOXWklvFes7mvIthd1eKwF0qBq/I+HWq/mn95qPp7aDFigWeqN+9ssiuatJhBdac/XfNXyQBk9/i6fwOynwg2vmKyacz5ViV+l1Gulb1haDW82GWRBGJGmyG21hYr9NJ+Z4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772714219; c=relaxed/simple; bh=IwDeOBSinEDPZcc6YZoBtnaprgrbyGBbIU/1YYB2on0=; h=Mime-Version:Content-Type:Date:Message-Id:From:Subject:Cc:To: References:In-Reply-To; b=FiRb1X6N10fN2IhbvOGjkzCsBAK6He5oCMYpwmhtLCX6/bP5GyKtbO67cD9p+3G+v2A6pGDvvi0nYvhELcNmFpcWY7QpCsnliLhPl1FVs3FFmbiw4W3jTXcjMlGhCkN1xpHGXWvh5HkrPks9RdkIDw00kGXLBwt8xH6q/BZKKag= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DrJxUYGJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DrJxUYGJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80950C116C6; Thu, 5 Mar 2026 12:36:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772714219; bh=IwDeOBSinEDPZcc6YZoBtnaprgrbyGBbIU/1YYB2on0=; h=Date:From:Subject:Cc:To:References:In-Reply-To:From; b=DrJxUYGJ1sLj2vgjyCHiHKafWP3wG6vaoXugGnGtnEjxDUh0IR0rQV6RDnKsGOL/4 +LGbzPwtePb/Zq/DBzZSKlUsvFkrJbZjiYpFYS0d2jskBYS7yJVeMUKNO90mELEPpi nFBRkBKvxQ6XsLZadHS1FUKvBhm/CymnrhNn2RWbmJVWgyDnKLaySs8Y61vScmHbXV +k2dzbbSJOUyOy5iroHQRdH66v7m/bW/d390z9hUxVT/+XaByssSjnmMrmIw6hMtTu Lar0BGINulgRBTMq3HDmu9dPUv2J/oE2M1a1/+4qbNSj7pX2i4BTrV8Xb6e+ouBWjU eKOFjXIpKh0qA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 05 Mar 2026 13:36:54 +0100 Message-Id: From: "Danilo Krummrich" Subject: Re: [PATCH v5 21/38] rust: ptr: add const_align_up() and enable inline_const feature Cc: "Alexandre Courbot" , "John Hubbard" , "Joel Fernandes" , "Alistair Popple" , "Eliot Courtney" , "Zhi Wang" , "Simona Vetter" , "Bjorn Helgaas" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , , , "LKML" To: "Gary Guo" References: <20260221020952.412352-1-jhubbard@nvidia.com> <20260221020952.412352-22-jhubbard@nvidia.com> <89b240a4-33ec-44dc-8f7c-1a3f8d379e0d@nvidia.com> <282c94d3-f32c-4851-969f-61fc968de6a7@nvidia.com> <2fe31d10-733c-414c-9936-2d892f2a4186@nvidia.com> <3ff4588c-1322-4723-bb30-9049d0b316d6@nvidia.com> <22041c9e-1eda-4273-b5be-6f277dec4a4c@nvidia.com> In-Reply-To: On Thu Mar 5, 2026 at 1:28 PM CET, Gary Guo wrote: > This is fine, too, although I think just returning an `Option` and ask us= er to > unwrap it in const eval is better. Well, that was my initial proposal (except that it was Result and const_expect()). IIRC, you were against this in favor of build_assert!()?