linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] moves samples out of Documentation directory
@ 2016-04-25 16:03 Arnd Bergmann
  2016-04-25 16:03 ` [PATCH v2 1/2] samples: connector: from Documentation to samples directory Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-04-25 16:03 UTC (permalink / raw)
  To: Michal Marek
  Cc: linux-kbuild, linux-doc, Jonathan Corbet, linux-kernel, Andrew Morton

As suggested by Nicolas Pitre, here is a resend of two patches to
move the kernel modules from Documentation/*/ to samples/*/.

With Nico's changes in place, it's no longer necessary to do this,
but it seems like a good idea anyway for consistency.
Not sure who would be the best person to pick up the patches, I'd
probably either the Documentation or the kbuild maintainers.

	Arnd

[PATCH v2 1/2] samples: connector: from Documentation to samples
[PATCH v2 2/2] samples: v4l: from Documentation to samples directory

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

* [PATCH v2 1/2] samples: connector: from Documentation to samples directory
  2016-04-25 16:03 [PATCH v2 0/2] moves samples out of Documentation directory Arnd Bergmann
@ 2016-04-25 16:03 ` Arnd Bergmann
  2016-04-25 16:03 ` [PATCH v2 2/2] samples: v4l: " Arnd Bergmann
  2016-04-26  9:59 ` [PATCH v2 0/2] moves samples out of Documentation directory Jonathan Corbet
  2 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-04-25 16:03 UTC (permalink / raw)
  To: Michal Marek
  Cc: linux-kbuild, linux-doc, Jonathan Corbet, linux-kernel,
	Andrew Morton, Arnd Bergmann

A small bug with the new autoksyms support showed that there are
two kernel modules in the Documentation directory that qualify
as samples, while all other samples are in the samples/ directory.

This patch was originally meant as a workaround for that bug, but
it has now been solved in a different way. However, I still think
it makes sense as a cleanup to consolidate all sample code in
one place.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 Documentation/Makefile                          | 2 +-
 Documentation/connector/connector.txt           | 8 ++++++++
 samples/Kconfig                                 | 9 +++++++++
 samples/Makefile                                | 2 +-
 {Documentation => samples}/connector/.gitignore | 0
 {Documentation => samples}/connector/Makefile   | 6 +++---
 {Documentation => samples}/connector/cn_test.c  | 0
 {Documentation => samples}/connector/ucon.c     | 0
 8 files changed, 22 insertions(+), 5 deletions(-)
 rename {Documentation => samples}/connector/.gitignore (100%)
 rename {Documentation => samples}/connector/Makefile (76%)
 rename {Documentation => samples}/connector/cn_test.c (100%)
 rename {Documentation => samples}/connector/ucon.c (100%)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 1207d7907650..13b5ae1b87aa 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,4 +1,4 @@
-subdir-y := accounting auxdisplay blackfin connector \
+subdir-y := accounting auxdisplay blackfin \
 	filesystems filesystems ia64 laptops mic misc-devices \
 	networking pcmcia prctl ptp timers vDSO video4linux \
 	watchdog
diff --git a/Documentation/connector/connector.txt b/Documentation/connector/connector.txt
index f6215f95149b..ab7ca897fab7 100644
--- a/Documentation/connector/connector.txt
+++ b/Documentation/connector/connector.txt
@@ -186,3 +186,11 @@ only cn_test.c test module used it.
 Some work in netlink area is still being done, so things can be changed in
 2.6.15 timeframe, if it will happen, documentation will be updated for that
 kernel.
+
+/*****************************************/
+Code samples
+/*****************************************/
+
+Sample code for a connector test module and user space can be found
+in samples/connector/. To build this code, enable CONFIG_CONNECTOR
+and CONFIG_SAMPLES.
diff --git a/samples/Kconfig b/samples/Kconfig
index d54f28c6dc5e..559a58baff6e 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -76,4 +76,13 @@ config SAMPLE_CONFIGFS
 	help
 	  Builds a sample configfs interface.
 
+config SAMPLE_CONNECTOR
+	tristate "Build connector sample -- loadable modules only"
+	depends on CONNECTOR && m
+	help
+	  When enabled, this builds both a sample kernel module for
+	  the connector interface and a user space tool to communicate
+	  with it.
+	  See also Documentation/connector/connector.txt
+
 endif # SAMPLES
diff --git a/samples/Makefile b/samples/Makefile
index 48001d7e23f0..594ef7d9fa2a 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -2,4 +2,4 @@
 
 obj-$(CONFIG_SAMPLES)	+= kobject/ kprobes/ trace_events/ livepatch/ \
 			   hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \
-			   configfs/
+			   configfs/ connector/
diff --git a/Documentation/connector/.gitignore b/samples/connector/.gitignore
similarity index 100%
rename from Documentation/connector/.gitignore
rename to samples/connector/.gitignore
diff --git a/Documentation/connector/Makefile b/samples/connector/Makefile
similarity index 76%
rename from Documentation/connector/Makefile
rename to samples/connector/Makefile
index d98e4df98e24..04b9622b6f51 100644
--- a/Documentation/connector/Makefile
+++ b/samples/connector/Makefile
@@ -1,9 +1,9 @@
-ifneq ($(CONFIG_CONNECTOR),)
-obj-m += cn_test.o
-endif
+obj-$(CONFIG_SAMPLE_CONNECTOR) += cn_test.o
 
 # List of programs to build
+ifdef CONFIG_SAMPLE_CONNECTOR
 hostprogs-y := ucon
+endif
 
 # Tell kbuild to always build the programs
 always := $(hostprogs-y)
diff --git a/Documentation/connector/cn_test.c b/samples/connector/cn_test.c
similarity index 100%
rename from Documentation/connector/cn_test.c
rename to samples/connector/cn_test.c
diff --git a/Documentation/connector/ucon.c b/samples/connector/ucon.c
similarity index 100%
rename from Documentation/connector/ucon.c
rename to samples/connector/ucon.c
-- 
2.7.0

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

* [PATCH v2 2/2] samples: v4l: from Documentation to samples directory
  2016-04-25 16:03 [PATCH v2 0/2] moves samples out of Documentation directory Arnd Bergmann
  2016-04-25 16:03 ` [PATCH v2 1/2] samples: connector: from Documentation to samples directory Arnd Bergmann
@ 2016-04-25 16:03 ` Arnd Bergmann
  2016-04-26  9:59 ` [PATCH v2 0/2] moves samples out of Documentation directory Jonathan Corbet
  2 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-04-25 16:03 UTC (permalink / raw)
  To: Michal Marek
  Cc: linux-kbuild, linux-doc, Jonathan Corbet, linux-kernel,
	Andrew Morton, Arnd Bergmann

A small bug with the new autoksyms support showed that there are
two kernel modules in the Documentation directory that qualify
as samples, while all other samples are in the samples/ directory.

This patch was originally meant as a workaround for that bug, but
it has now been solved in a different way. However, I still think
it makes sense as a cleanup to consolidate all sample code in
one place.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 Documentation/Makefile                                         | 3 +--
 Documentation/video4linux/v4l2-framework.txt                   | 2 +-
 samples/Makefile                                               | 2 +-
 {Documentation/video4linux => samples/v4l}/Makefile            | 0
 {Documentation/video4linux => samples/v4l}/v4l2-pci-skeleton.c | 0
 5 files changed, 3 insertions(+), 4 deletions(-)
 rename {Documentation/video4linux => samples/v4l}/Makefile (100%)
 rename {Documentation/video4linux => samples/v4l}/v4l2-pci-skeleton.c (100%)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 13b5ae1b87aa..de955e151af8 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,4 +1,3 @@
 subdir-y := accounting auxdisplay blackfin \
 	filesystems filesystems ia64 laptops mic misc-devices \
-	networking pcmcia prctl ptp timers vDSO video4linux \
-	watchdog
+	networking pcmcia prctl ptp timers vDSO watchdog
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index fa41608ab2b4..cbefc7902f5f 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -35,7 +35,7 @@ need and this same framework should make it much easier to refactor
 common code into utility functions shared by all drivers.
 
 A good example to look at as a reference is the v4l2-pci-skeleton.c
-source that is available in this directory. It is a skeleton driver for
+source that is available in samples/v4l/. It is a skeleton driver for
 a PCI capture card, and demonstrates how to use the V4L2 driver
 framework. It can be used as a template for real PCI video capture driver.
 
diff --git a/samples/Makefile b/samples/Makefile
index 594ef7d9fa2a..2e3b523d7097 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -2,4 +2,4 @@
 
 obj-$(CONFIG_SAMPLES)	+= kobject/ kprobes/ trace_events/ livepatch/ \
 			   hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \
-			   configfs/ connector/
+			   configfs/ connector/ v4l/
diff --git a/Documentation/video4linux/Makefile b/samples/v4l/Makefile
similarity index 100%
rename from Documentation/video4linux/Makefile
rename to samples/v4l/Makefile
diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/samples/v4l/v4l2-pci-skeleton.c
similarity index 100%
rename from Documentation/video4linux/v4l2-pci-skeleton.c
rename to samples/v4l/v4l2-pci-skeleton.c
-- 
2.7.0

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

* Re: [PATCH v2 0/2] moves samples out of Documentation directory
  2016-04-25 16:03 [PATCH v2 0/2] moves samples out of Documentation directory Arnd Bergmann
  2016-04-25 16:03 ` [PATCH v2 1/2] samples: connector: from Documentation to samples directory Arnd Bergmann
  2016-04-25 16:03 ` [PATCH v2 2/2] samples: v4l: " Arnd Bergmann
@ 2016-04-26  9:59 ` Jonathan Corbet
  2016-04-26 10:28   ` Hans Verkuil
  2 siblings, 1 reply; 6+ messages in thread
From: Jonathan Corbet @ 2016-04-26  9:59 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Michal Marek, linux-kbuild, linux-doc, linux-kernel,
	Andrew Morton, Hans Verkuil

On Mon, 25 Apr 2016 18:03:07 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> As suggested by Nicolas Pitre, here is a resend of two patches to
> move the kernel modules from Documentation/*/ to samples/*/.
> 
> With Nico's changes in place, it's no longer necessary to do this,
> but it seems like a good idea anyway for consistency.
> Not sure who would be the best person to pick up the patches, I'd
> probably either the Documentation or the kbuild maintainers.
> 
> 	Arnd
> 
> [PATCH v2 1/2] samples: connector: from Documentation to samples
> [PATCH v2 2/2] samples: v4l: from Documentation to samples directory

I can take them through the docs tree.

Hans [added], are you OK with moving v4l2-pci-skeleton.c over to
the samples directory?

Thanks,

jon

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

* Re: [PATCH v2 0/2] moves samples out of Documentation directory
  2016-04-26  9:59 ` [PATCH v2 0/2] moves samples out of Documentation directory Jonathan Corbet
@ 2016-04-26 10:28   ` Hans Verkuil
  2016-04-26 10:55     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Verkuil @ 2016-04-26 10:28 UTC (permalink / raw)
  To: Jonathan Corbet, Arnd Bergmann
  Cc: Michal Marek, linux-kbuild, linux-doc, linux-kernel,
	Andrew Morton, Hans Verkuil



On 04/26/2016 11:59 AM, Jonathan Corbet wrote:
> On Mon, 25 Apr 2016 18:03:07 +0200
> Arnd Bergmann <arnd@arndb.de> wrote:
> 
>> As suggested by Nicolas Pitre, here is a resend of two patches to
>> move the kernel modules from Documentation/*/ to samples/*/.
>>
>> With Nico's changes in place, it's no longer necessary to do this,
>> but it seems like a good idea anyway for consistency.
>> Not sure who would be the best person to pick up the patches, I'd
>> probably either the Documentation or the kbuild maintainers.
>>
>> 	Arnd
>>
>> [PATCH v2 1/2] samples: connector: from Documentation to samples
>> [PATCH v2 2/2] samples: v4l: from Documentation to samples directory
> 
> I can take them through the docs tree.
> 
> Hans [added], are you OK with moving v4l2-pci-skeleton.c over to
> the samples directory?

Yes, that's fine. For the record:

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Regards,

	Hans

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

* Re: [PATCH v2 0/2] moves samples out of Documentation directory
  2016-04-26 10:28   ` Hans Verkuil
@ 2016-04-26 10:55     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2016-04-26 10:55 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Jonathan Corbet, Arnd Bergmann, Michal Marek, linux-kbuild,
	linux-doc, linux-kernel, Andrew Morton, Hans Verkuil

Em Tue, 26 Apr 2016 12:28:42 +0200
Hans Verkuil <hansverk@cisco.com> escreveu:

> On 04/26/2016 11:59 AM, Jonathan Corbet wrote:
> > On Mon, 25 Apr 2016 18:03:07 +0200
> > Arnd Bergmann <arnd@arndb.de> wrote:
> >   
> >> As suggested by Nicolas Pitre, here is a resend of two patches to
> >> move the kernel modules from Documentation/*/ to samples/*/.
> >>
> >> With Nico's changes in place, it's no longer necessary to do this,
> >> but it seems like a good idea anyway for consistency.
> >> Not sure who would be the best person to pick up the patches, I'd
> >> probably either the Documentation or the kbuild maintainers.
> >>
> >> 	Arnd
> >>
> >> [PATCH v2 1/2] samples: connector: from Documentation to samples
> >> [PATCH v2 2/2] samples: v4l: from Documentation to samples directory  
> > 
> > I can take them through the docs tree.
> > 
> > Hans [added], are you OK with moving v4l2-pci-skeleton.c over to
> > the samples directory?  
> 
> Yes, that's fine. For the record:
> 
> Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> 
> Regards,
> 
> 	Hans
> --
> To unsubscribe from this list: send the line "unsubscribe linux-doc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Thanks,
Mauro

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

end of thread, other threads:[~2016-04-26 10:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-25 16:03 [PATCH v2 0/2] moves samples out of Documentation directory Arnd Bergmann
2016-04-25 16:03 ` [PATCH v2 1/2] samples: connector: from Documentation to samples directory Arnd Bergmann
2016-04-25 16:03 ` [PATCH v2 2/2] samples: v4l: " Arnd Bergmann
2016-04-26  9:59 ` [PATCH v2 0/2] moves samples out of Documentation directory Jonathan Corbet
2016-04-26 10:28   ` Hans Verkuil
2016-04-26 10:55     ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).