mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3] binder: Fix up Kconfig dependancy due to removal of .c code
@ 2026-09-17  8:46 Greg Kroah-Hartman
  2026-09-17  9:09 ` Carlos Llamas
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2026-09-17  8:46 UTC (permalink / raw)
  To: cmllamas; +Cc: tkjos, aliceryhl, linux-kernel, Greg Kroah-Hartman

When the .c binder code was removed, building the kernel if the rust
binder code was enabled, will cause the binder to not be built at all as
the option changed from .c to .rs which is probably not what the
original build wanted.

Fix this up by renaming the option back to the _RUST version.  If in the
future, that suffix wants to be dropped, we can do so and then it will
be prompted for a choice again, but for this release cycle, it should
stay as-is.

Fixes: binder: rm -f binder.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
v3: fix up tracepoint build failure
v2: v2: Fix up "_RUST_RUST" problem in Kconfig option

 drivers/android/Kconfig                                      | 4 ++--
 drivers/android/Makefile                                     | 2 +-
 drivers/android/binder/Makefile                              | 2 +-
 rust/bindings/bindings_helper.h                              | 2 +-
 tools/testing/selftests/filesystems/binderfs/binderfs_test.c | 2 +-
 tools/testing/selftests/filesystems/binderfs/config          | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig
index 403e5f3eab5a..c920d52c0221 100644
--- a/drivers/android/Kconfig
+++ b/drivers/android/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 menu "Android"
 
-config ANDROID_BINDER_IPC
+config ANDROID_BINDER_IPC_RUST
 	bool "Android Binder IPC Driver"
 	depends on MMU
 	depends on NET
@@ -17,7 +17,7 @@ config ANDROID_BINDER_IPC
 
 config ANDROID_BINDER_DEVICES
 	string "Android Binder devices"
-	depends on ANDROID_BINDER_IPC
+	depends on ANDROID_BINDER_IPC_RUST
 	default "binder,hwbinder,vndbinder"
 	help
 	  Default value for the binder.devices parameter.
diff --git a/drivers/android/Makefile b/drivers/android/Makefile
index dc19d21037af..f83d39d16f6e 100644
--- a/drivers/android/Makefile
+++ b/drivers/android/Makefile
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
 ccflags-y += -I$(src)			# needed for trace events
 
-obj-$(CONFIG_ANDROID_BINDER_IPC)	+= binder/
+obj-$(CONFIG_ANDROID_BINDER_IPC_RUST)	+= binder/
diff --git a/drivers/android/binder/Makefile b/drivers/android/binder/Makefile
index 661f5cca8918..fe474628a94e 100644
--- a/drivers/android/binder/Makefile
+++ b/drivers/android/binder/Makefile
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 ccflags-y += -I$(src)	# needed for trace events
 
-obj-$(CONFIG_ANDROID_BINDER_IPC) += binder.o
+obj-$(CONFIG_ANDROID_BINDER_IPC_RUST) += binder.o
 binder-y := \
 	rust_binder_main.o	\
 	rust_binderfs.o		\
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h
index 4485a55cb010..4b31aa7f432f 100644
--- a/rust/bindings/bindings_helper.h
+++ b/rust/bindings/bindings_helper.h
@@ -166,7 +166,7 @@ const unsigned long RUST_CONST_HELPER_GPU_BUDDY_CLEARED = GPU_BUDDY_CLEARED;
 const unsigned long RUST_CONST_HELPER_GPU_BUDDY_TRIM_DISABLE = GPU_BUDDY_TRIM_DISABLE;
 #endif
 
-#if IS_ENABLED(CONFIG_ANDROID_BINDER_IPC)
+#if IS_ENABLED(CONFIG_ANDROID_BINDER_IPC_RUST)
 #include "../../drivers/android/binder/rust_binder.h"
 #include "../../drivers/android/binder/rust_binder_events.h"
 #endif
diff --git a/tools/testing/selftests/filesystems/binderfs/binderfs_test.c b/tools/testing/selftests/filesystems/binderfs/binderfs_test.c
index 7310622098ff..cd82c89f558f 100644
--- a/tools/testing/selftests/filesystems/binderfs/binderfs_test.c
+++ b/tools/testing/selftests/filesystems/binderfs/binderfs_test.c
@@ -414,7 +414,7 @@ TEST(binderfs_stress)
 
 		ret = mount(NULL, binderfs_mntpt, "binder", 0, 0);
 		ASSERT_EQ(ret, 0) {
-			TH_LOG("%s - Failed to mount binderfs, check if CONFIG_ANDROID_BINDER_IPC is enabled in the running kernel",
+			TH_LOG("%s - Failed to mount binderfs, check if CONFIG_ANDROID_BINDER_IPC_RUST is enabled in the running kernel",
 				strerror(errno));
 		}
 
diff --git a/tools/testing/selftests/filesystems/binderfs/config b/tools/testing/selftests/filesystems/binderfs/config
index e0c1958a3675..80e4221c2d82 100644
--- a/tools/testing/selftests/filesystems/binderfs/config
+++ b/tools/testing/selftests/filesystems/binderfs/config
@@ -1 +1 @@
-CONFIG_ANDROID_BINDER_IPC=y
+CONFIG_ANDROID_BINDER_IPC_RUST=y
-- 
2.55.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] binder: Fix up Kconfig dependancy due to removal of .c code
  2026-09-17  8:46 [PATCH v3] binder: Fix up Kconfig dependancy due to removal of .c code Greg Kroah-Hartman
@ 2026-09-17  9:09 ` Carlos Llamas
  2026-09-17  9:26   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Carlos Llamas @ 2026-09-17  9:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: tkjos, aliceryhl, linux-kernel

On Thu, Sep 17, 2026 at 09:46:44AM +0100, Greg Kroah-Hartman wrote:
> When the .c binder code was removed, building the kernel if the rust
> binder code was enabled, will cause the binder to not be built at all as
> the option changed from .c to .rs which is probably not what the
> original build wanted.

The idea was to avoid silently dropping CONFIG_ANDROID_BINDER_IPC, but I
hadn't thought about this use case you mention. I agree it's better to
keep things explicit as _RUST.

> 
> Fix this up by renaming the option back to the _RUST version.  If in the
> future, that suffix wants to be dropped, we can do so and then it will
> be prompted for a choice again, but for this release cycle, it should
> stay as-is.
> 
> Fixes: binder: rm -f binder.c
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---

Worked for me, I found no regressions. Thanks!

Tested-by: Carlos Llamas <cmllamas@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] binder: Fix up Kconfig dependancy due to removal of .c code
  2026-09-17  9:09 ` Carlos Llamas
@ 2026-09-17  9:26   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2026-09-17  9:26 UTC (permalink / raw)
  To: Carlos Llamas; +Cc: tkjos, aliceryhl, linux-kernel

On Thu, Sep 17, 2026 at 09:09:03AM +0000, Carlos Llamas wrote:
> On Thu, Sep 17, 2026 at 09:46:44AM +0100, Greg Kroah-Hartman wrote:
> > When the .c binder code was removed, building the kernel if the rust
> > binder code was enabled, will cause the binder to not be built at all as
> > the option changed from .c to .rs which is probably not what the
> > original build wanted.
> 
> The idea was to avoid silently dropping CONFIG_ANDROID_BINDER_IPC, but I
> hadn't thought about this use case you mention. I agree it's better to
> keep things explicit as _RUST.
> 
> > 
> > Fix this up by renaming the option back to the _RUST version.  If in the
> > future, that suffix wants to be dropped, we can do so and then it will
> > be prompted for a choice again, but for this release cycle, it should
> > stay as-is.
> > 
> > Fixes: binder: rm -f binder.c
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> 
> Worked for me, I found no regressions. Thanks!
> 
> Tested-by: Carlos Llamas <cmllamas@google.com>

Thanks for the testing, sorry it took 3 tries :)

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-17  9:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17  8:46 [PATCH v3] binder: Fix up Kconfig dependancy due to removal of .c code Greg Kroah-Hartman
2026-09-17  9:09 ` Carlos Llamas
2026-09-17  9:26   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®