public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Christian Brauner <christian@brauner.io>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Christian Brauner <christian.brauner@ubuntu.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] samples: fix binderfs sample
Date: Tue, 28 Apr 2020 23:25:33 +0200	[thread overview]
Message-ID: <20200428212555.2806258-1-arnd@arndb.de> (raw)

A routine check for misspelled Kconfig symbols showed on instance
from last year, the correct symbol name is CONFIG_ANDROID_BINDERFS,
not CONFIG_CONFIG_ANDROID_BINDERFS, so the extra prefix must
be removed in the Kconfig file to allow enabling the sample.

As the actual sample fails to build as a kernel module, change the
Makefile enough to get to build as a hostprog instead.

Fixes: 9762dc1432e1 ("samples: add binderfs sample program")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 samples/Kconfig           | 2 +-
 samples/binderfs/Makefile | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/samples/Kconfig b/samples/Kconfig
index 5c31971a5745..e0b747cc90c9 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -171,7 +171,7 @@ config SAMPLE_VFIO_MDEV_MBOCHS
 
 config SAMPLE_ANDROID_BINDERFS
 	bool "Build Android binderfs example"
-	depends on CONFIG_ANDROID_BINDERFS
+	depends on ANDROID_BINDERFS
 	help
 	  Builds a sample program to illustrate the use of the Android binderfs
 	  filesystem.
diff --git a/samples/binderfs/Makefile b/samples/binderfs/Makefile
index ea4c93d36256..a3ac5476338a 100644
--- a/samples/binderfs/Makefile
+++ b/samples/binderfs/Makefile
@@ -1,2 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs_example.o
+ifndef CROSS_COMPILE
+ifdef CONFIG_SAMPLE_ANDROID_BINDERFS
+hostprogs := binderfs_example
+endif
+endif
-- 
2.26.0


             reply	other threads:[~2020-04-28 21:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 21:25 Arnd Bergmann [this message]
2020-04-29  3:53 ` [PATCH] samples: fix binderfs sample Masahiro Yamada
2020-04-29  8:01 ` Christian Brauner
2020-05-05 15:48   ` Jonathan Corbet
2020-05-05 23:54 ` Masahiro Yamada

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=20200428212555.2806258-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=christian.brauner@ubuntu.com \
    --cc=christian@brauner.io \
    --cc=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=yamada.masahiro@socionext.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