linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/5] docsrc: fix ifenslave type
  2008-07-29 20:05 [PATCH 1/5] docsrc: build Documentation/ sources Randy Dunlap
@ 2008-07-29 20:05 ` Randy Dunlap
  2008-07-29 20:05 ` [PATCH 4/5] docsrc: fix crc32hash type Randy Dunlap
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Randy Dunlap @ 2008-07-29 20:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Sam Ravnborg, davem

From: Randy Dunlap <randy.dunlap@oracle.com>

Documentation/networking/ifenslave.c:1084: warning: pointer targets in assignment differ in signedness

>From include/linux/socket.h:
 *	1003.1g requires sa_family_t and that sa_data is char.

and from SUSv3:
(http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html)

The <sys/socket.h> header shall define the sockaddr structure that includes at least the following members:

sa_family_t  sa_family  Address family. 
char         sa_data[]  Socket address (variable-length data).
<end SUSv3>

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 Documentation/networking/ifenslave.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20080729.orig/Documentation/networking/ifenslave.c
+++ linux-next-20080729/Documentation/networking/ifenslave.c
@@ -1081,7 +1081,7 @@ static int set_if_addr(char *master_ifna
 
 		}
 
-		ipaddr = ifr.ifr_addr.sa_data;
+		ipaddr = (unsigned char *)ifr.ifr_addr.sa_data;
 		v_print("Interface '%s': set IP %s to %d.%d.%d.%d\n",
 			slave_ifname, ifra[i].desc,
 			ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3]);


-- 


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

* [PATCH 2/5] docsrc: fix procfs example
  2008-07-29 20:05 [PATCH 1/5] docsrc: build Documentation/ sources Randy Dunlap
                   ` (2 preceding siblings ...)
  2008-07-29 20:05 ` [PATCH 5/5] docsrc: fix getdelays printk formats Randy Dunlap
@ 2008-07-29 20:05 ` Randy Dunlap
  2008-07-29 20:27 ` [PATCH 1/5] docsrc: build Documentation/ sources Borislav Petkov
  4 siblings, 0 replies; 14+ messages in thread
From: Randy Dunlap @ 2008-07-29 20:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Sam Ravnborg, J.A.K.Mouw

From: Randy Dunlap <randy.dunlap@oracle.com>

Add MODULE_LICENSE() to DocBook/procfs_example.c since modpost complained
about a missing license there.

