* FAILED: patch "[PATCH] scripts: generate_rust_analyzer: Add ffi crate" failed to apply to 6.14-stable tree
@ 2025-04-21 11:24 gregkh
2025-04-21 12:38 ` [PATCH 6.14.y] scripts: generate_rust_analyzer: Add ffi crate Miguel Ojeda
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2025-04-21 11:24 UTC (permalink / raw)
To: kernel, ojeda, tamird; +Cc: stable
The patch below does not apply to the 6.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.14.y
git checkout FETCH_HEAD
git cherry-pick -x 05a2b0011c4b6cbbc9b577f6abebe4e9333b0cf6
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2025042132-everglade-smasher-1ef2@gregkh' --subject-prefix 'PATCH 6.14.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 05a2b0011c4b6cbbc9b577f6abebe4e9333b0cf6 Mon Sep 17 00:00:00 2001
From: Lukas Fischer <kernel@o1oo11oo.de>
Date: Fri, 4 Apr 2025 14:51:51 +0200
Subject: [PATCH] scripts: generate_rust_analyzer: Add ffi crate
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>
diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index cd41bc906fbd..fe663dd0c43b 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -112,6 +112,12 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
cfg=["kernel"],
)
+ append_crate(
+ "ffi",
+ srctree / "rust" / "ffi.rs",
+ ["core", "compiler_builtins"],
+ )
+
def append_crate_with_generated(
display_name,
deps,
@@ -131,9 +137,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", "pin_init", "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", "pin_init", "ffi", "bindings", "uapi"])
def is_root_crate(build_file, target):
try:
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 6.14.y] scripts: generate_rust_analyzer: Add ffi crate
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
2025-04-22 2:15 ` Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: Miguel Ojeda @ 2025-04-21 12:38 UTC (permalink / raw)
To: stable; +Cc: Lukas Fischer, Tamir Duberstein, Miguel Ojeda
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6.14.y] scripts: generate_rust_analyzer: Add ffi crate
2025-04-21 12:38 ` [PATCH 6.14.y] scripts: generate_rust_analyzer: Add ffi crate Miguel Ojeda
@ 2025-04-22 2:15 ` Sasha Levin
0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2025-04-22 2:15 UTC (permalink / raw)
To: stable; +Cc: Miguel Ojeda, Sasha Levin
[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected.
No action required from the submitter.
The upstream commit SHA1 provided is correct: 05a2b0011c4b6cbbc9b577f6abebe4e9333b0cf6
WARNING: Author mismatch between patch and upstream commit:
Backport author: Miguel Ojeda<ojeda@kernel.org>
Commit author: Lukas Fischer<kernel@o1oo11oo.de>
Note: The patch differs from the upstream commit:
---
1: 05a2b0011c4b6 ! 1: 5869631cf792b scripts: generate_rust_analyzer: Add ffi crate
@@ Metadata
## Commit message ##
scripts: generate_rust_analyzer: Add ffi crate
+ commit 05a2b0011c4b6cbbc9b577f6abebe4e9333b0cf6 upstream.
+
Commit d072acda4862 ("rust: use custom FFI integer types") did not
update rust-analyzer to include the new crate.
@@ Commit message
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 ##
@@ scripts/generate_rust_analyzer.py: def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
- cfg=["kernel"],
+ ["core", "compiler_builtins"],
)
+ append_crate(
@@ scripts/generate_rust_analyzer.py: def generate_crates(srctree, objtree, sysroot
- append_crate_with_generated("bindings", ["core"])
- append_crate_with_generated("uapi", ["core"])
-- append_crate_with_generated("kernel", ["core", "macros", "build_error", "pin_init", "bindings", "uapi"])
+- 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", "pin_init", "ffi", "bindings", "uapi"])
++ append_crate_with_generated("kernel", ["core", "macros", "build_error", "ffi", "bindings", "uapi"])
def is_root_crate(build_file, target):
try:
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.14.y | Success | Success |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-22 2:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 6.14.y] scripts: generate_rust_analyzer: Add ffi crate Miguel Ojeda
2025-04-22 2:15 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox