From: sashiko-bot@kernel.org
To: "Daniel Almeida" <daniel.almeida@collabora.com>
Cc: dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org,
ojeda@kernel.org, gary@garyguo.net
Subject: Re: [PATCH v6 1/7] rust: clk: use 'kernel vertical style' for imports
Date: Tue, 13 Oct 2026 17:15:36 +0000 [thread overview]
Message-ID: <sashiko-outbox-170199@kernel.org> (raw)
In-Reply-To: <20261013-clk-type-state-v6-1-a5e9977b3509@collabora.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] rust: clk: missing trailing // in vertical imports in doctests
--
commit d1e8fb84f14ee05c8bc2b0c2603a25f2c8d23a0f
Author: Daniel Almeida <daniel.almeida@collabora.com>
rust: clk: use 'kernel vertical style' for imports
This commit converts all imports in the clk module to use the kernel
vertical style. It also drops the Result import since it is provided
by the prelude.
Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> diff --git a/rust/kernel/clk.rs b/rust/kernel/clk.rs
> index f04f5c4a03d64..c73fe7c572511 100644
> --- a/rust/kernel/clk.rs
> +++ b/rust/kernel/clk.rs
[ ... ]
> @@ -119,9 +125,11 @@ mod common_clk {
> /// The following example demonstrates how to obtain and configure a clock for a device.
> ///
> /// ```
> - /// use kernel::clk::{Clk, Hertz};
> + /// use kernel::clk::{
> + /// Clk,
> + /// Hertz,
> + /// };
[Severity: Low]
This isn't a bug, but should this vertical import have a trailing // empty
comment? According to Documentation/rust/coding-guidelines.rst, vertical
imports require a trailing // to prevent rustfmt from collapsing the lines.
It looks like the doc test for Clk::get is missing it here.
> /// use kernel::device::Device;
> - /// use kernel::error::Result;
> ///
> /// fn configure_clk(dev: &Device) -> Result {
> /// let clk = Clk::get(dev, Some(c"apb_clk"))?;
[ ... ]
> @@ -293,9 +301,11 @@ fn drop(&mut self) {
> /// device. The code functions correctly whether or not the clock is available.
> ///
> /// ```
> - /// use kernel::clk::{OptionalClk, Hertz};
> + /// use kernel::clk::{
> + /// Hertz,
> + /// OptionalClk,
> + /// };
[Severity: Low]
Similarly, should the vertical import in the OptionalClk::get doc test also
include a trailing // comment to match the kernel vertical style guidelines?
> /// use kernel::device::Device;
> - /// use kernel::error::Result;
> ///
> /// fn configure_clk(dev: &Device) -> Result {
> /// let clk = OptionalClk::get(dev, Some(c"apb_clk"))?;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261013-clk-type-state-v6-0-a5e9977b3509@collabora.com?part=1
next prev parent reply other threads:[~2026-10-13 17:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 17:07 [PATCH v6 0/7] Clk improvements Daniel Almeida
2026-10-13 17:07 ` Daniel Almeida
2026-10-13 17:07 ` [PATCH v6 1/7] rust: clk: use 'kernel vertical style' for imports Daniel Almeida
2026-10-13 17:07 ` Daniel Almeida
2026-10-13 17:15 ` sashiko-bot [this message]
2026-10-13 17:07 ` [PATCH v6 2/7] rust: clk: replace `OptionalClk` with `Clk::get_optional()` Daniel Almeida
2026-10-13 17:07 ` Daniel Almeida
2026-10-13 17:15 ` sashiko-bot
2026-10-13 17:07 ` [PATCH v6 3/7] rust: clk: use the type-state pattern Daniel Almeida
2026-10-13 17:07 ` Daniel Almeida
2026-10-13 17:07 ` [PATCH v6 4/7] rust: clk: add guards for scoped prepare and enable Daniel Almeida
2026-10-13 17:07 ` Daniel Almeida
2026-10-13 17:07 ` [PATCH v6 5/7] rust: clk: add devres-managed clks Daniel Almeida
2026-10-13 17:07 ` Daniel Almeida
2026-10-13 17:07 ` [PATCH v6 6/7] rust: clk: add `ExclusiveClk` Daniel Almeida
2026-10-13 17:07 ` Daniel Almeida
2026-10-13 17:14 ` Daniel Almeida
2026-10-13 17:14 ` Daniel Almeida
2026-10-13 17:07 ` [PATCH v6 7/7] pwm: th1520: Lock clock rate with clk_rate_exclusive_get Daniel Almeida
2026-10-13 17:07 ` Daniel Almeida
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=sashiko-outbox-170199@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=linux-clk@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.