Remove tty procfs removal since the creation was deleted long ago
(http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=5ad9cb65e9b15e5b83e2dd1c10a4bcaccc4ec644).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 Documentation/DocBook/procfs_example.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- linux-next-20080729.orig/Documentation/DocBook/procfs_example.c
+++ linux-next-20080729/Documentation/DocBook/procfs_example.c
@@ -189,8 +189,6 @@ static int __init init_procfs_example(vo
 	return 0;
 
 no_symlink:
-	remove_proc_entry("tty", example_dir);
-no_tty:
 	remove_proc_entry("bar", example_dir);
 no_bar:
 	remove_proc_entry("foo", example_dir);
@@ -206,7 +204,6 @@ out:
 static void __exit cleanup_procfs_example(void)
 {
 	remove_proc_entry("jiffies_too", example_dir);
-	remove_proc_entry("tty", example_dir);
 	remove_proc_entry("bar", example_dir);
 	remove_proc_entry("foo", example_dir);
 	remove_proc_entry("jiffies", example_dir);
@@ -222,3 +219,4 @@ module_exit(cleanup_procfs_example);
 
 MODULE_AUTHOR("Erik Mouw");
 MODULE_DESCRIPTION("procfs examples");
+MODULE_LICENSE("GPL");


-- 


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

* [PATCH 4/5] docsrc: fix crc32hash type
  2008-07-29 20:05 [PATCH 1/5] docsrc: build Documentation/ sources Randy Dunlap
  2008-07-29 20:05 ` [PATCH 3/5] docsrc: fix ifenslave type Randy Dunlap
@ 2008-07-29 20:05 ` Randy Dunlap
  2008-07-30  6:47   ` Dominik Brodowski
  2008-07-29 20:05 ` [PATCH 5/5] docsrc: fix getdelays printk formats Randy Dunlap
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 14+ messages in thread
From: Randy Dunlap @ 2008-07-29 20:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Sam Ravnborg, linux

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix differing signedness warning:

Documentation/pcmcia/crc32hash.c:29: warning: pointer targets in passing argument 1 of 'crc32' differ in signedness

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 Documentation/pcmcia/crc32hash.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20080729.orig/Documentation/pcmcia/crc32hash.c
+++ linux-next-20080729/Documentation/pcmcia/crc32hash.c
@@ -26,7 +26,7 @@ int main(int argc, char **argv) {
 		printf("no string passed as argument\n");
 		return -1;
 	}
-	result = crc32(argv[1], strlen(argv[1]));
+	result = crc32((unsigned char const *)argv[1], strlen(argv[1]));
 	printf("0x%x\n", result);
 	return 0;
 }


-- 


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

* [PATCH 1/5] docsrc: build Documentation/ sources
@ 2008-07-29 20:05 Randy Dunlap
  2008-07-29 20:05 ` [PATCH 3/5] docsrc: fix ifenslave type Randy Dunlap
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Randy Dunlap @ 2008-07-29 20:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Sam Ravnborg

From: Randy Dunlap <randy.dunlap@oracle.com>

Currently source files in the Documentation/ sub-dir can easily bit-rot
since they are not generally buildable, either because they are hidden
in text files or because there are no Makefile rules for them.
This needs to be fixed so that the source files remain usable and good
examples of code instead of bad examples.

Add the ability to build source files that are in the Documentation/ dir.
Add to Kconfig as "BUILD_DOCSRC" config symbol.

Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
Documentation/ sources.  Or enable BUILD_DOCSRC in the *config system.
However, this symbol depends on HEADERS_CHECK since the header files
need to be installed (for userspace builds).

Built (using cross-tools) for x86-64, i386, alpha, ia64, sparc32,
sparc64, powerpc, sh, m68k, & mips.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
---
 Documentation/DocBook/Makefile              |    7 +++++++
 Documentation/Makefile                      |    3 +++
 Documentation/accounting/Makefile           |   10 ++++++++++
 Documentation/auxdisplay/Makefile           |   10 ++++++++++
 Documentation/connector/Makefile            |   11 +++++++++++
 Documentation/filesystems/configfs/Makefile |    3 +++
 Documentation/ia64/Makefile                 |    8 ++++++++
 Documentation/networking/Makefile           |    8 ++++++++
 Documentation/pcmcia/Makefile               |   10 ++++++++++
 Documentation/spi/Makefile                  |   11 +++++++++++
 Documentation/video4linux/Makefile          |    8 ++++++++
 Documentation/vm/Makefile                   |    8 ++++++++
 Documentation/watchdog/src/Makefile         |    8 ++++++++
 Makefile                                    |    5 ++++-
 lib/Kconfig.debug                           |    9 +++++++++
 15 files changed, 118 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/Makefile
 create mode 100644 Documentation/accounting/Makefile

--- /dev/null
+++ linux-next-20080729/Documentation/Makefile
@@ -0,0 +1,3 @@
+obj-m := DocBook/ accounting/ auxdisplay/ connector/ \
+	filesystems/configfs/ ia64/ networking/ \
+	pcmcia/ spi/ video4linux/ vm/ watchdog/src/
--- /dev/null
+++ linux-next-20080729/Documentation/accounting/Makefile
@@ -0,0 +1,10 @@
+# kbuild trick to avoid linker error. Can be omitted if a module is built.
+obj- := dummy.o
+
+# List of programs to build
+hostprogs-y := getdelays
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
+
+HOSTCFLAGS_getdelays.o += -I$(objtree)/usr/include
--- linux-next-20080729.orig/Makefile
+++ linux-next-20080729/Makefile
@@ -823,6 +823,9 @@ endif
 ifdef CONFIG_SAMPLES
 	$(Q)$(MAKE) $(build)=samples
 endif
+ifdef CONFIG_BUILD_DOCSRC
+	$(Q)$(MAKE) $(build)=Documentation
+endif
 	$(call vmlinux-modpost)
 	$(call if_changed_rule,vmlinux__)
 	$(Q)rm -f .old_version
@@ -1167,7 +1170,7 @@ MRPROPER_FILES += .config .config.old in
 #
 clean: rm-dirs  := $(CLEAN_DIRS)
 clean: rm-files := $(CLEAN_FILES)
-clean-dirs      := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs))
+clean-dirs      := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation)
 
 PHONY += $(clean-dirs) clean archclean
 $(clean-dirs):
--- linux-next-20080729.orig/Documentation/DocBook/Makefile
+++ linux-next-20080729/Documentation/DocBook/Makefile
@@ -102,6 +102,13 @@ C-procfs-example = procfs_example.xml
 C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example))
 $(obj)/procfs-guide.xml: $(C-procfs-example2)
 
+# List of programs to build
+##oops, this is a kernel module::hostprogs-y := procfs_example
+obj-m += procfs_example.o
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
+
 notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \
 		   exit 1
 db2xtemplate = db2TYPE -o $(dir $@) $<
--- /dev/null
+++ linux-next-20080729/Documentation/auxdisplay/Makefile
@@ -0,0 +1,10 @@
+# kbuild trick to avoid linker error. Can be omitted if a module is built.
+obj- := dummy.o
+
+# List of programs to build
+hostprogs-y := cfag12864b-example
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
+
+HOSTCFLAGS_cfag12864b-example.o += -I$(objtree)/usr/include
--- /dev/null
+++ linux-next-20080729/Documentation/connector/Makefile
@@ -0,0 +1,11 @@
+ifneq ($(CONFIG_CONNECTOR),)
+obj-m += cn_test.o
+endif
+
+# List of programs to build
+hostprogs-y := ucon
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
+
+HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include
--- /dev/null
+++ linux-next-20080729/Documentation/ia64/Makefile
@@ -0,0 +1,8 @@
+# kbuild trick to avoid linker error. Can be omitted if a module is built.
+obj- := dummy.o
+
+# List of programs to build
+hostprogs-y := aliasing-test
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
--- /dev/null
+++ linux-next-20080729/Documentation/networking/Makefile
@@ -0,0 +1,8 @@
+# kbuild trick to avoid linker error. Can be omitted if a module is built.
+obj- := dummy.o
+
+# List of programs to build
+hostprogs-y := ifenslave
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
--- /dev/null
+++ linux-next-20080729/Documentation/pcmcia/Makefile
@@ -0,0 +1,10 @@
+# kbuild trick to avoid linker error. Can be omitted if a module is built.
+obj- := dummy.o
+
+# List of programs to build
+hostprogs-y := crc32hash
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
+
+HOSTCFLAGS_crc32hash.o += -I$(objtree)/usr/include
--- /dev/null
+++ linux-next-20080729/Documentation/spi/Makefile
@@ -0,0 +1,11 @@
+# kbuild trick to avoid linker error. Can be omitted if a module is built.
+obj- := dummy.o
+
+# List of programs to build
+hostprogs-y := spidev_test spidev_fdx
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
+
+HOSTCFLAGS_spidev_test.o += -I$(objtree)/usr/include
+HOSTCFLAGS_spidev_fdx.o += -I$(objtree)/usr/include
--- /dev/null
+++ linux-next-20080729/Documentation/video4linux/Makefile
@@ -0,0 +1,8 @@
+# kbuild trick to avoid linker error. Can be omitted if a module is built.
+obj- := dummy.o
+
+# List of programs to build
+hostprogs-y := v4lgrab
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
--- /dev/null
+++ linux-next-20080729/Documentation/vm/Makefile
@@ -0,0 +1,8 @@
+# kbuild trick to avoid linker error. Can be omitted if a module is built.
+obj- := dummy.o
+
+# List of programs to build
+hostprogs-y := slabinfo
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
--- /dev/null
+++ linux-next-20080729/Documentation/watchdog/src/Makefile
@@ -0,0 +1,8 @@
+# kbuild trick to avoid linker error. Can be omitted if a module is built.
+obj- := dummy.o
+
+# List of programs to build
+hostprogs-y := watchdog-simple watchdog-test
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
--- /dev/null
+++ linux-next-20080729/Documentation/filesystems/configfs/Makefile
@@ -0,0 +1,3 @@
+ifneq ($(CONFIG_CONFIGFS_FS),)
+obj-m += configfs_example_explicit.o configfs_example_macros.o
+endif
--- linux-next-20080729.orig/lib/Kconfig.debug
+++ linux-next-20080729/lib/Kconfig.debug
@@ -644,6 +644,15 @@ config FIREWIRE_OHCI_REMOTE_DMA
 
 	  If unsure, say N.
 
+menuconfig BUILD_DOCSRC
+	bool "Build targets in Documentation/ tree"
+	depends on HEADERS_CHECK
+	help
+	  This option attempts to build objects from the source files in the
+	  kernel Documentation/ tree.
+
+	  Say N if you are unsure.
+
 source "samples/Kconfig"
 
 source "lib/Kconfig.kgdb"


-- 


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

* [PATCH 5/5] docsrc: fix getdelays printk formats
  2008-07-29 20:05 [PATCH 1/5] docsrc: build Documentation/ sources Randy Dunlap
  2008-07-29 20:05 ` [PATCH 3/5] docsrc: fix ifenslave type Randy Dunlap
  2008-07-29 20:05 ` [PATCH 4/5] docsrc: fix crc32hash type Randy Dunlap
@ 2008-07-29 20:05 ` Randy Dunlap
  2008-07-29 20:05 ` [PATCH 2/5] docsrc: fix procfs example Randy Dunlap
  2008-07-29 20:27 ` [PATCH 1/5] docsrc: build Documentation/ sources Borislav Petkov
  4 siblings, 0 replies; 14+ messages in thread
From: Randy Dunlap @ 2008-07-29 20:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Sam Ravnborg, balbir

From: Randy Dunlap <randy.dunlap@oracle.com>

Fix printf format type warnings (seen on alpha & ia64):

Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 6 has type '__u64'
Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 7 has type '__u64'
Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 8 has type '__u64'
Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 9 has type '__u64'
Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 12 has type '__u64'
Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 13 has type '__u64'
Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 16 has type '__u64'
Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 17 has type '__u64'
Documentation/accounting/getdelays.c:214: warning: format '%15llu' expects type 'long long unsigned int', but argument 4 has type '__u64'
Documentation/accounting/getdelays.c:214: warning: format '%15llu' expects type 'long long unsigned int', but argument 5 has type '__u64'
Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 2 has type '__u64'
Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type '__u64'
Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type '__u64'
Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 5 has type '__u64'
Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 6 has type '__u64'
Documentation/accounting/getdelays.c:236: warning: 'cmd_type' may be used uninitialized in this function

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 Documentation/accounting/getdelays.c |   25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

--- linux-next-20080729.orig/Documentation/accounting/getdelays.c
+++ linux-next-20080729/Documentation/accounting/getdelays.c
@@ -201,13 +201,19 @@ void print_delayacct(struct taskstats *t
 	       "RECLAIM  %12s%15s\n"
 	       "      %15llu%15llu\n",
 	       "count", "real total", "virtual total", "delay total",
-	       t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total,
-	       t->cpu_delay_total,
+	       (unsigned long long)t->cpu_count,
+	       (unsigned long long)t->cpu_run_real_total,
+	       (unsigned long long)t->cpu_run_virtual_total,
+	       (unsigned long long)t->cpu_delay_total,
 	       "count", "delay total",
-	       t->blkio_count, t->blkio_delay_total,
-	       "count", "delay total", t->swapin_count, t->swapin_delay_total,
+	       (unsigned long long)t->blkio_count,
+	       (unsigned long long)t->blkio_delay_total,
 	       "count", "delay total",
-	       t->freepages_count, t->freepages_delay_total);
+	       (unsigned long long)t->swapin_count,
+	       (unsigned long long)t->swapin_delay_total,
+	       "count", "delay total",
+	       (unsigned long long)t->freepages_count,
+	       (unsigned long long)t->freepages_delay_total);
 }
 
 void task_context_switch_counts(struct taskstats *t)
