[PATCH] gpu: nova: fix rust-analyzer generation

Alexandre Courbot <[email protected]>
Newsgroups dev.linux.lists.nova-gpu,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
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.

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 <[email protected]>
---
 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 <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.