Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2384818rwb; Fri, 2 Dec 2022 09:05:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf4lnhmfkRMUR04ihRrtK/XNBx8n/1NkSFPHApekzJ0R1KHUu1anoozyRtfTxDuEB2lOfPRF X-Received: by 2002:a05:6402:361:b0:46c:25ea:731 with SMTP id s1-20020a056402036100b0046c25ea0731mr3836701edw.194.1670000710860; Fri, 02 Dec 2022 09:05:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670000710; cv=none; d=google.com; s=arc-20160816; b=muhcW/BdTUxgsh7RAfOvlrFbLymiFZIrLJj5bNPlPHvZZY5PkyacTTGSWZnZHvWwT2 4H/4jybHj+Z0mkuBJxJN0BrOLL0AybQQ4aL/Cd1jxOtvyYxh9fMqc184EqrPiMDQgf3V HliA6pzBdW/IjXFi1vOkmmPEOSS13CQhrulwu5vP3pSvnHe5/TAT9ajqrPgWgLyW7i+z GZEtwdcvIogE/uLsc/Fi0hINg3NgClHjP45E91CQqrcNOAR6soybiYkM99ko/VMcMm/5 2KRwzYE786AZnoGE1K2EjiubO5p24T/SVXu+HusS3kNQFm+9bXjyo/+6AGKnb5KG9pSH GM6w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/Ohf8zV24wuuXaQRlwMY2G3Iy3P8pF+T/K2OT4EaT/Q=; b=HJVaKY+gpXDsNY9VpbiWsawLAO22xDRCvsX6D3iEvrmuLU0YL1z2km4dYph759aHm+ sbZ1kMxrDl4amZhBHfyB/evV60BSbT2u9oH5g/UH31lMFtJqL0WCamrsAwm35/Y/ObOh rxTd+PVUHJ3OOu+S2RDJ5som8wFCBV+6/zZ4QY2LnkeA4QN5JdNk4Yuu/m5fBLSDlC+o F/j7/FfDRMlnukaHbt1YFd9IMEM4/PkhjswyXirQr8Pp1GOKWph8kDNdUjXjGKRxx+Rb 1yQ603SnYiaN/4AU6MfJCXJxmfh1Oss4/TEeGGzXHZIgDpeoawYTo0QnJsz2rkDKN6+H l+MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=beKukvFA; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a50d64c000000b00461be535949si6170521edj.424.2022.12.02.09.04.49; Fri, 02 Dec 2022 09:05:10 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=beKukvFA; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233760AbiLBQPi (ORCPT + 82 others); Fri, 2 Dec 2022 11:15:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233570AbiLBQPe (ORCPT ); Fri, 2 Dec 2022 11:15:34 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CE69AD30A; Fri, 2 Dec 2022 08:15:33 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EAAA2B821E8; Fri, 2 Dec 2022 16:15:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80E1EC43470; Fri, 2 Dec 2022 16:15:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669997730; bh=VSt+/hGabeANQLeUUkDMOId6k6ru4ZPGzmVrw2MIUuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=beKukvFATiP3u3Xmr1v5gXIFi9wWHxS2ykMD9tlunHXc0BjJhHm/7q+kk4wJE0ZDd hZqg8ob2kXYdCh+NZA7oIOv6mMoIPjK2nTBZEo22zPv58BgXDSvVRTZeNSzmto5K6u 3FaBYP0EzT4WRCn/By0vFwDnxZpt+mODz4ADYxZGtf9aYrTSam0ZBk1iuRxxTYiswM l788yFfb5w8NzJqPmgWhfR0a6KD4pvHRZ60BjMVHyxPs9E6GbMYv9hGBsOxzmiaLY0 FKpbd2GlRVljMf5qO/NaoUzsNPUQBB8fjz1/nJFavwPt8woD+NzJ+gQdGzI1oQ6YRw gZenyb9qJdpgA== From: ojeda@kernel.org To: Miguel Ojeda , Wedson Almeida Filho , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Wei Liu Subject: [PATCH v2 01/28] rust: prelude: split re-exports into groups Date: Fri, 2 Dec 2022 17:14:32 +0100 Message-Id: <20221202161502.385525-2-ojeda@kernel.org> In-Reply-To: <20221202161502.385525-1-ojeda@kernel.org> References: <20221202161502.385525-1-ojeda@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 From: Miguel Ojeda Split the prelude re-exports into groups: first the ones coming from the `core` crate, then `alloc`, then our own crates and finally the ones from modules from `kernel` itself (i.e. `super`). We are doing this manually for the moment, but ideally, long-term, this could be automated via `rustfmt` with options such as `group_imports` and `imports_granularity` (both currently unstable). Reviewed-by: Boqun Feng Reviewed-by: Wei Liu Signed-off-by: Miguel Ojeda --- rust/kernel/prelude.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/rust/kernel/prelude.rs b/rust/kernel/prelude.rs index 495e22250726..f8219285d8c0 100644 --- a/rust/kernel/prelude.rs +++ b/rust/kernel/prelude.rs @@ -11,10 +11,14 @@ //! use kernel::prelude::*; //! ``` -pub use super::{ - error::{Error, Result}, - pr_emerg, pr_info, ThisModule, -}; -pub use alloc::{boxed::Box, vec::Vec}; pub use core::pin::Pin; + +pub use alloc::{boxed::Box, vec::Vec}; + pub use macros::module; + +pub use super::{pr_emerg, pr_info}; + +pub use super::error::{Error, Result}; + +pub use super::ThisModule; -- 2.38.1