@@ -215,14 +221,17 @@ void task_context_switch_counts(struct t
 	printf("\n\nTask   %15s%15s\n"
 	       "       %15llu%15llu\n",
 	       "voluntary", "nonvoluntary",
-	       t->nvcsw, t->nivcsw);
+	       (unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw);
 }
 
 void print_cgroupstats(struct cgroupstats *c)
 {
 	printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, "
-		"uninterruptible %llu\n", c->nr_sleeping, c->nr_io_wait,
-		c->nr_running, c->nr_stopped, c->nr_uninterruptible);
+		"uninterruptible %llu\n", (unsigned long long)c->nr_sleeping,
+		(unsigned long long)c->nr_io_wait,
+		(unsigned long long)c->nr_running,
+		(unsigned long long)c->nr_stopped,
+		(unsigned long long)c->nr_uninterruptible);
 }
 
 


-- 


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

* Re: [PATCH 1/5] docsrc: build Documentation/ sources
  2008-07-29 20:05 [PATCH 1/5] docsrc: build Documentation/ sources Randy Dunlap
                   ` (3 preceding siblings ...)
  2008-07-29 20:05 ` [PATCH 2/5] docsrc: fix procfs example Randy Dunlap
@ 2008-07-29 20:27 ` Borislav Petkov
  2008-07-29 21:10   ` Randy Dunlap
  2008-07-30  8:44   ` Sam Ravnborg
  4 siblings, 2 replies; 14+ messages in thread
From: Borislav Petkov @ 2008-07-29 20:27 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, akpm, Sam Ravnborg

On Tue, Jul 29, 2008 at 01:05:15PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Currently source files in the Documentation/ sub-dir can easily bit-rot
> since they are not generally buildable, either because they are hidden
> in text files or because there are no Makefile rules for them.
> This needs to be fixed so that the source files remain usable and good
> examples of code instead of bad examples.
> 
> Add the ability to build source files that are in the Documentation/ dir.
> Add to Kconfig as "BUILD_DOCSRC" config symbol.
> 
> Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
> Documentation/ sources.  Or enable BUILD_DOCSRC in the *config system.

How about simply adding another makefile target instead? This is more
intuitive, imho, and complies with the Kbuild conventions so far.
Something like:

make docsrc

similar to 'make help' or 'make pdfdocs' etc.

[..]
-- 
Regards/Gruß,
    Boris.

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

* Re: [PATCH 1/5] docsrc: build Documentation/ sources
  2008-07-29 20:27 ` [PATCH 1/5] docsrc: build Documentation/ sources Borislav Petkov
