public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rust: cpufreq: fix clippy::double_parens warning in Policy doctest
@ 2026-03-04 19:53 John Hubbard
  2026-03-04 20:06 ` Gary Guo
  2026-03-04 20:30 ` [PATCH] rust: cpufreq: fix clippy::double_parens warning in Policy doctest Gary Guo
  0 siblings, 2 replies; 19+ messages in thread
From: John Hubbard @ 2026-03-04 19:53 UTC (permalink / raw)
  To: Rafael J . Wysocki, Viresh Kumar
  Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich, linux-pm, rust-for-linux, LKML, John Hubbard

Clippy reports:
    warning: consider removing unnecessary double parentheses
      --> rust/kernel/cpufreq.rs:410:60
       |
   410 |     pr_info!("The policy details are: {:?}\n", (policy.cpu(), policy.cur()));
       |                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Fix this by using separate format arguments.

Fixes: 6ebdd7c93177 ("rust: cpufreq: Extend abstractions for policy and driver ops")
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
 rust/kernel/cpufreq.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/cpufreq.rs b/rust/kernel/cpufreq.rs
index 76faa1ac8501..e94a17731557 100644
--- a/rust/kernel/cpufreq.rs
+++ b/rust/kernel/cpufreq.rs
@@ -407,7 +407,7 @@ pub fn to_table(mut self) -> Result<TableBox> {
 ///         .set_fast_switch_possible(true)
 ///         .set_transition_latency_ns(DEFAULT_TRANSITION_LATENCY_NS);
 ///
-///     pr_info!("The policy details are: {:?}\n", (policy.cpu(), policy.cur()));
+///     pr_info!("The policy details are: cpu={:?}, cur={:?}\n", policy.cpu(), policy.cur());
 /// }
 /// ```
 #[repr(transparent)]

base-commit: ecc64d2dc9ff9738d2a896beb68e02c2feaf9a02
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-03-16 13:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 19:53 [PATCH] rust: cpufreq: fix clippy::double_parens warning in Policy doctest John Hubbard
2026-03-04 20:06 ` Gary Guo
2026-03-04 20:07   ` John Hubbard
2026-03-04 20:28     ` Gary Guo
2026-03-04 20:32       ` John Hubbard
2026-03-04 20:39       ` Gary Guo
2026-03-04 21:13         ` John Hubbard
2026-03-05 12:31           ` Gary Guo
2026-03-06 12:36             ` Miguel Ojeda
2026-03-07 17:09               ` [RFC PATCH] rust: kbuild: support global per-version flags Miguel Ojeda
2026-03-15 21:21                 ` Miguel Ojeda
2026-03-15 21:22                   ` Miguel Ojeda
2026-03-16  0:04                   ` Mark Brown
2026-03-16  4:49                     ` Miguel Ojeda
2026-03-16 12:50                       ` Mark Brown
2026-03-16 12:31                         ` Danilo Krummrich
2026-03-16 13:42                         ` Miguel Ojeda
2026-03-04 20:30 ` [PATCH] rust: cpufreq: fix clippy::double_parens warning in Policy doctest Gary Guo
2026-03-04 20:34   ` John Hubbard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox