mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gary Guo" <gary@garyguo.net>
To: "Danilo Krummrich" <dakr@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>
Cc: <aliceryhl@google.com>, <abdiel.janulgue@gmail.com>,
	<daniel.almeida@collabora.com>, <robin.murphy@arm.com>,
	<a.hindborg@kernel.org>, <ojeda@kernel.org>, <boqun@kernel.org>,
	<gary@garyguo.net>, <bjorn3_gh@protonmail.com>,
	<lossin@kernel.org>, <tmgross@umich.edu>, <tamird@kernel.org>,
	<work@onurozkan.dev>, <driver-core@lists.linux.dev>,
	<nova-gpu@lists.linux.dev>, <dri-devel@lists.freedesktop.org>,
	<linux-kernel@vger.kernel.org>, <rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH 1/2] rust: scatterlist: tie owned tables to the device's bound lifetime
Date: Mon, 16 Nov 2026 12:49:51 +0000	[thread overview]
Message-ID: <DMWNC5DLYRO8.1WSI80QE8AOKH@garyguo.net> (raw)
In-Reply-To: <DMWN7AJF6SXX.1HN3UMDROET7F@kernel.org>

On Mon Nov 16, 2026 at 12:43 PM GMT, Danilo Krummrich wrote:
> On Mon Nov 16, 2026 at 5:02 AM CET, Alexandre Courbot wrote:
>>> @@ -81,7 +78,7 @@ pub(crate) fn new(
>>>                      let mut level0 = CoherentBox::<'_, [u64]>::zeroed_slice(
>>>                          dev,
>>>                          GSP_PAGE_SIZE / size_of::<u64>(),
>>> -                        GFP_KERNEL
>>> +                        GFP_KERNEL,
>>
>> Stray hunk? Maybe we can move it to patch 2 since it reformats that part
>> anyway.
>
> I noticed this before sending too, but for some odd reason rustfmt insists on
> this with this change.
>
> When I noticed I was 'whatever', but now I got curious. It happens when
>
> 	level2 <- {
> 	    build_lvl(&data)
> 	        .map(|l2| SGTable::new(dev, l2, DataDirection::ToDevice, GFP_KERNEL))?
> 	},
> 	
> is changed to
>
> 	level2: {
> 	    let l2 = build_lvl(data)?;
> 	    SGTable::new(dev, l2, DataDirection::ToDevice, GFP_KERNEL)?
> 	},
> 	
When you remove all `<-` rustfmt starts formatting macros again because it sees
the macro invocation being a valid Rust expression.

I think you can also just remove the try_pin_init! here completely?

Best,
Gary

  reply	other threads:[~2026-11-16 12:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 23:42 Danilo Krummrich
2026-11-14 23:42 ` [PATCH 2/2] gpu: nova-core: remove unnecessary firmware pin-init Danilo Krummrich
2026-11-16  4:02   ` Alexandre Courbot
2026-11-16 12:29     ` Danilo Krummrich
2026-11-16  4:02 ` [PATCH 1/2] rust: scatterlist: tie owned tables to the device's bound lifetime Alexandre Courbot
2026-11-16 12:43   ` Danilo Krummrich
2026-11-16 12:49     ` Gary Guo [this message]
2026-11-16 13:16       ` Danilo Krummrich

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=DMWNC5DLYRO8.1WSI80QE8AOKH@garyguo.net \
    --to=gary@garyguo.net \
    --cc=a.hindborg@kernel.org \
    --cc=abdiel.janulgue@gmail.com \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=driver-core@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=ojeda@kernel.org \
    --cc=robin.murphy@arm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®