@ 2008-07-29 21:10   ` Randy Dunlap
  2008-07-30  8:44   ` Sam Ravnborg
  1 sibling, 0 replies; 14+ messages in thread
From: Randy Dunlap @ 2008-07-29 21:10 UTC (permalink / raw)
  To: petkovbb; +Cc: Borislav Petkov, linux-kernel, akpm, Sam Ravnborg

On Tue, 29 Jul 2008 22:27:32 +0200 Borislav Petkov wrote:

> On Tue, Jul 29, 2008 at 01:05:15PM -0700, Randy Dunlap wrote:
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > 
> > Currently source files in the Documentation/ sub-dir can easily bit-rot
> > since they are not generally buildable, either because they are hidden
> > in text files or because there are no Makefile rules for them.
> > This needs to be fixed so that the source files remain usable and good
> > examples of code instead of bad examples.
> > 
> > Add the ability to build source files that are in the Documentation/ dir.
> > Add to Kconfig as "BUILD_DOCSRC" config symbol.
> > 
> > Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
> > Documentation/ sources.  Or enable BUILD_DOCSRC in the *config system.
> 
> How about simply adding another makefile target instead? This is more
> intuitive, imho, and complies with the Kbuild conventions so far.
> Something like:
> 
> make docsrc
> 
> similar to 'make help' or 'make pdfdocs' etc.

