public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
	Alexandre Courbot <acourbot@nvidia.com>
Cc: "Joel Fernandes" <joelagnelf@nvidia.com>,
	"Timur Tabi" <ttabi@nvidia.com>,
	"Alistair Popple" <apopple@nvidia.com>,
	"Eliot Courtney" <ecourtney@nvidia.com>,
	"Shashank Sharma" <shashanks@nvidia.com>,
	"Zhi Wang" <zhiw@nvidia.com>, "David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	rust-for-linux@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	"John Hubbard" <jhubbard@nvidia.com>
Subject: [PATCH v2 0/1] rust: cpufreq: suppress clippy::double_parens in Policy doctest
Date: Wed, 11 Mar 2026 21:19:33 -0700	[thread overview]
Message-ID: <20260312041934.362840-1-jhubbard@nvidia.com> (raw)

The kernel fmt! proc macro wraps each format argument as &(arg).
Passing a tuple like (a, b) produces &((a, b)) after expansion,
which Clippy flags as double_parens. This is a false positive,
fixed in Clippy 1.92 (rust-lang/rust-clippy#15939), but the
minimum toolchain (1.78) still triggers it.

Add a local #[allow] with a reason attribute on the affected
doctest function so it can be removed once the minimum toolchain
moves past 1.92.

Changes in v2:
* Drop the v1 approach of splitting format arguments.

* Drop the rustdoc_test_gen.rs blanket suppress (was posted
  inline during discussion, never sent as a formal patch).

* Instead, add a local #[allow(clippy::double_parens)] with a
  reason attribute on the specific doctest, per Gary and Miguel's
  suggestions.

v1 is here:
    https://lore.kernel.org/20260304195330.185829-1-jhubbard@nvidia.com

John Hubbard (1):
  rust: cpufreq: suppress clippy::double_parens in Policy doctest

 rust/kernel/cpufreq.rs | 1 +
 1 file changed, 1 insertion(+)


base-commit: 80234b5ab240f52fa45d201e899e207b9265ef91
-- 
2.53.0


             reply	other threads:[~2026-03-12  4:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12  4:19 John Hubbard [this message]
2026-03-12  4:19 ` [PATCH v2 1/1] rust: cpufreq: suppress clippy::double_parens in Policy doctest John Hubbard
2026-03-12  6:03 ` [PATCH v2 0/1] " Miguel Ojeda
2026-03-12  6:07   ` Viresh Kumar
2026-03-12  6:17     ` Miguel Ojeda
2026-03-12 10:11 ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260312041934.362840-1-jhubbard@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=joelagnelf@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=shashanks@nvidia.com \
    --cc=simona@ffwll.ch \
    --cc=tmgross@umich.edu \
    --cc=ttabi@nvidia.com \
    --cc=zhiw@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox