Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1157063rwl; Wed, 5 Apr 2023 12:39:03 -0700 (PDT) X-Google-Smtp-Source: AKy350bahrhncD4pz9yUOsFgQq8P/NMLY8jPixH3E9oRNvspE8GAU3obHW78iMaHi0KlMxCo0Win X-Received: by 2002:a05:6a20:7f5a:b0:e6:7279:238e with SMTP id e26-20020a056a207f5a00b000e67279238emr210035pzk.60.1680723543747; Wed, 05 Apr 2023 12:39:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680723543; cv=none; d=google.com; s=arc-20160816; b=kXgr5SIVNm5SkKXOF2ApNdbnq5J9fcVlBH78NhG+dV+rGflsGDvCi6pdgYh0zzU41Q +uupQUiLNKVcLJuJO27+Ap+GyT73TKFwaOxsWVUQ+x2usAAj5DMsGx995b6j5e/JvMa5 /H/br1pwiu7czkkxdIVJ+4+PJWQjAG7PtZCfg+HiN9MLtD+yxKw7m0aKfoiXCof+AUaX wUHEwv+RSGBwbUQmgQ1VhsUVwGk95kklzX3p0t+qZOuGAQk9P/a82r3Kb/khh6JCWDTz r2dcjAuKRLAfbuioDecxlg2UEXxITAap9Jw7KcliN0eOW48WrCADDWc0YFKnG3QOLsWR +6lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=gdEIW+2bBi1IvDlMbXGasea4+ibnJ2p7QwfZLUN+zQA=; b=YSPyLE/eVM6Yg4ebI392f/iog12tPlBBpGwcClsCC5r3Oc2OKlG4jriypokwXu3Kh9 9817IaIfJPg++GNesm8lak60b5HB0ntmPA11o2MiJx6y4ncd9THNJY9sA4BpbJ7bn7Lc fSw/FlyXP7pv8obeR/isDUooZAoRqeBTm2bKC9ePToOZ5mjJ9GQvivQt35CdnVimIcUy kUFgiNvMee05BCEFXmqNwgK+9KRRF5UeB9dhhCiBMQBcdh5jivyKC49i1rQVtVM+FQzC YsFB7uB6lj0m09272qb0NwT7SWxyM8RnyGASdBYrtz0/N079qDsVlgAU37bG6ekIa0qQ B5zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=vseFoYZ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i125-20020a625483000000b005e06c0a9852si13214754pfb.179.2023.04.05.12.38.52; Wed, 05 Apr 2023 12:39:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=vseFoYZ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234141AbjDETiB (ORCPT + 99 others); Wed, 5 Apr 2023 15:38:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234120AbjDEThj (ORCPT ); Wed, 5 Apr 2023 15:37:39 -0400 Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB3B17D80 for ; Wed, 5 Apr 2023 12:37:18 -0700 (PDT) Date: Wed, 05 Apr 2023 19:36:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1680723416; x=1680982616; bh=gdEIW+2bBi1IvDlMbXGasea4+ibnJ2p7QwfZLUN+zQA=; 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=vseFoYZ2AedjxwlXJ3fIjHnHGUIujb/axlbQHpdZbxcvkaslLN1WTFsA7YM3LB858 pvGizao1DJjhKyBl5p537z73NOCdj8QKKV0wxa8vDj1p/P/N1pwYEIsvwH95IH7M/i 7atH4Ra2gTX00vff6+oQkXRiBbmAYenT3MLkzkdvZfo83e5cbHej45umedVd5CMw6T 5vJGlDEJGGHciHru9A9lR0u5EV/UFjCLbaQywYwQhX6KaWBvFsUG/jIsucCcbFqjq6 qxMaxldA43c/Qj2lugQvRJGBBbu1/HQPdMJy/sTz4tnKDF8AD1em+wG2NUQ8pepM39 GsZn59T03sAjg== To: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Alice Ryhl , Andreas Hindborg From: Benno Lossin Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Benno Lossin , Alice Ryhl , Andreas Hindborg Subject: [PATCH v6 12/15] rust: prelude: add `pin-init` API items to prelude Message-ID: <20230405193445.745024-13-y86-dev@protonmail.com> In-Reply-To: <20230405193445.745024-1-y86-dev@protonmail.com> References: <20230405193445.745024-1-y86-dev@protonmail.com> Feedback-ID: 40624463:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add `pin-init` API macros and traits to the prelude. Signed-off-by: Benno Lossin Reviewed-by: Gary Guo Reviewed-by: Alice Ryhl Reviewed-by: Andreas Hindborg --- rust/kernel/prelude.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust/kernel/prelude.rs b/rust/kernel/prelude.rs index 0bc1c97e5604..fcdc511d2ce8 100644 --- a/rust/kernel/prelude.rs +++ b/rust/kernel/prelude.rs @@ -18,7 +18,7 @@ pub use core::pin::Pin; pub use alloc::{boxed::Box, vec::Vec}; #[doc(no_inline)] -pub use macros::{module, vtable}; +pub use macros::{module, pin_data, pinned_drop, vtable}; pub use super::build_assert; @@ -27,8 +27,12 @@ pub use super::build_assert; pub use super::dbg; pub use super::{pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr= _notice, pr_warn}; +pub use super::{init, pin_init, try_init, try_pin_init}; + pub use super::static_assert; pub use super::error::{code::*, Error, Result}; pub use super::{str::CStr, ThisModule}; + +pub use super::init::{InPlaceInit, Init, PinInit}; -- 2.39.2