Hi Boris,

I happen to have a previous version of the patch that does that, so yes, I can
post that if that's the preferred solution.  I'll wait for other comments before
reposting.

---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/

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

* Re: [PATCH 4/5] docsrc: fix crc32hash type
  2008-07-29 20:05 ` [PATCH 4/5] docsrc: fix crc32hash type Randy Dunlap
@ 2008-07-30  6:47   ` Dominik Brodowski
  2008-07-30  7:18     ` Andrew Morton
  0 siblings, 1 reply; 14+ messages in thread
From: Dominik Brodowski @ 2008-07-30  6:47 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, akpm, Sam Ravnborg

Hi,

On Tue, Jul 29, 2008 at 01:05:15PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Fix differing signedness warning:
> 
> Documentation/pcmcia/crc32hash.c:29: warning: pointer targets in passing argument 1 of 'crc32' differ in signedness
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>

Shall this go in via the pcmcia git tree, or with the other doc patches?

Best,
	Dominik

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

* Re: [PATCH 4/5] docsrc: fix crc32hash type
  2008-07-30  6:47   ` Dominik Brodowski
@ 2008-07-30  7:18     ` Andrew Morton
  2008-07-30  8:40       ` Sam Ravnborg
  0 siblings, 1 reply; 14+ messages in thread
