All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Danilo Krummrich" <dakr@kernel.org>
To: "Gary Guo" <gary@garyguo.net>
Cc: "Alexandre Courbot" <acourbot@nvidia.com>, <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>,
	<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 14:16:56 +0100	[thread overview]
Message-ID: <DMWNWVWXJ45A.2F8WUTKWYNY8I@kernel.org> (raw)
In-Reply-To: <DMWNC5DLYRO8.1WSI80QE8AOKH@garyguo.net>

On Mon Nov 16, 2026 at 1:49 PM CET, Gary Guo wrote:
> 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.

Not exactly, that's why I picked level2. If you remove the <- from level1, but
not level2 it doesn't format, but if you do it the other way around, it does.

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

I remove all the pin-init remains in patch 2 as it propagates a bit, keeping
this one purely mechanical.

      reply	other threads:[~2026-11-16 13:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 23:42 [PATCH 1/2] rust: scatterlist: tie owned tables to the device's bound lifetime 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 13:57       ` Alexandre Courbot
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
2026-11-16 13:16       ` Danilo Krummrich [this message]

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=DMWNWVWXJ45A.2F8WUTKWYNY8I@kernel.org \
    --to=dakr@kernel.org \
    --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=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gary@garyguo.net \
    --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 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.