Message ID | 20230207185216.1314638-3-boqun.feng@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3022357wrn; Tue, 7 Feb 2023 11:01:57 -0800 (PST) X-Google-Smtp-Source: AK7set/8AS3rQFRjN3t+okJHt4sNQSE5wCHSotInXIi9RBgcAntPzMqz3ZAMlsWb9/n5gsO4XYVH X-Received: by 2002:a50:9b1b:0:b0:47e:eaae:9a5b with SMTP id o27-20020a509b1b000000b0047eeaae9a5bmr4769549edi.42.1675796517701; Tue, 07 Feb 2023 11:01:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675796517; cv=none; d=google.com; s=arc-20160816; b=RF+0d8wIv/7eqOYocEFkKY163jMeoS6w4vCi156KPx9FEhGrRni9n9ror1vNxW6+CT S9td6bPV/IQ2XH+d+HxsvM0OEagy/USjaPGTA0HAwJ6TnnwlMcrxdlKrY0ui8jzLUaqb i2eWC8wO5tqft236fKBwOfkViHcka1MXyKRtov+feA/d1pn1i+FNkbqwmAknTRbEN7zo 9naqHteCLER37timVUDtBQVv01m1tkeBkckdfhRxcQ3b2oqx7xgq73L4QearKCBxGrC0 xA22GLk1urTddLGLrrwH2vIv+vzTAHIRxHPHWzKyEXMijlu4sy/JZOnRTKZAkgI+7jZ9 eseQ== 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 :feedback-id:dkim-signature; bh=pw0ByORIxbzjhrXTdLg80T0eGpn6Y+jK2lz5pJ++YH8=; b=XjdC8sKlVENhdukmQdJz9cnrocDVNYMmpKTfqaY9bL8PaHbToOdisL1rMgx4cr4Pxj x7I2xPY8C1f92wHgqVHSQGS8DfpydleDk0X4XWfY2H/aOIxysdC0iITXJeVSfRI7n5g8 xzlxgGxX9IOHx9n1oq45OuTaoWBq5IL6nOGot0F74in5zNZ+29/cz8WOFnhqa9EVD9lF jT1gm5YoKbGaK5bwfmPn2jki0iJINnTFyT04Kl8bou/VaDFoRi52irgSNQI2sMZ2dbhR rCxr4DT8hj4ILiWWOFIKmvSKZDtivWdCikQBQnwqcJ30nOK4iTLzAiv4l2W3H+mRJgkm zvJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZncQL7xo; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a170906968900b0088ef8637b30si15088441ejx.568.2023.02.07.11.01.34; Tue, 07 Feb 2023 11:01:57 -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=@gmail.com header.s=20210112 header.b=ZncQL7xo; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232016AbjBGSw5 (ORCPT <rfc822;kmanaouilinux@gmail.com> + 99 others); Tue, 7 Feb 2023 13:52:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232361AbjBGSwv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 7 Feb 2023 13:52:51 -0500 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B251103; Tue, 7 Feb 2023 10:52:50 -0800 (PST) Received: by mail-qt1-x82b.google.com with SMTP id c2so17892199qtw.5; Tue, 07 Feb 2023 10:52:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:from:to:cc:subject :date:message-id:reply-to; bh=pw0ByORIxbzjhrXTdLg80T0eGpn6Y+jK2lz5pJ++YH8=; b=ZncQL7xoNfDQKYP2yNCeYPlLtuGapA/miBtdGv+YudqBd6A4483uU9LQ9tZ7Z6MALU WdMoI7xGiho0iARaGqGVxHmQIcesZ59Y2/6KR572sn1DMC0CfV2MqOx5rN1c5zBCtyJ1 dt3tEWWt5tht3s9NrenVZa/Y4XcPWOWTZKtSsfLVlzVzPyjD2OxC+TEzgqLgVqS2ZO7K nV27ZVwikFgP1d6l67GLr/UKOM/cU93+dU7luJ1MGhMvX01hv/BWabyWiTS4waYuThA+ GzZxf2XjNpnO8ORApL/h1OsjWrTfp9ol35xjPhuIxTCJobkyNyTHzmsUugyROy4HsyIj qLWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=pw0ByORIxbzjhrXTdLg80T0eGpn6Y+jK2lz5pJ++YH8=; b=3fQdLBFziCr6fxyviDPq7KLC/c0fhmLLhRvTz/6ujEzshmqatLKKavVWpafsOvg2IG B9+cTftS2iYcG4+HtP+4eRcJo8chEXjk1xtfctVAPznRXitTtKbw5ruz6MgsPMZ27uRk 1YY0XApK+bys4BIsQfdlF7zLb7ef9Yjy5lJ1jovf+Zc+WYYYCFsI+9R11wYduqfEfUNp hiKuQMNWzBFUf+gcK1hWZaK+2ACKvNAUd7zmL2VIekpyNQBWFe3uiuL6hdu0IIhIzj7h VwDfceJg6Iu/5dMK0qJjp+RY6MhB+832/j6RMPtei6de0ktEZqObXtkP5PUyNhJR+h1x cpTw== X-Gm-Message-State: AO0yUKUs8rXtY9agCrZEObIhfkTbeznsAoodHIZFvw6DvoKDaBkrNGWk 1Us496UvPpoOAeh3N3I+EpcxgTrJQP4= X-Received: by 2002:ac8:7fc2:0:b0:3ba:1360:ec0a with SMTP id b2-20020ac87fc2000000b003ba1360ec0amr7070190qtk.41.1675795969132; Tue, 07 Feb 2023 10:52:49 -0800 (PST) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id f9-20020ac84989000000b003b869f71eedsm9729924qtq.66.2023.02.07.10.52.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 10:52:48 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 4022D27C0054; Tue, 7 Feb 2023 13:52:48 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 07 Feb 2023 13:52:48 -0500 X-ME-Sender: <xms:AJ7iY_nk_S9FixChLO9NteFEiAzPJamGcJBtrv8Y-VEgdbaWLSRp1w> <xme:AJ7iYy1QVNaEGvRFoIw6wnp12HAyQIN4curYxuMpL9abpTnz7_z-NPAqo1Bxzkhca On0N6oiTch68nceww> X-ME-Received: <xmr:AJ7iY1rpyugx41U-I-Hkf0wK-WI46O27d11p8NJne-1gMes4F7q6Kz5Nf2w> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudegkedgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepueho qhhunhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtf frrghtthgvrhhnpeehffeiheehhfevhefhleefjedtiedtjefhveekfeejiedugeekkeeu uefhieevkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeeh tdeigedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmse hfihigmhgvrdhnrghmvg X-ME-Proxy: <xmx:AJ7iY3mj59usEzwkmLbKf07rlDL_PPDKoNO-v7WoTt7HhnyMpvd3lw> <xmx:AJ7iY90UT5xG8OJURtcUYUZ5lFpsQuLBWcWmPv08aUO6FQ8icEnp-w> <xmx:AJ7iY2sMDf3K82L7K3wsPtRgvcNC4i983cORJZsPsvdB6jcAfwGUjg> <xmx:AJ7iY82VScQmvIeqPIRbqRFGuoa2E7VYBkK8QaalyJ3d8xhSkJrIIg> Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Feb 2023 13:52:47 -0500 (EST) From: Boqun Feng <boqun.feng@gmail.com> To: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Cc: Miguel Ojeda <ojeda@kernel.org>, Alex Gaynor <alex.gaynor@gmail.com>, Wedson Almeida Filho <wedsonaf@gmail.com>, Boqun Feng <boqun.feng@gmail.com>, Gary Guo <gary@garyguo.net>, =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@protonmail.com>, Vincenzo Palazzo <vincenzopalazzodev@gmail.com>, Will Deacon <will@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Mark Rutland <mark.rutland@arm.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, =?utf-8?q?Sergio_Gonz?= =?utf-8?q?=C3=A1lez_Collado?= <sergio.collado@gmail.com>, Finn Behrens <fin@nyantec.com> Subject: [PATCH v2 2/2] sample: rust: print: Add sampe code for Arc printing Date: Tue, 7 Feb 2023 10:52:16 -0800 Message-Id: <20230207185216.1314638-3-boqun.feng@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230207185216.1314638-1-boqun.feng@gmail.com> References: <20230207185216.1314638-1-boqun.feng@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757200009008470948?= X-GMAIL-MSGID: =?utf-8?q?1757200009008470948?= |
Series |
rust: sync: Arc: Implement Debug and Display
|
|
Commit Message
Boqun Feng
Feb. 7, 2023, 6:52 p.m. UTC
This both demonstrates the usage of different print format in Rust and serves as a selftest for the `Display` and `Debug` implementation of `Arc` and its friends. Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com> Reviewed-by: Finn Behrens <fin@nyantec.com> Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> --- samples/rust/rust_print.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
Comments
On Tue, 7 Feb 2023 10:52:16 -0800 Boqun Feng <boqun.feng@gmail.com> wrote: > This both demonstrates the usage of different print format in Rust and > serves as a selftest for the `Display` and `Debug` implementation of > `Arc` and its friends. > > Signed-off-by: Boqun Feng <boqun.feng@gmail.com> > Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com> > Reviewed-by: Finn Behrens <fin@nyantec.com> > Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> Reviewed-by: Gary Guo <gary@garyguo.net> > --- > samples/rust/rust_print.rs | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/samples/rust/rust_print.rs b/samples/rust/rust_print.rs > index 8b39d9cef6d1..165a8d7b1c07 100644 > --- a/samples/rust/rust_print.rs > +++ b/samples/rust/rust_print.rs > @@ -15,6 +15,30 @@ module! { > > struct RustPrint; > > +fn arc_print() -> Result { > + use kernel::sync::*; > + > + let a = Arc::try_new(1)?; > + let b = UniqueArc::try_new("hello, world")?; > + > + // Prints the value of data in `a`. > + pr_info!("{}", a); > + > + // Uses ":?" to print debug fmt of `b`. > + pr_info!("{:?}", b); > + > + let a: Arc<&str> = b.into(); > + let c = a.clone(); > + > + // Uses `dbg` to print, will move `c`. > + dbg!(c); > + > + // Prints debug fmt with pretty-print "#" and number-in-hex "x". > + pr_info!("{:#x?}", a); > + > + Ok(()) > +} > + > impl kernel::Module for RustPrint { > fn init(_module: &'static ThisModule) -> Result<Self> { > pr_info!("Rust printing macros sample (init)\n"); > @@ -43,6 +67,8 @@ impl kernel::Module for RustPrint { > pr_cont!(" is {}", "continued"); > pr_cont!(" with {}\n", "args"); > > + arc_print()?; > + > Ok(RustPrint) > } > }
Boqun Feng <boqun.feng@gmail.com> writes: > This both demonstrates the usage of different print format in Rust and > serves as a selftest for the `Display` and `Debug` implementation of > `Arc` and its friends. > > Signed-off-by: Boqun Feng <boqun.feng@gmail.com> > Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com> > Reviewed-by: Finn Behrens <fin@nyantec.com> > Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> > --- Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com> > samples/rust/rust_print.rs | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/samples/rust/rust_print.rs b/samples/rust/rust_print.rs > index 8b39d9cef6d1..165a8d7b1c07 100644 > --- a/samples/rust/rust_print.rs > +++ b/samples/rust/rust_print.rs > @@ -15,6 +15,30 @@ module! { > > struct RustPrint; > > +fn arc_print() -> Result { > + use kernel::sync::*; > + > + let a = Arc::try_new(1)?; > + let b = UniqueArc::try_new("hello, world")?; > + > + // Prints the value of data in `a`. > + pr_info!("{}", a); > + > + // Uses ":?" to print debug fmt of `b`. > + pr_info!("{:?}", b); > + > + let a: Arc<&str> = b.into(); > + let c = a.clone(); > + > + // Uses `dbg` to print, will move `c`. > + dbg!(c); > + > + // Prints debug fmt with pretty-print "#" and number-in-hex "x". > + pr_info!("{:#x?}", a); > + > + Ok(()) > +} > + > impl kernel::Module for RustPrint { > fn init(_module: &'static ThisModule) -> Result<Self> { > pr_info!("Rust printing macros sample (init)\n"); > @@ -43,6 +67,8 @@ impl kernel::Module for RustPrint { > pr_cont!(" is {}", "continued"); > pr_cont!(" with {}\n", "args"); > > + arc_print()?; > + > Ok(RustPrint) > } > }
On Tue, Feb 7, 2023 at 7:52 PM Boqun Feng <boqun.feng@gmail.com> wrote: > > + // Uses `dbg` to print, will move `c`. > + dbg!(c); Perhaps: // Uses `dbg` to print, will move `c` (for temporary debugging purposes). dbg!(c); To make it clear it is not meant to be usually committed into the tree. > + // Prints debug fmt with pretty-print "#" and number-in-hex "x". > + pr_info!("{:#x?}", a); Apparently, `:#x?` is a bit of an accident: `#` means "alternate" form, but it turns out it applies to both `x` and `?`, i.e. it is not that `#` alone implies pretty-printing. Given the above and that there are improvements under discussion upstream, perhaps we could avoid giving details for the moment and just say what it does as a whole, e.g. // Pretty-prints the debug formatting with lower-case hexadecimal integers. pr_info!("{:#x?}", a); Some links for those interested: https://doc.rust-lang.org/std/fmt/index.html#sign0, https://github.com/rust-lang/rust/issues/75766, https://github.com/rust-lang/rust/pull/99138#issuecomment-1385331055 and https://github.com/rust-lang/libs-team/issues/165. Finally, there is a small typo in the commit title. What about: rust: samples: print: add sample code for `Arc` printing I can change these bits on my side if you want & agree with them, to avoid a v3 just for this. Thanks for these patches, Boqun! Cheers, Miguel
On Wed, Feb 08, 2023 at 04:19:04PM +0100, Miguel Ojeda wrote: > On Tue, Feb 7, 2023 at 7:52 PM Boqun Feng <boqun.feng@gmail.com> wrote: > > > > + // Uses `dbg` to print, will move `c`. > > + dbg!(c); > > Perhaps: > > // Uses `dbg` to print, will move `c` (for temporary debugging purposes). > dbg!(c); > > To make it clear it is not meant to be usually committed into the tree. > Thanks! > > + // Prints debug fmt with pretty-print "#" and number-in-hex "x". > > + pr_info!("{:#x?}", a); > > Apparently, `:#x?` is a bit of an accident: `#` means "alternate" > form, but it turns out it applies to both `x` and `?`, i.e. it is not > that `#` alone implies pretty-printing. > Oh, good to know! > Given the above and that there are improvements under discussion > upstream, perhaps we could avoid giving details for the moment and > just say what it does as a whole, e.g. > > // Pretty-prints the debug formatting with lower-case hexadecimal integers. > pr_info!("{:#x?}", a); > > Some links for those interested: > https://doc.rust-lang.org/std/fmt/index.html#sign0, > https://github.com/rust-lang/rust/issues/75766, > https://github.com/rust-lang/rust/pull/99138#issuecomment-1385331055 > and https://github.com/rust-lang/libs-team/issues/165. > > Finally, there is a small typo in the commit title. What about: > > rust: samples: print: add sample code for `Arc` printing > Hmm.. I'm OK with this change, but it's not a typo ;-) I deliberately 1) capitalize the first letter after subsystem tags in the title since that's kinda the rule for a few subsystems I usually work on, I don't have my own preference, just something I'm used to ;-) 2) avoid using "`" in the title to save space because title space is precious. > I can change these bits on my side if you want & agree with them, to > avoid a v3 just for this. > That'll be great, thanks! Regards, Boqun > Thanks for these patches, Boqun! > > Cheers, > Miguel
On Wed, Feb 8, 2023 at 5:34 PM Boqun Feng <boqun.feng@gmail.com> wrote: > > Hmm.. I'm OK with this change, but it's not a typo ;-) By typo I meant the "sampe", not the other changes -- sorry, I should have been more clear. > 1) capitalize the first letter after subsystem tags in the title > since that's kinda the rule for a few subsystems I usually work > on, I don't have my own preference, just something I'm used to > ;-) Yeah, I don't mind one way or the other (in fact, personally I prefer uppercase slightly because it is a bit easier to "scan" visually to see where it starts after the prefixes). The lowercase one is just the one we have used so far for Rust (which I picked looking at what Linus et al. usually do). > 2) avoid using "`" in the title to save space because title space > is precious. I see, makes sense, thanks! Cheers, Miguel
On Wed, Feb 08, 2023 at 05:56:43PM +0100, Miguel Ojeda wrote: > On Wed, Feb 8, 2023 at 5:34 PM Boqun Feng <boqun.feng@gmail.com> wrote: > > > > Hmm.. I'm OK with this change, but it's not a typo ;-) > > By typo I meant the "sampe", not the other changes -- sorry, I should > have been more clear. Ah, good eyes! Sorry I missed that twice: one when submitting and one you mention it's a typo ;-( Regards, Boqun > > > 1) capitalize the first letter after subsystem tags in the title > > since that's kinda the rule for a few subsystems I usually work > > on, I don't have my own preference, just something I'm used to > > ;-) > > Yeah, I don't mind one way or the other (in fact, personally I prefer > uppercase slightly because it is a bit easier to "scan" visually to > see where it starts after the prefixes). The lowercase one is just the > one we have used so far for Rust (which I picked looking at what Linus > et al. usually do). > > > 2) avoid using "`" in the title to save space because title space > > is precious. > > I see, makes sense, thanks! > > Cheers, > Miguel
diff --git a/samples/rust/rust_print.rs b/samples/rust/rust_print.rs index 8b39d9cef6d1..165a8d7b1c07 100644 --- a/samples/rust/rust_print.rs +++ b/samples/rust/rust_print.rs @@ -15,6 +15,30 @@ module! { struct RustPrint; +fn arc_print() -> Result { + use kernel::sync::*; + + let a = Arc::try_new(1)?; + let b = UniqueArc::try_new("hello, world")?; + + // Prints the value of data in `a`. + pr_info!("{}", a); + + // Uses ":?" to print debug fmt of `b`. + pr_info!("{:?}", b); + + let a: Arc<&str> = b.into(); + let c = a.clone(); + + // Uses `dbg` to print, will move `c`. + dbg!(c); + + // Prints debug fmt with pretty-print "#" and number-in-hex "x". + pr_info!("{:#x?}", a); + + Ok(()) +} + impl kernel::Module for RustPrint { fn init(_module: &'static ThisModule) -> Result<Self> { pr_info!("Rust printing macros sample (init)\n"); @@ -43,6 +67,8 @@ impl kernel::Module for RustPrint { pr_cont!(" is {}", "continued"); pr_cont!(" with {}\n", "args"); + arc_print()?; + Ok(RustPrint) } }