The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Onur Özkan" <work@onurozkan.dev>
To: Alexandre Courbot <acourbot@nvidia.com>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"Alistair Popple" <apopple@nvidia.com>,
	"Timur Tabi" <ttabi@nvidia.com>,
	"Eliot Courtney" <ecourtney@nvidia.com>,
	"Zhi Wang" <zhiw@nvidia.com>,
	nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	"Onur Özkan" <work@onurozkan.dev>
Subject: Re: [PATCH] gpu: nova: fix rust-analyzer generation
Date: Wed,  1 Jul 2026 15:36:50 +0300	[thread overview]
Message-ID: <20260701123703.152958-1-work@onurozkan.dev> (raw)
In-Reply-To: <20260701-nova-rust-analyzer-v1-1-5209f486f10d@nvidia.com>

On Wed, 01 Jul 2026 15:40:51 +0900
Alexandre Courbot <acourbot@nvidia.com> wrote:

> The rust-analyzer generator script recognizes a crate when its
> corresponding `.o` appears in the Rust source file's immediate `Makefile`
> or `Kbuild` file.
> 
> Commit ca524e273c43 ("gpu: build nova-core and nova-drm from
> drivers/gpu/Makefile") moves the build rules for `nova-core` and
> `nova-drm` into `drivers/gpu/Makefile`, which results in the generator
> script ignoring these crates.

So this regression shows that generate_rust_analyzer.py should probably handle
this case better e.g. by checking and understanding parent build rules too.

> 
> Fix this by naming the crates' module as a comment in their respective
> `Makefile`; this is enough for the script to pick them up and restore
> `rust-analyzer` functionality on them.
> 
> Fixes: ca524e273c43 ("gpu: build nova-core and nova-drm from drivers/gpu/Makefile")
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>

That said, this is a reasonable quick fix for the current generator as it fixes
the rust-analyzer functionality for nova, so:

Reviewed-by: Onur Özkan <work@onurozkan.dev>

> ---
>  drivers/gpu/drm/nova/Makefile  | 1 +
>  drivers/gpu/nova-core/Makefile | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/nova/Makefile b/drivers/gpu/drm/nova/Makefile
> index b9fad3956358..6355f7502c48 100644
> --- a/drivers/gpu/drm/nova/Makefile
> +++ b/drivers/gpu/drm/nova/Makefile
> @@ -1,2 +1,3 @@
>  # SPDX-License-Identifier: GPL-2.0
>  # nova-drm is built from drivers/gpu/Makefile.
> +# nova.o (rust-analyzer marker - DO NOT REMOVE).
> diff --git a/drivers/gpu/nova-core/Makefile b/drivers/gpu/nova-core/Makefile
> index 4c15729704a1..216329760a5b 100644
> --- a/drivers/gpu/nova-core/Makefile
> +++ b/drivers/gpu/nova-core/Makefile
> @@ -1,2 +1,3 @@
>  # SPDX-License-Identifier: GPL-2.0
>  # nova-core is built from drivers/gpu/Makefile.
> +# nova_core.o (rust-analyzer marker - DO NOT REMOVE).
> 
> ---
> base-commit: 431f10ba13a964c146ae05728e42e4074bf735ab
> change-id: 20260701-nova-rust-analyzer-8dd146dc53a3
> 
> Best regards,
> --  
> Alexandre Courbot <acourbot@nvidia.com>
> 

  reply	other threads:[~2026-07-01 12:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01  6:40 [PATCH] gpu: nova: fix rust-analyzer generation Alexandre Courbot
2026-07-01 12:36 ` Onur Özkan [this message]
2026-07-02  1:09   ` Alexandre Courbot
2026-07-02  7:54     ` Miguel Ojeda
2026-07-01 18:39 ` Timur Tabi

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=20260701123703.152958-1-work@onurozkan.dev \
    --to=work@onurozkan.dev \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.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=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tamird@kernel.org \
    --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