Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2966603lqp; Mon, 25 Mar 2024 14:57:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVfKBWIXdYB36Pb0/xa++AqQCzCvNug62M383TWfFmbVrIdlPe0N1SoGlJl65OPn7KYvl40x+bgUnW6OliOE6bw5shJOT+5PgPK+wZuLg== X-Google-Smtp-Source: AGHT+IHIyFO6fBJE2AsTSWJANfoDwT9zstDDVWojrhpIZWvN4VxcWqQN0zVL2chmxnnAMsjl43NS X-Received: by 2002:a05:6214:5186:b0:696:93c9:7ec4 with SMTP id kl6-20020a056214518600b0069693c97ec4mr2495531qvb.32.1711403826850; Mon, 25 Mar 2024 14:57:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711403826; cv=pass; d=google.com; s=arc-20160816; b=gt+mwNZsUZAGe+FCgn5L6WU2exFzG7nsvGnKWXXEdK6z4FEp+Q3yQlwlDqUfXWqxCJ A4bUk4yuAoe1gEIEzxOjKkhC8z0v9zhAhxr1esmUX73ICcNF2tvkvSJsr7EDMJveNHBg 9BFBRRSmBpAJlKiGBs0QDuOmk0sEOE1GRIFvjJfistmIlkeewUb60d5gLZkCfpXhP5B2 lmqHVREZ1gR1IRD01vmWvkTkjs9mPEOidf7r1Orr7VVERbW2fp9ysUjkN5gzt7DJzIaz 3cmSE9KoYatZkUq1rbQQeRzHuXBFgYFPH18U48d4NnsyZOF6GY0PfV3SkTs2zXcjuLfq J2SA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=Dz6q83jJ87/t3Ux+v9A/Asnbjs+qqD36qRD+CLPZW0Y=; fh=A/Ua4Q351kuGQC3NJfXQlutNC8uk5uNbUXW4Yyk8Cas=; b=pHdRzBoOvsozjd2w3Mit3hyzI9GDK2tIZsI6RFJWJdacod/4wMHhy75BO6oU8SNq4n eHp0vXSbK1b9EDRQNp/7lkYKoLQ2MfvOTx+WP64AB7zW3Fwz+Bw2lG/ql6TYR1vbeNtR T0Dy/0sGY6i6aXxwcAGWD9cTn4NKWANx3+aUHaD38hM5z6DUMXd8NgVKiAIgtoTs0n97 4/PtskhDdjhdFanVKttx8USV+2MUNilvRVBkn0fll9DMMI6BZ0OJ8trEhaR2/dlHFjzG heG8GKweDFQGl9Uz9x9HqS1yCmtBNRYvAmI0g/aY5CF1pStNt1fZI51HM27E43YxifXh nvcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@proton.me header.s=jgurfofczvevtg3jg4ynhn3lsy.protonmail header.b="P/3B1GTf"; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-118067-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118067-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g1-20020a05620a108100b00789eb058e6asi6405355qkk.221.2024.03.25.14.57.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 14:57:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118067-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@proton.me header.s=jgurfofczvevtg3jg4ynhn3lsy.protonmail header.b="P/3B1GTf"; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-118067-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118067-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7A1391C3D0FB for ; Mon, 25 Mar 2024 21:56:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73E5A6FE35; Mon, 25 Mar 2024 21:56:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="P/3B1GTf" Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) (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 2ABDF5A4D3; Mon, 25 Mar 2024 21:56:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711403804; cv=none; b=Q18Tkmkfo1UjmHsd93HcR2aFnnMudK9qijMHO0QfFOFKRXdIJFAIODIw/r9lrv56mz3C58RRk9ECz0lJNDl2/bDndXWTFLUcORasU7/c+YjGJKjyFej5grNIdDwfH2HO9mkiVr7o8YRoe7TmU+3jaRcECA/qMI/Wb75sqbtc3zE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711403804; c=relaxed/simple; bh=xSuiLJKJgLrr21rIadSu5fyq8t/EMn4wKpn41CCECRI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=M9tKwhdJF5opyaEwsB1qzzVTE1Ml/4u7LXzmRmgh94hMYwlhCC5OtqN7+OQtEyuN1V81WvMIhlW5lvL94Obqg5+tdPix9vSrrkQt5kDOBk+f1Xx47uPmggcopKH8qqiyfmSY9y9OFuzbofjLX89qqKJSmdeFAjqh1K0cas6R5A4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=P/3B1GTf; arc=none smtp.client-ip=185.70.43.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=jgurfofczvevtg3jg4ynhn3lsy.protonmail; t=1711403799; x=1711662999; bh=Dz6q83jJ87/t3Ux+v9A/Asnbjs+qqD36qRD+CLPZW0Y=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=P/3B1GTfjq/JZeCR+3RvCiPu+ikuPAfj44GV/OZk4fqTuOlH1BBZ6wflegTV8HuxD aA0m26FIZxUVVCEQAtwnXs4IjCGNFhcJH1p/DanHmXgOG0sgq8mLud99heF1aN62dI hxFLj7t7DcH/2XSsmwdILsy3hrAWQLOFe8Hj7/xIiUFrNwacHBUPS7QQ8ok+D2Baqo 9SsPj6ZHxElQGGbDOdZlNPWxdMUcCh9BLpH9kB7KRVgG0QZ3iOwPU9xGIkTidsNZXv IRHP5BmupgS2U8DuSxie0CsdToFZkWYBNidzQ8DBHCikYW9uprHFLDDUHQNzN1aO2C YCOwjPyIJUcRQ== Date: Mon, 25 Mar 2024 21:56:30 +0000 To: Wedson Almeida Filho From: Benno Lossin Cc: rust-for-linux@vger.kernel.org, Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Alice Ryhl , linux-kernel@vger.kernel.org, Wedson Almeida Filho Subject: Re: [PATCH 01/10] rust: kernel: move `allocator` module under `alloc` Message-ID: <-uzW9xCfocYgSqqwoHB8D6k5CKhc5Rxnrmjq9N8XmTTNVZI3CYHIK9uigpGprs7EDYHWkALopDuv7e9w_FVfZW-9iGh3VlV9WpuSAKAWhFc=@proton.me> In-Reply-To: <20240325195418.166013-2-wedsonaf@gmail.com> References: <20240325195418.166013-1-wedsonaf@gmail.com> <20240325195418.166013-2-wedsonaf@gmail.com> Feedback-ID: 71780778:user:proton Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 25.03.24 20:54, Wedson Almeida Filho wrote:> From: Wedson Almeida Filho = >=20 > We will add more to the `alloc` module in subsequent patches (e.g., > allocation flags and extension traits). >=20 > Signed-off-by: Wedson Almeida Filho One nit below, but feel free to add: Reviewed-by: Benno Lossin > --- > rust/kernel/alloc.rs | 7 +++++++ > rust/kernel/{ =3D> alloc}/allocator.rs | 0 > rust/kernel/lib.rs | 4 +--- > 3 files changed, 8 insertions(+), 3 deletions(-) > create mode 100644 rust/kernel/alloc.rs > rename rust/kernel/{ =3D> alloc}/allocator.rs (100%) >=20 > diff --git a/rust/kernel/alloc.rs b/rust/kernel/alloc.rs > new file mode 100644 > index 000000000000..ccd4149932c3 > --- /dev/null > +++ b/rust/kernel/alloc.rs > @@ -0,0 +1,7 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +//! Allocation support. I think 'Extensions to the `alloc` crate.' fits better. --=20 Cheers, Benno > + > +#[cfg(not(test))] > +#[cfg(not(testlib))] > +mod allocator; > diff --git a/rust/kernel/allocator.rs b/rust/kernel/alloc/allocator.rs > similarity index 100% > rename from rust/kernel/allocator.rs > rename to rust/kernel/alloc/allocator.rs > diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs > index be68d5e567b1..51f30e55bd00 100644 > --- a/rust/kernel/lib.rs > +++ b/rust/kernel/lib.rs > @@ -28,9 +28,7 @@ > // Allow proc-macros to refer to `::kernel` inside the `kernel` crate (= this crate). > extern crate self as kernel; >=20 > -#[cfg(not(test))] > -#[cfg(not(testlib))] > -mod allocator; > +pub mod alloc; > mod build_assert; > pub mod error; > pub mod init; > -- > 2.34.1 >