From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A27E535CB8F for ; Mon, 23 Feb 2026 11:23:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771845829; cv=none; b=JLo9tlFRIW96JosHEciWH/PFqs/Pcp9SLIvs+LQ/8sJpSuboQ00yL5Nq7P32nB53p6fpzDNdydhMaDydlw717KisAGDJGcOi3Lkwn/9Hk5/UH3a14CVHIra4WUfTbGTkRnlZjCpBdT4IxlSoBK/PLDI1qmsOri3nuKxBv9QQWp0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771845829; c=relaxed/simple; bh=nWimSMfoh0LM9JwVbRmZZAKSTbjL8JAXDNUEZYCzCQA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=OCI1IDl6T8/xyBvKdYQskxHdkAl4RijlvXiqI+PosCEsK7t8jyGFBEeHhylWcPkC32BjdK0BIPA/HEZa3lux6zQBIQr0vWgBf3oP1dv03eigzQH91OLDhzz+kdAuOry+0q2RVt0Yfo6UV2Cd5KomAg1GQl8+kcmmOx11hPdlc3c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=zcHNqgAw; arc=none smtp.client-ip=209.85.128.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="zcHNqgAw" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4836e35292cso35918055e9.1 for ; Mon, 23 Feb 2026 03:23:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1771845825; x=1772450625; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=N5sqVBklMNFd+AwWdw1mQppSBmesqWMHAjeKbhCCvH0=; b=zcHNqgAw33T7aj408isMKcJTxDThhaIZDBD5UWxcbH0fF7A7dRD8VaDAupr89gdTg3 5JIwjALO4gIDCg/ebdUO2ERCtCPRagt6Hxp2WwI+5L4ObeFg4YERJ8gMRMXdR51X0FOz vdmqgGAiCOgORSbEgLAgp0Af9bEPM3o7J+K328qVhhrUovU08VM2GYXMrrNlqIE5AW6w YerOOS6sAQwKMNg9GPiJAvMcZjuuNDR+oM6A5zsf7p2fVyWh8qSuDd93m49JVY2PiAsI zp/tzN2+EaMNVVxvIZ7GLmCdMIdPjm6yIFwMBD83KYhH6ROUseFKAkgrbKb5OFd9En5O m8DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771845825; x=1772450625; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N5sqVBklMNFd+AwWdw1mQppSBmesqWMHAjeKbhCCvH0=; b=o1NBew5n19ZrU6KbblIHr4+EF90eI/ObHm+6NEWQ6k/B1/pT7wj0gbROLlnSPbkuXN k+Tscvvv/KpDuiYGLtRWzNpBoKM8cJwzuxZNagvMabTeiJF1AkCM7Tvw4ErLaLxGJEUb F3UYcgSDWdy5Gkce7J/fK0kgrmUiYOkoApqn0V1vB4GxLrGJlMDNrYmhhhjVPJT+TE2O 0lO0QWaiPtB2s8PDUmIbosKAgGww9bmRJ+BSMxsqYSIj37kuAShPSilWkh92OQrXw9ep UMFCK0M1y+j6xQSlAkN6na9e9WwH9sMRCcgy2kCcpKhcKqENlq6YC4cr8Z2yghdJLamo e58g== X-Forwarded-Encrypted: i=1; AJvYcCXUB02X8ttgnTN4XDbIcmpzqu/dxvVZ8BtwoQsQL2K6hNKR8BTD6msg3qR8PGOOWelM+waBZvBqmSOW+FU=@vger.kernel.org X-Gm-Message-State: AOJu0YzmGcowHMCviA3MBc8owDlAZoygTl7PaVwKF84JmvCvK3T1PIg/ U0nPozIH/2VVRUv1+8geBz2M+8r0/iwZwkegfjYyMpcCJVfBSNyk2XvNcdzXiFtek8V83TGtL3s QxCOT7I6fMMM2Kq+l8w== X-Received: from wmbf24.prod.google.com ([2002:a05:600c:5958:b0:483:6c98:3d2f]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:a418:b0:483:b3d7:2e80 with SMTP id 5b1f17b1804b1-483b3d72f30mr25074315e9.33.1771845825030; Mon, 23 Feb 2026 03:23:45 -0800 (PST) Date: Mon, 23 Feb 2026 11:23:44 +0000 In-Reply-To: <20260221020952.412352-22-jhubbard@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260221020952.412352-1-jhubbard@nvidia.com> <20260221020952.412352-22-jhubbard@nvidia.com> Message-ID: Subject: Re: [PATCH v5 21/38] rust: ptr: add const_align_up() and enable inline_const feature From: Alice Ryhl To: John Hubbard Cc: Danilo Krummrich , Alexandre Courbot , Joel Fernandes , Timur Tabi , Alistair Popple , Eliot Courtney , Zhi Wang , David Airlie , Simona Vetter , Bjorn Helgaas , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , nouveau@lists.freedesktop.org, rust-for-linux@vger.kernel.org, LKML Content-Type: text/plain; charset="utf-8" On Fri, Feb 20, 2026 at 06:09:35PM -0800, John Hubbard wrote: > Add const_align_up() to kernel::ptr as the const-compatible > equivalent of Alignable::align_up(). This uses inline_const to validate > the alignment at compile time with a clear error message. > > Add inline_const to rust_allowed_features in scripts/Makefile.build, > following the approach in [1]. > > [1] https://lore.kernel.org/rust-for-linux/20260206171253.2704684-2-gary@kernel.org/ > > Suggested-by: Danilo Krummrich > Suggested-by: Miguel Ojeda > Signed-off-by: John Hubbard Note that Rust Binder's ptr_align could use this if you want another user. Alice