All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Gary Guo" <gary@garyguo.net>
Cc: "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>,
	"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>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Onur Özkan" <work@onurozkan.dev>,
	"Matthew Maurer" <mmaurer@google.com>,
	driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust: soc: silence clippy warning with rustc >= 1.88
Date: Wed, 08 Jul 2026 17:25:32 +0900	[thread overview]
Message-ID: <DJT1OEEX0LQU.H9DPHR1SBN9X@nvidia.com> (raw)
In-Reply-To: <DJSET0S73YYD.2HCX79F9XAWF3@garyguo.net>

On Tue Jul 7, 2026 at 11:30 PM JST, Gary Guo wrote:
> On Tue Jul 7, 2026 at 3:19 PM BST, Alexandre Courbot wrote:
>> On Tue Jul 7, 2026 at 9:12 PM JST, Miguel Ojeda wrote:
>>> On Tue, Jul 7, 2026 at 1:43 PM Gary Guo <gary@garyguo.net> wrote:
>>>>
>>>> We set `msrv = "1.85"` in our .clippy.toml, and my local testing with 1.88 and
>>>> 1.96.1 doesn't produce this warning.
>>>
>>> Yeah, I was trying to reproduce it locally too and didn't succeed yet.
>>
>> Ok so this is nuts but it appears to only reproduce when
>> `CONFIG_CC_OPTIMIZE_FOR_SIZE=y` (and `CONFIG_SAMPLE_RUST_SOC=m` to build
>> `soc.rs`)
>
> That's crazy. Turns out that clippy's default equivalent check relies on MIR:
> https://github.com/rust-lang/rust-clippy/blob/60f8c3a019cfda37e07de60e9cfd7ee77b290fb5/clippy_utils/src/lib.rs#L570
> and somehow this check misses `null()` when opt level is high enough. There
> isn't a check for MSRV in the trait impl.
>
> Please report a clippy bug.

Done: https://github.com/rust-lang/rust-clippy/issues/17379

As for this patch, I guess we don't need it then?

  reply	other threads:[~2026-07-08  8:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07 10:12 [PATCH] rust: soc: silence clippy warning with rustc >= 1.88 Alexandre Courbot
2026-07-07 11:11 ` Onur Özkan
2026-07-07 11:43 ` Gary Guo
2026-07-07 12:12   ` Alexandre Courbot
2026-07-07 12:12   ` Miguel Ojeda
2026-07-07 14:19     ` Alexandre Courbot
2026-07-07 14:30       ` Gary Guo
2026-07-08  8:25         ` Alexandre Courbot [this message]
2026-07-08  9:04           ` Miguel Ojeda
2026-07-08 10:11             ` Alexandre Courbot

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=DJT1OEEX0LQU.H9DPHR1SBN9X@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=driver-core@lists.linux.dev \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=mmaurer@google.com \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.