From: Andrew Morton @ 2008-07-30  7:18 UTC (permalink / raw)
  To: Dominik Brodowski; +Cc: Randy Dunlap, linux-kernel, Sam Ravnborg

On Wed, 30 Jul 2008 08:47:20 +0200 Dominik Brodowski <linux@dominikbrodowski.net> wrote:

> Hi,
> 
> On Tue, Jul 29, 2008 at 01:05:15PM -0700, Randy Dunlap wrote:
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > 
> > Fix differing signedness warning:
> > 
> > Documentation/pcmcia/crc32hash.c:29: warning: pointer targets in passing argument 1 of 'crc32' differ in signedness
> > 
> > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
> 
> Shall this go in via the pcmcia git tree, or with the other doc patches?
> 

I was planning on merging them up in a week or so, if they don't appear
in anyone else's tree.


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

* Re: [PATCH 4/5] docsrc: fix crc32hash type
  2008-07-30  7:18     ` Andrew Morton
@ 2008-07-30  8:40       ` Sam Ravnborg
  0 siblings, 0 replies; 14+ messages in thread
From: Sam Ravnborg @ 2008-07-30  8:40 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Dominik Brodowski, Randy Dunlap, linux-kernel

On Wed, Jul 30, 2008 at 12:18:50AM -0700, Andrew Morton wrote:
> On Wed, 30 Jul 2008 08:47:20 +0200 Dominik Brodowski <linux@dominikbrodowski.net> wrote:
> 
> > Hi,
> > 
> > On Tue, Jul 29, 2008 at 01:05:15PM -0700, Randy Dunlap wrote:
> > > From: Randy Dunlap <randy.dunlap@oracle.com>
> > > 
> > > Fix differing signedness warning:
> > > 
> > > Documentation/pcmcia/crc32hash.c:29: warning: pointer targets in passing argument 1 of 'crc32' differ in signedness
> > > 
> > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> > Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
> > 
> > Shall this go in via the pcmcia git tree, or with the other doc patches?
> > 
> 
> I was planning on merging them up in a week or so, if they don't appear
> in anyone else's tree.
Would be good.
I would usually postpone this till next merge window if I
carried them in a kbuild tree.

	Sam

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

