lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9765df90-df3a-48ed-88d8-b5de5b1d0540@gmail.com>
Date: Sat, 21 Jun 2025 05:28:18 +0200
From: Dirk Behme <dirk.behme@...il.com>
To: Igor Korotin <igor.korotin.linux@...il.com>,
 "Rafael J . Wysocki" <rafael@...nel.org>, Alex Gaynor
 <alex.gaynor@...il.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Miguel Ojeda <ojeda@...nel.org>, Rob Herring <robh@...nel.org>,
 Saravana Kannan <saravanak@...gle.com>
Cc: Alex Hung <alex.hung@....com>, Andrew Morton <akpm@...ux-foundation.org>,
 Jakub Kicinski <kuba@...nel.org>,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>,
 Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
 Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
 Remo Senekowitsch <remo@...nzli.dev>, Tamir Duberstein <tamird@...il.com>,
 Viresh Kumar <viresh.kumar@...aro.org>,
 Wedson Almeida Filho <wedsonaf@...il.com>,
 Xiangfei Ding <dingxiangfei2009@...il.com>, devicetree@...r.kernel.org,
 linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
 rust-for-linux@...r.kernel.org, Björn Roy Baron
 <bjorn3_gh@...tonmail.com>, Alice Ryhl <aliceryhl@...gle.com>,
 Andreas Hindborg <a.hindborg@...nel.org>, Benno Lossin <lossin@...nel.org>,
 Boqun Feng <boqun.feng@...il.com>, Danilo Krummrich <dakr@...nel.org>,
 Gary Guo <gary@...yguo.net>, Len Brown <lenb@...nel.org>,
 Trevor Gross <tmgross@...ch.edu>
Subject: Re: [PATCH v8 2/9] samples: rust: platform: don't call as_ref()
 repeatedly

On 20.06.25 17:18, Igor Korotin wrote:
> From: Danilo Krummrich <dakr@...nel.org>
> 
> In SampleDriver::probe() don't call pdev.as_ref() repeatedly, instead
> introduce a dedicated &Device.
> 
> Signed-off-by: Danilo Krummrich <dakr@...nel.org>
> Signed-off-by: Igor Korotin <igor.korotin.linux@...il.com>


Reviewed-by: Dirk Behme <dirk.behme@...bosch.com>

Thanks!

Dirk

> ---
>  samples/rust/rust_driver_platform.rs | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/samples/rust/rust_driver_platform.rs b/samples/rust/rust_driver_platform.rs
> index c0abf78d0683..000bb915af60 100644
> --- a/samples/rust/rust_driver_platform.rs
> +++ b/samples/rust/rust_driver_platform.rs
> @@ -32,13 +32,15 @@ fn probe(
>          pdev: &platform::Device<Core>,
>          info: Option<&Self::IdInfo>,
>      ) -> Result<Pin<KBox<Self>>> {
> -        dev_dbg!(pdev.as_ref(), "Probe Rust Platform driver sample.\n");
> +        let dev = pdev.as_ref();
> +
> +        dev_dbg!(dev, "Probe Rust Platform driver sample.\n");
>  
>          if let Some(info) = info {
> -            dev_info!(pdev.as_ref(), "Probed with info: '{}'.\n", info.0);
> +            dev_info!(dev, "Probed with info: '{}'.\n", info.0);
>          }
>  
> -        Self::properties_parse(pdev.as_ref())?;
> +        Self::properties_parse(dev)?;
>  
>          let drvdata = KBox::new(Self { pdev: pdev.into() }, GFP_KERNEL)?;
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