From: Alice Ryhl <aliceryhl@google.com>
To: Zhi Wang <zhiw@nvidia.com>
Cc: Alice Ryhl <aliceryhl@google.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
andrewjballance@gmail.com, daniel.almeida@collabora.com,
dakr@kernel.org, ojeda@kernel.org, boqun@kernel.org,
gary@garyguo.net, bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, tmgross@umich.edu, cjia@nvidia.com,
smitra@nvidia.com, ankita@nvidia.com, aniketa@nvidia.com,
kwankhede@nvidia.com, targupta@nvidia.com, kjaju@nvidia.com,
alkumar@nvidia.com, acourbot@nvidia.com, jhubbard@nvidia.com,
zhiwang@kernel.org
Subject: Re: [PATCH v3 5/5] rust: device: add dynamic debug support to dev_dbg!
Date: Fri, 16 Oct 2026 08:41:24 +0000 [thread overview]
Message-ID: <20261016084124.3495380-1-aliceryhl@google.com> (raw)
In-Reply-To: <20261001145940.1077801-6-zhiw@nvidia.com>
On Thu, Oct 01, 2026 at 05:59:40PM +0300, Zhi Wang wrote:
> +__rust_helper void rust_helper_ddebug_dev_print(struct _ddebug *descriptor,
> + const struct device *dev,
> + const void *args)
> +{
> + __dynamic_dev_dbg(descriptor, dev, "%pA", args);
> + if (descriptor->flags & _DPRINTK_FLAGS_INCL_STACK)
> + dump_stack();
> +}
Nit (also applies to `rust_helper_ddebug_print` in patch 4/5): if patch 3/5
also exposes `__dynamic_dump_stack` under `#ifdef CONFIG_DYNAMIC_DEBUG_CORE`,
both helpers can use `__dynamic_dump_stack((*descriptor))` instead of
open-coding the `_DPRINTK_FLAGS_INCL_STACK` check.
> + pub unsafe fn dev_print<Ctx: DeviceContext>(
> + descriptor: *mut Self,
> + dev: &Device<Ctx>,
> + args: fmt::Arguments<'_>,
> + ) {
Please add `#[inline]` here too.
Alice
next prev parent reply other threads:[~2026-10-16 8:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 14:59 [PATCH v3 0/5] Rust dynamic debug support for pr_debug! and dev_dbg! Zhi Wang
2026-10-01 14:59 ` [PATCH v3 1/5] gpu: nova-core: validate firmware versions before debug logging Zhi Wang
2026-10-01 14:59 ` [PATCH v3 2/5] rust: jump label: add support for nested arguments Zhi Wang
2026-10-01 14:59 ` [PATCH v3 3/5] dynamic_debug: expose printing declarations with the core enabled Zhi Wang
2026-10-01 14:59 ` [PATCH v3 4/5] rust: print: add dynamic debug support to pr_debug! Zhi Wang
2026-10-16 8:50 ` Alice Ryhl
2026-10-01 14:59 ` [PATCH v3 5/5] rust: device: add dynamic debug support to dev_dbg! Zhi Wang
2026-10-16 8:41 ` Alice Ryhl [this message]
2026-10-15 19:29 ` [PATCH v3 0/5] Rust dynamic debug support for pr_debug! and dev_dbg! Zhi Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261016084124.3495380-1-aliceryhl@google.com \
--to=aliceryhl@google.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=alkumar@nvidia.com \
--cc=andrewjballance@gmail.com \
--cc=aniketa@nvidia.com \
--cc=ankita@nvidia.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=cjia@nvidia.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=kjaju@nvidia.com \
--cc=kwankhede@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=smitra@nvidia.com \
--cc=targupta@nvidia.com \
--cc=tmgross@umich.edu \
--cc=zhiw@nvidia.com \
--cc=zhiwang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®