* Re: [PATCH 1/5] docsrc: build Documentation/ sources
  2008-07-29 20:27 ` [PATCH 1/5] docsrc: build Documentation/ sources Borislav Petkov
  2008-07-29 21:10   ` Randy Dunlap
@ 2008-07-30  8:44   ` Sam Ravnborg
  2008-07-30  8:55     ` Boris Petkov
  1 sibling, 1 reply; 14+ messages in thread
From: Sam Ravnborg @ 2008-07-30  8:44 UTC (permalink / raw)
  To: petkovbb, Randy Dunlap, linux-kernel, akpm

On Tue, Jul 29, 2008 at 10:27:32PM +0200, Borislav Petkov wrote:
> On Tue, Jul 29, 2008 at 01:05:15PM -0700, Randy Dunlap wrote:
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > 
> > Currently source files in the Documentation/ sub-dir can easily bit-rot
> > since they are not generally buildable, either because they are hidden
> > in text files or because there are no Makefile rules for them.
> > This needs to be fixed so that the source files remain usable and good
> > examples of code instead of bad examples.
> > 
> > Add the ability to build source files that are in the Documentation/ dir.
> > Add to Kconfig as "BUILD_DOCSRC" config symbol.
> > 
> > Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
> > Documentation/ sources.  Or enable BUILD_DOCSRC in the *config system.
> 
> How about simply adding another makefile target instead? This is more
> intuitive, imho, and complies with the Kbuild conventions so far.
> Something like:
> 
> make docsrc
> 
> similar to 'make help' or 'make pdfdocs' etc.

With the current approach we have much better build coverage.
All "allyesconfig" and "allmodconfig" builds will do the test
builds which is a good think.
If we introduce "make docsrc" then almost only Randy will do the
test builds and report the breakage - which is not good.

	Sam

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

* Re: [PATCH 1/5] docsrc: build Documentation/ sources
  2008-07-30  8:44   ` Sam Ravnborg
@ 2008-07-30  8:55     ` Boris Petkov
  2008-07-30 11:21       ` Sam Ravnborg
  0 siblings, 1 reply; 14+ messages in thread
From: Boris Petkov @ 2008-07-30  8:55 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Randy Dunlap, linux-kernel, akpm

On Wed, Jul 30, 2008 at 10:44 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Tue, Jul 29, 2008 at 10:27:32PM +0200, Borislav Petkov wrote:
>> On Tue, Jul 29, 2008 at 01:05:15PM -0700, Randy Dunlap wrote:
>> > From: Randy Dunlap <randy.dunlap@oracle.com>
>> >
>> > Currently source files in the Documentation/ sub-dir can easily bit-rot
>> > since they are not generally buildable, either because they are hidden
>> > in text files or because there are no Makefile rules for them.
>> > This needs to be fixed so that the source files remain usable and good
>> > examples of code instead of bad examples.
>> >
>> > Add the ability to build source files that are in the Documentation/ dir.
>> > Add to Kconfig as "BUILD_DOCSRC" config symbol.
>> >
>> > Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
>> > Documentation/ sources.  Or enable BUILD_DOCSRC in the *config system.
>>
>> How about simply adding another makefile target instead? This is more
>> intuitive, imho, and complies with the Kbuild conventions so far.
>> Something like:
>>
>> make docsrc
>>
>> similar to 'make help' or 'make pdfdocs' etc.
>
> With the current approach we have much better build coverage.
> All "allyesconfig" and "allmodconfig" builds will do the test
> builds which is a good think.
> If we introduce "make docsrc" then almost only Randy will do the
> test builds and report the breakage - which is not good.

Well, i don't see anymore people than Randy doing

CONFIG_BUILD_DOCSRC=1 make ...

either so only the other option remains, which means CONFIG_BUILD_DOCSRC
should be "default y" for more coverage...


-- 
Regards/Gruß,
Boris

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

* Re: [PATCH 1/5] docsrc: build Documentation/ sources
  2008-07-30  8:55     ` Boris Petkov
