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] [thread-next>] [day] [month] [year] [list]
Message-ID: <0cd42d2d683ea057e6034978b02c7f84.sboyd@kernel.org>
Date: Thu, 06 Feb 2025 12:05:59 -0800
From: Stephen Boyd <sboyd@...nel.org>
To: Danilo Krummrich <dakr@...nel.org>, Viresh Kumar <viresh.kumar@...aro.org>
Cc: Rafael J. Wysocki <rafael@...nel.org>, Miguel Ojeda <miguel.ojeda.sandonis@...il.com>, Danilo Krummrich <dakr@...hat.com>, Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, Michael Turquette <mturquette@...libre.com>, linux-pm@...r.kernel.org, Vincent Guittot <vincent.guittot@...aro.org>, Nishanth Menon <nm@...com>, rust-for-linux@...r.kernel.org, Manos Pitsidianakis <manos.pitsidianakis@...aro.org>, Erik Schilling <erik.schilling@...aro.org>, Alex Bennée <alex.bennee@...aro.org>, Joakim Bech <joakim.bech@...aro.org>, Rob Herring <robh@...nel.org>, linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org
Subject: Re: [PATCH V8 06/14] rust: Add bare minimal bindings for clk framework

Quoting Danilo Krummrich (2025-02-06 03:52:41)
> On Thu, Feb 06, 2025 at 12:49:14PM +0100, Danilo Krummrich wrote:
> > On Thu, Feb 06, 2025 at 02:58:27PM +0530, Viresh Kumar wrote:
> > > diff --git a/rust/kernel/clk.rs b/rust/kernel/clk.rs
> > > new file mode 100644
> > > index 000000000000..123cdb43b115
> > > --- /dev/null
> > > +++ b/rust/kernel/clk.rs
> > > @@ -0,0 +1,48 @@
> > > +// SPDX-License-Identifier: GPL-2.0
> > > +
> > > +//! Clock abstractions.
> > > +//!
> > > +//! C header: [`include/linux/clk.h`](srctree/include/linux/clk.h)
> > > +
> > > +use crate::{
> > > +    bindings,
> > > +    device::Device,
> > > +    error::{from_err_ptr, Result},
> > > +    prelude::*,
> > > +};
> > > +
> > > +use core::ptr;
> > > +
> > > +/// A simple implementation of `struct clk` from the C code.
> > > +#[repr(transparent)]
> > > +pub struct Clk(*mut bindings::clk);
> > 
> > Guess this should be Opaque<bindings::clk>.
> 
> Sorry, I meant NonNull<bindings::clk>.

NULL is a valid clk. It's like "don't care" in the common clk framework
as most clk consumer operations bail out early in that case.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