All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Onur Özkan" <work@onurozkan.dev>
To: Daniel Almeida <daniel.almeida@collabora.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Drew Fustini" <fustini@kernel.org>,
	"Guo Ren" <guoren@kernel.org>, "Fu Wei" <wefu@redhat.com>,
	"Uwe Kleine-König" <ukleinek@kernel.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Michal Wilczynski" <m.wilczynski@samsung.com>,
	"Brian Masney" <bmasney@redhat.com>,
	"Boqun Feng" <boqun@kernel.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-riscv@lists.infradead.org,
	linux-pwm@vger.kernel.org, linux-clk@vger.kernel.org,
	rust-for-linux@vger.kernel.org,
	"Boris Brezillon" <boris.brezillon@collabora.com>,
	"Onur Özkan" <work@onurozkan.dev>
Subject: Re: [PATCH v4 3/3] rust: clk: use 'kernel vertical style' for imports
Date: Thu, 18 Jun 2026 10:58:47 +0300	[thread overview]
Message-ID: <20260618075848.28017-1-work@onurozkan.dev> (raw)
In-Reply-To: <20260618-clk-type-state-v4-3-8be082786080@collabora.com>

On Thu, 18 Jun 2026 00:46:37 -0300
Daniel Almeida <daniel.almeida@collabora.com> wrote:

> Convert all imports to use the new import style. This will make it easier
> to land new changes in the future.
> 
> No change of functionality implied.
> 
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>

Reviewed-by: Onur Özkan <work@onurozkan.dev>

