From: Miguel Ojeda <ojeda@kernel.org>
To: stable@vger.kernel.org
Cc: Lukas Fischer <kernel@o1oo11oo.de>,
Tamir Duberstein <tamird@gmail.com>,
Miguel Ojeda <ojeda@kernel.org>
Subject: [PATCH 6.14.y] scripts: generate_rust_analyzer: Add ffi crate
Date: Mon, 21 Apr 2025 14:38:27 +0200 [thread overview]
Message-ID: <20250421123827.3147434-1-ojeda@kernel.org> (raw)
In-Reply-To: <2025042132-everglade-smasher-1ef2@gregkh>
From: Lukas Fischer <kernel@o1oo11oo.de>
commit 05a2b0011c4b6cbbc9b577f6abebe4e9333b0cf6 upstream.
Commit d072acda4862 ("rust: use custom FFI integer types") did not
update rust-analyzer to include the new crate.
To enable rust-analyzer support for these custom ffi types, add the
`ffi` crate as a dependency to the `bindings`, `uapi` and `kernel`
crates, which all directly depend on it.
Fixes: d072acda4862 ("rust: use custom FFI integer types")
Signed-off-by: Lukas Fischer <kernel@o1oo11oo.de>
Reviewed-by: Tamir Duberstein <tamird@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250404125150.85783-2-kernel@o1oo11oo.de
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
[ Fixed conflicts. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
scripts/generate_rust_analyzer.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index adae71544cbd..f2ff0f954236 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -97,6 +97,12 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
["core", "compiler_builtins"],
)
+ append_crate(
+ "ffi",
+ srctree / "rust" / "ffi.rs",
+ ["core", "compiler_builtins"],
+ )
+
def append_crate_with_generated(
display_name,
deps,
@@ -116,9 +122,9 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
"exclude_dirs": [],
}
- append_crate_with_generated("bindings", ["core"])
- append_crate_with_generated("uapi", ["core"])
- append_crate_with_generated("kernel", ["core", "macros", "build_error", "bindings", "uapi"])
+ append_crate_with_generated("bindings", ["core", "ffi"])
+ append_crate_with_generated("uapi", ["core", "ffi"])
+ append_crate_with_generated("kernel", ["core", "macros", "build_error", "ffi", "bindings", "uapi"])
def is_root_crate(build_file, target):
try:
--
2.49.0
next prev parent reply other threads:[~2025-04-21 12:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-21 11:24 FAILED: patch "[PATCH] scripts: generate_rust_analyzer: Add ffi crate" failed to apply to 6.14-stable tree gregkh
2025-04-21 12:38 ` Miguel Ojeda [this message]
2025-04-22 2:15 ` [PATCH 6.14.y] scripts: generate_rust_analyzer: Add ffi crate Sasha Levin
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=20250421123827.3147434-1-ojeda@kernel.org \
--to=ojeda@kernel.org \
--cc=kernel@o1oo11oo.de \
--cc=stable@vger.kernel.org \
--cc=tamird@gmail.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