[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250207071538.xjxauatta2jsedz4@vireshk-i7>
Date: Fri, 7 Feb 2025 12:45:38 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Danilo Krummrich <dakr@...nel.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Danilo Krummrich <dakr@...hat.com>,
Alex Gaynor <alex.gaynor@...il.com>,
Alice Ryhl <aliceryhl@...gle.com>,
Andreas Hindborg <a.hindborg@...nel.org>,
Benno Lossin <benno.lossin@...ton.me>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Michael Turquette <mturquette@...libre.com>,
Miguel Ojeda <ojeda@...nel.org>, Nishanth Menon <nm@...com>,
Peter Zijlstra <peterz@...radead.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Stephen Boyd <sboyd@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Trevor Gross <tmgross@...ch.edu>, Viresh Kumar <vireshk@...nel.org>,
Yury Norov <yury.norov@...il.com>, linux-pm@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>,
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>,
Anisse Astier <anisse@...ier.eu>, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V8 00/14] Rust bindings for cpufreq and OPP core + sample
driver
Hi Danilo,
On 06-02-25, 12:45, Danilo Krummrich wrote:
> I gave it a quick shot and it seems there are a few Clippy warnings,
I could find only one (related to core::format_args), are there more ?
(Earlier I had a debug commit on top of the series in my branch and
Clippy didn't give any warnings as format_flags was getting used from
there.)
> plus rustfmtcheck complains.
I am not sure how to solve them.
Diff in rust/kernel/cpufreq.rs at line 628:
// SAFETY: The C code returns a valid pointer here, which is again passed to the C code in
// an array.
- attr[next] = unsafe {
- addr_of_mut!(bindings::cpufreq_freq_attr_scaling_available_freqs) as *mut _
- };
+ attr[next] =
+ unsafe { addr_of_mut!(bindings::cpufreq_freq_attr_scaling_available_freqs) as *mut _ };
next += 1;
if boost {
If I move the code as suggested here, then I get warning about not
adding a SAFETY comment for unsafe code (which looks to be a tool
specific bug).
I can move the entire thing into the unsafe block, but the assignment
to attr[next] isn't unsafe.
What do yo suggest here ?
> There are also two minor checkpatch complaints about line length.
Yeah, they came from the first commit (which wasn't written by me and
so I avoided touching it), fixed now.
--
viresh
Powered by blists - more mailing lists