> ---
>  rust/kernel/clk.rs | 56 ++++++++++++++++++++++++++++++++++++++++++++----------
>  1 file changed, 46 insertions(+), 10 deletions(-)
> 
> diff --git a/rust/kernel/clk.rs b/rust/kernel/clk.rs
> index 692ee88ca772..1412a2f0aedf 100644
> --- a/rust/kernel/clk.rs
> +++ b/rust/kernel/clk.rs
> @@ -80,12 +80,23 @@ fn from(freq: Hertz) -> Self {
>  mod common_clk {
>      use super::Hertz;
>      use crate::{
> -        device::{Bound, Device},
> -        error::{from_err_ptr, to_result, Result},
> -        prelude::*,
> +        device::{
> +            Bound,
> +            Device, //
> +        },
> +        error::{
> +            from_err_ptr,
> +            to_result,
> +            Result, //
> +        },
> +        prelude::*, //
>      };
>  
> -    use core::{marker::PhantomData, mem::ManuallyDrop, ptr};
> +    use core::{
> +        marker::PhantomData,
> +        mem::ManuallyDrop,
> +        ptr, //
> +    };
>  
>      mod private {
>          pub trait Sealed {}
> @@ -189,8 +200,15 @@ impl<State: ClkState> From<Error<State>> for kernel::error::Error {
>          /// original [`Clk`], e.g.:
>          ///
>          /// ```
> -        /// use kernel::clk::{Clk, Enabled, Unprepared};
> -        /// use kernel::device::{Bound, Device};
> +        /// use kernel::clk::{
> +        ///     Clk,
> +        ///     Enabled,
> +        ///     Unprepared, //
> +        /// };
> +        /// use kernel::device::{
> +        ///     Bound,
> +        ///     Device, //
> +        /// };
>          /// use kernel::error::Result;
>          ///
>          /// fn get_enabled(dev: &Device<Bound>) -> Result<Clk<Enabled>> {
> @@ -240,8 +258,17 @@ fn from(err: Error<State>) -> Self {
>      /// The following example demonstrates how to obtain and configure a clock for a device.
>      ///
>      /// ```
> -    /// use kernel::clk::{Clk, Enabled, Hertz, Unprepared, Prepared};
> -    /// use kernel::device::{Bound, Device};
> +    /// use kernel::clk::{
> +    ///     Clk,
> +    ///     Enabled,
> +    ///     Hertz,
> +    ///     Prepared,
> +    ///     Unprepared, //
> +    /// };
> +    /// use kernel::device::{
> +    ///     Bound,
> +    ///     Device, //
> +    /// };
>      /// use kernel::error::Result;
>      ///
>      /// fn configure_clk(dev: &Device<Bound>) -> Result {
> @@ -287,7 +314,11 @@ fn from(err: Error<State>) -> Self {
>      /// and move between the variants:
>      ///
>      /// ```
> -    /// use kernel::clk::{Clk, Enabled, Prepared};
> +    /// use kernel::clk::{
> +    ///     Clk,
> +    ///     Enabled,
> +    ///     Prepared, //
> +    /// };
>      /// use kernel::error::Result;
>      ///
>      /// enum DeviceClk {
> @@ -481,7 +512,12 @@ pub fn enable(self) -> Result<Clk<Enabled>, Error<Prepared>> {
>          /// clock or threading it through an intermediate state, e.g.:
>          ///
>          /// ```
> -        /// use kernel::clk::{Clk, Enabled, Hertz, Prepared};
> +        /// use kernel::clk::{
> +        ///     Clk,
> +        ///     Enabled,
> +        ///     Hertz,
> +        ///     Prepared, //
> +        /// };
>          /// use kernel::error::Result;
>          ///
>          /// fn read_rate(clk: &Clk<Prepared>) -> Result<Hertz> {
> 
> -- 
> 2.54.0
> 

WARNING: multiple messages have this Message-ID (diff)
From: "Onur Özkan" <work@onurozkan.dev>
To: Daniel Almeida <daniel.almeida@collabora.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Drew Fustini" <fustini@kernel.org>,
	"Guo Ren" <guoren@kernel.org>, "Fu Wei" <wefu@redhat.com>,
	"Uwe Kleine-König" <ukleinek@kernel.org>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Michal Wilczynski" <m.wilczynski@samsung.com>,
	"Brian Masney" <bmasney@redhat.com>,
	"Boqun Feng" <boqun@kernel.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-riscv@lists.infradead.org,
	linux-pwm@vger.kernel.org, linux-clk@vger.kernel.org,
	rust-for-linux@vger.kernel.org,
	"Boris Brezillon" <boris.brezillon@collabora.com>,
	"Onur Özkan" <work@onurozkan.dev>
Subject: Re: [PATCH v4 3/3] rust: clk: use 'kernel vertical style' for imports
Date: Thu, 18 Jun 2026 10:58:47 +0300	[thread overview]
Message-ID: <20260618075848.28017-1-work@onurozkan.dev> (raw)
In-Reply-To: <20260618-clk-type-state-v4-3-8be082786080@collabora.com>

On Thu, 18 Jun 2026 00:46:37 -0300
Daniel Almeida <daniel.almeida@collabora.com> wrote:

> Convert all imports to use the new import style. This will make it easier
> to land new changes in the future.
> 
> No change of functionality implied.
> 
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com>

Reviewed-by: Onur Özkan <work@onurozkan.dev>

> ---
>  rust/kernel/clk.rs | 56 ++++++++++++++++++++++++++++++++++++++++++++----------
>  1 file changed, 46 insertions(+), 10 deletions(-)
> 
> diff --git a/rust/kernel/clk.rs b/rust/kernel/clk.rs
> index 692ee88ca772..1412a2f0aedf 100644
> --- a/rust/kernel/clk.rs
> +++ b/rust/kernel/clk.rs
> @@ -80,12 +80,23 @@ fn from(freq: Hertz) -> Self {
>  mod common_clk {
>      use super::Hertz;
>      use crate::{
> -        device::{Bound, Device},
> -        error::{from_err_ptr, to_result, Result},
> -        prelude::*,
> +        device::{
> +            Bound,
> +            Device, //
> +        },
> +        error::{
> +            from_err_ptr,
> +            to_result,
> +            Result, //
> +        },
> +        prelude::*, //
>      };
>  
> -    use core::{marker::PhantomData, mem::ManuallyDrop, ptr};
> +    use core::{
> +        marker::PhantomData,
> +        mem::ManuallyDrop,
> +        ptr, //
> +    };
>  
>      mod private {
>          pub trait Sealed {}
> @@ -189,8 +200,15 @@ impl<State: ClkState> From<Error<State>> for kernel::error::Error {
>          /// original [`Clk`], e.g.:
>          ///
>          /// ```
> -        /// use kernel::clk::{Clk, Enabled, Unprepared};
> -        /// use kernel::device::{Bound, Device};
> +        /// use kernel::clk::{
> +        ///     Clk,
> +        ///     Enabled,
> +        ///     Unprepared, //
> +        /// };
> +        /// use kernel::device::{
> +        ///     Bound,
> +        ///     Device, //
> +        /// };
>          /// use kernel::error::Result;
>          ///
>          /// fn get_enabled(dev: &Device<Bound>) -> Result<Clk<Enabled>> {
> @@ -240,8 +258,17 @@ fn from(err: Error<State>) -> Self {
>      /// The following example demonstrates how to obtain and configure a clock for a device.
>      ///
>      /// ```
> -    /// use kernel::clk::{Clk, Enabled, Hertz, Unprepared, Prepared};
> -    /// use kernel::device::{Bound, Device};
> +    /// use kernel::clk::{
> +    ///     Clk,
> +    ///     Enabled,
> +    ///     Hertz,
> +    ///     Prepared,
> +    ///     Unprepared, //
> +    /// };
> +    /// use kernel::device::{
> +    ///     Bound,
> +    ///     Device, //
> +    /// };
>      /// use kernel::error::Result;
>      ///
>      /// fn configure_clk(dev: &Device<Bound>) -> Result {
> @@ -287,7 +314,11 @@ fn from(err: Error<State>) -> Self {
>      /// and move between the variants:
>      ///
>      /// ```
> -    /// use kernel::clk::{Clk, Enabled, Prepared};
> +    /// use kernel::clk::{
> +    ///     Clk,
> +    ///     Enabled,
> +    ///     Prepared, //
> +    /// };
>      /// use kernel::error::Result;
>      ///
>      /// enum DeviceClk {
> @@ -481,7 +512,12 @@ pub fn enable(self) -> Result<Clk<Enabled>, Error<Prepared>> {
>          /// clock or threading it through an intermediate state, e.g.:
>          ///
>          /// ```
> -        /// use kernel::clk::{Clk, Enabled, Hertz, Prepared};
> +        /// use kernel::clk::{
> +        ///     Clk,
> +        ///     Enabled,
> +        ///     Hertz,
> +        ///     Prepared, //
> +        /// };
>          /// use kernel::error::Result;
>          ///
>          /// fn read_rate(clk: &Clk<Prepared>) -> Result<Hertz> {
> 
> -- 
> 2.54.0
> 

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-06-18  7:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18  3:46 [PATCH v4 0/3] Clk improvements Daniel Almeida
2026-06-18  3:46 ` Daniel Almeida
2026-06-18  3:46 ` [PATCH v4 1/3] rust: clk: use the type-state pattern Daniel Almeida
2026-06-18  3:46   ` Daniel Almeida
2026-06-18  3:56   ` sashiko-bot
2026-06-18  8:10   ` Onur Özkan
2026-06-18  8:10     ` Onur Özkan
2026-06-28 20:15   ` Maurice
2026-06-28 20:15     ` Maurice
2026-06-18  3:46 ` [PATCH v4 2/3] rust: clk: add devres-managed clks Daniel Almeida
2026-06-18  3:46   ` Daniel Almeida
2026-06-18  3:57   ` sashiko-bot
2026-06-18  3:46 ` [PATCH v4 3/3] rust: clk: use 'kernel vertical style' for imports Daniel Almeida
2026-06-18  3:46   ` Daniel Almeida
2026-06-18  7:58   ` Onur Özkan [this message]
2026-06-18  7:58     ` Onur Özkan
2026-06-18 10:40   ` Miguel Ojeda
2026-06-18 10:40     ` Miguel Ojeda

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=20260618075848.28017-1-work@onurozkan.dev \
    --to=work@onurozkan.dev \
    --cc=a.hindborg@kernel.org \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=bmasney@redhat.com \
    --cc=boqun@kernel.org \
    --cc=boris.brezillon@collabora.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fustini@kernel.org \
    --cc=gary@garyguo.net \
    --cc=guoren@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lossin@kernel.org \
    --cc=m.wilczynski@samsung.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tmgross@umich.edu \
    --cc=tzimmermann@suse.de \
    --cc=ukleinek@kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=wefu@redhat.com \
    /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.