[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240711060601.fmnttgqhbh2pitzj@vireshk-i7>
Date: Thu, 11 Jul 2024 11:36:01 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Alice Ryhl <aliceryhl@...gle.com>, Boqun Feng <boqun.feng@...il.com>,
Danilo Krummrich <dakr@...hat.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...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@...sung.com>, linux-pm@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>,
Stephen Boyd <sboyd@...nel.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
Subject: Re: [RFC PATCH V3 8/8] cpufreq: Add Rust based cpufreq-dt driver
On 10-07-24, 17:28, Danilo Krummrich wrote:
> No, the platform driver layer will only guarantee that it decreses the reference
> count of the `Arc` by one, that doesn't guarantee a free. If something else
> still holds a reference to the `Arc` it will keep the `Registration` alive,
> unless it's wrapped by `Devres`.
I see. Thanks.
There is one problem that I haven't found a solution to yet. If I make
the following change to the driver:
diff --git a/drivers/cpufreq/rcpufreq_dt.rs b/drivers/cpufreq/rcpufreq_dt.rs
index 315adca2a747..052ea2db095a 100644
--- a/drivers/cpufreq/rcpufreq_dt.rs
+++ b/drivers/cpufreq/rcpufreq_dt.rs
@@ -236,7 +236,7 @@ fn probe(dev: &mut platform::Device, _id_info: Option<&Self::IdInfo>) -> Result<
module_platform_driver! {
type: CPUFreqDTDriver,
- name: "cpufreq_dt",
+ name: "cpufreq-dt",
author: "Viresh Kumar <viresh.kumar@...aro.org>",
description: "Generic CPUFreq DT driver",
license: "GPL v2",
then I get this error:
CLIPPY drivers/cpufreq/rcpufreq_dt.o
error: expected one of `:`, `;`, or `=`, found `-`
--> /mnt/ssd/all/work/repos/kernel/linux/drivers/cpufreq/rcpufreq_dt.rs:237:1
|
237 | / module_platform_driver! {
238 | | type: CPUFreqDTDriver,
239 | | name: "cpufreq-dt",
240 | | author: "Viresh Kumar <viresh.kumar@...aro.org>",
241 | | description: "Generic CPUFreq DT driver",
242 | | license: "GPL v2",
243 | | }
| |_^ expected one of `:`, `;`, or `=`
|
= note: this error originates in the macro
`$crate::prelude::module` which comes from the expansion of the
macro `module_platform_driver` (in Nightly builds, run with -Z
macro-backtrace for more info)
And because of that I had to change the name of the platform device
too in the existing kernel.
--
viresh
Powered by blists - more mailing lists