[PATCH v4 2/2] rust_binder: override crate name to rust_binder

Alice Ryhl posted 2 patches 1 day, 9 hours ago
[PATCH v4 2/2] rust_binder: override crate name to rust_binder
Posted by Alice Ryhl 1 day, 9 hours ago
The Rust Binder object file is called rust_binder_main.o because the
name rust_binder.o is used for the result of linking together
rust_binder_main.o with rust_binderfs.o and a few others.

However, the crate name is supposed to be rust_binder without a _main
suffix. Thus, override the crate name accordingly.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
 drivers/android/binder/rust_binder_main.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/android/binder/rust_binder_main.rs b/drivers/android/binder/rust_binder_main.rs
index aa5f2a75adb4..85a15dd40bec 100644
--- a/drivers/android/binder/rust_binder_main.rs
+++ b/drivers/android/binder/rust_binder_main.rs
@@ -3,6 +3,8 @@
 // Copyright (C) 2025 Google LLC.
 
 //! Binder -- the Android IPC mechanism.
+
+#![crate_name = "rust_binder"]
 #![recursion_limit = "256"]
 #![allow(
     clippy::as_underscore,

-- 
2.53.0.1185.g05d4b7b318-goog
Re: [PATCH v4 2/2] rust_binder: override crate name to rust_binder
Posted by Gary Guo 1 day, 9 hours ago
On Thu Apr 2, 2026 at 11:55 AM BST, Alice Ryhl wrote:
> The Rust Binder object file is called rust_binder_main.o because the
> name rust_binder.o is used for the result of linking together
> rust_binder_main.o with rust_binderfs.o and a few others.
> 
> However, the crate name is supposed to be rust_binder without a _main
> suffix. Thus, override the crate name accordingly.
> 
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>

Acked-by: Gary Guo <gary@garyguo.net>

> ---
>  drivers/android/binder/rust_binder_main.rs | 2 ++
>  1 file changed, 2 insertions(+)
Re: [PATCH v4 2/2] rust_binder: override crate name to rust_binder
Posted by Greg Kroah-Hartman 1 day, 9 hours ago
On Thu, Apr 02, 2026 at 10:55:34AM +0000, Alice Ryhl wrote:
> The Rust Binder object file is called rust_binder_main.o because the
> name rust_binder.o is used for the result of linking together
> rust_binder_main.o with rust_binderfs.o and a few others.
> 
> However, the crate name is supposed to be rust_binder without a _main
> suffix. Thus, override the crate name accordingly.
> 
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
> ---
>  drivers/android/binder/rust_binder_main.rs | 2 ++
>  1 file changed, 2 insertions(+)

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>