@ 2008-07-30 11:21       ` Sam Ravnborg
  2008-07-30 12:22         ` Boris Petkov
  0 siblings, 1 reply; 14+ messages in thread
From: Sam Ravnborg @ 2008-07-30 11:21 UTC (permalink / raw)
  To: petkovbb; +Cc: Randy Dunlap, linux-kernel, akpm

> >
> > With the current approach we have much better build coverage.
> > All "allyesconfig" and "allmodconfig" builds will do the test
> > builds which is a good think.
> > If we introduce "make docsrc" then almost only Randy will do the
> > test builds and report the breakage - which is not good.
> 
> Well, i don't see anymore people than Randy doing
> 
> CONFIG_BUILD_DOCSRC=1 make ...

One such example is:
http://kisskb.ellerman.id.au/linux-next

Here the all*config will do the build test of the
documentation and Stephen will tell if it breaks.

> either so only the other option remains, which means CONFIG_BUILD_DOCSRC
> should be "default y" for more coverage...
No - we do not want to set config options to "default y" unless
there are _very_ good reasons to do so.

You should check a few of Linus' responses during
this merge window if you want more background on this.
	Sam

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

* Re: [PATCH 1/5] docsrc: build Documentation/ sources
  2008-07-30 11:21       ` Sam Ravnborg
@ 2008-07-30 12:22         ` Boris Petkov
  0 siblings, 0 replies; 14+ messages in thread
From: Boris Petkov @ 2008-07-30 12:22 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Randy Dunlap, linux-kernel, akpm

On Wed, Jul 30, 2008 at 1:21 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
>> >
>> > With the current approach we have much better build coverage.
>> > All "allyesconfig" and "allmodconfig" builds will do the test
>> > builds which is a good think.
>> > If we introduce "make docsrc" then almost only Randy will do the
>> > test builds and report the breakage - which is not good.
>>
>> Well, i don't see anymore people than Randy doing
>>
>> CONFIG_BUILD_DOCSRC=1 make ...
>
> One such example is:
> http://kisskb.ellerman.id.au/linux-next
>
> Here the all*config will do the build test of the
> documentation and Stephen will tell if it breaks.
>
>> either so only the other option remains, which means CONFIG_BUILD_DOCSRC
>> should be "default y" for more coverage...
> No - we do not want to set config options to "default y" unless
> there are _very_ good reasons to do so.

Sorry, I had to think about it a bit to realize what you were implying -  the
all(yes|mod)config targets _will_ turn on the CONFIG_BUILD_DOCSRC option
so no need for the 'default y' setting, which seems pretty silly for
that case anyway.

-- 
Regards/Gruß,
Boris

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

end of thread, other threads:[~2008-07-30 12:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-29 20:05 [PATCH 1/5] docsrc: build Documentation/ sources Randy Dunlap
2008-07-29 20:05 ` [PATCH 3/5] docsrc: fix ifenslave type Randy Dunlap
2008-07-29 20:05 ` [PATCH 4/5] docsrc: fix crc32hash type Randy Dunlap
2008-07-30  6:47   ` Dominik Brodowski
2008-07-30  7:18     ` Andrew Morton
2008-07-30  8:40       ` Sam Ravnborg
2008-07-29 20:05 ` [PATCH 5/5] docsrc: fix getdelays printk formats Randy Dunlap
2008-07-29 20:05 ` [PATCH 2/5] docsrc: fix procfs example Randy Dunlap
2008-07-29 20:27 ` [PATCH 1/5] docsrc: build Documentation/ sources Borislav Petkov
2008-07-29 21:10   ` Randy Dunlap
2008-07-30  8:44   ` Sam Ravnborg
2008-07-30  8:55     ` Boris Petkov
2008-07-30 11:21       ` Sam Ravnborg
2008-07-30 12:22         ` Boris Petkov

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).