All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC v02 00/45] Compile test and fixes for exported header files
@ 2015-02-16 23:05 Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 01/45] Makefile: propagate verbose options Mikko Rapeli
                   ` (47 more replies)
  0 siblings, 48 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli

v2:
added cross compiler support with CROSS_COMPILE,
detecting libc and GCC headers from compiler,
more header file fixes

v1:
https://lkml.org/lkml/2014/8/21/665

Users of kernel header files would be happier if they did not contain
kernel specific parts and would contain #include statements for all
other header files that they depend on, and in general would compile.

This patch set fixes some headers_install issues, then introduces a
compile test for headers exported to userspace and then fixes many of the
userspace header compilation failures.

Changes are also available in headers_test_v02 branch at github:
https://github.com/mcfrisk/linux/tree/headers_test_v02

Mikko Rapeli (45):
  Makefile: propagate verbose options
  scripts/headers.sh: add verbose option to make calls if defined
  headers_install.sh: enhance error handling
  scripts/headers_compile_test.sh: compile test script for exported
    headers
  drm.h: include stdlib.h in userspace
  drm_mode.h: include stdint.h and linux/types.h in userspace
  exynos_drm.h: include stdint.h in userspace
  nouveau_drm.h: include stdint.h in userspace
  radeon_drm.h: include stdint.h in userspace
  r128_drm.h: include drm/drm.h
  via_drm.h: include linux/types.h instead of non-existing
    via_drmclient.h
  via_drm.h: hide struct via_file_private in userspace
  savage_drm.h: include <drm/drm.h>
  sis_drm.h: hide sis_file_private in userspace
  dm-log-userspace.h: include stdint.h in userspace
  hsi_char.h: include stdint.h in userspace
  ebtables.h: include stdint.h in userspace
  cld.h: include stdint.h in userspace
  rds.h: include stdint.h in userspace
  sctp.h: include stdint.h in userspace
  scsi_bsg_fc.h: include stdint.h in userspace
  scsi_netlink.h: include stdint.h in userspace
  scsi_netlink_fc.h: include stdint.h in userspace
  hdspm.h: include stdint.h in userspace
  gntalloc.h: include stdint.h in userspace
  gntdev.h: include stdint.h in userspace
  include/uapi/linux/sysctl.h: include stdlib.h in userspace
  include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h
  include/uapi/asm-generic/msgbuf.h: include asm/ipcbuf.h
  include/uapi/asm-generic/shmbuf.h: include fixes
  asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h
  drm/i810_drm.h: include drm/drm.h
  include/uapi/asm-generic/signal.h: include stdlib.h in userspace
  include/uapi/asm-generic/signal.h: hide sigset_t definition in
    userspace
  include/uapi/sound/asound.h: include stdlib.h in userspace
  include/uapi/linux/netfilter.h: include in.h and in6.h
  include/uapi/linux/socket.h: include sys/socket.h in userspace
  include/uapi/linux/agpgart.h: include stdlib.h in userspace
  include/uapi/sound/asequencer.h: include sound/asound.h
  include/uapi/sound/emu10k1.h: include sound/asound.h
  include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and
    code_valid in userspace
  include/uapi/linux/rds.h: include linux/socket.h and linux/types.h
    always
  include/uapi/linux/netfilter_bridge.h: include if.h
  nf_conntrack_tuple_common.h: include linux/types.h and
    linux/netfilter.h
  include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h

 Makefile                                           |   8 +-
 include/uapi/asm-generic/ipcbuf.h                  |   2 +
 include/uapi/asm-generic/msgbuf.h                  |   2 +
 include/uapi/asm-generic/sembuf.h                  |   2 +
 include/uapi/asm-generic/shmbuf.h                  |   6 +
 include/uapi/asm-generic/signal.h                  |   7 +
 include/uapi/asm-generic/ucontext.h                |   3 +
 include/uapi/drm/drm.h                             |   4 +
 include/uapi/drm/drm_mode.h                        |   5 +
 include/uapi/drm/exynos_drm.h                      |   5 +
 include/uapi/drm/i810_drm.h                        |   2 +
 include/uapi/drm/nouveau_drm.h                     |   6 +
 include/uapi/drm/r128_drm.h                        |   2 +
 include/uapi/drm/radeon_drm.h                      |   5 +
 include/uapi/drm/savage_drm.h                      |   2 +
 include/uapi/drm/sis_drm.h                         |   2 +
 include/uapi/drm/via_drm.h                         |   6 +-
 include/uapi/linux/agpgart.h                       |   1 +
 include/uapi/linux/dm-log-userspace.h              |   5 +
 include/uapi/linux/hsi/hsi_char.h                  |   7 +-
 include/uapi/linux/netfilter.h                     |   3 +-
 .../linux/netfilter/nf_conntrack_tuple_common.h    |   3 +
 include/uapi/linux/netfilter_bridge.h              |   1 +
 include/uapi/linux/netfilter_bridge/ebtables.h     |   5 +
 include/uapi/linux/nfsd/cld.h                      |   6 +
 include/uapi/linux/rds.h                           |   4 +
 include/uapi/linux/sctp.h                          |   4 +
 include/uapi/linux/socket.h                        |   4 +
 include/uapi/linux/sysctl.h                        |   4 +
 include/uapi/scsi/scsi_bsg_fc.h                    |   6 +
 include/uapi/scsi/scsi_netlink.h                   |   6 +-
 include/uapi/scsi/scsi_netlink_fc.h                |   5 +
 include/uapi/sound/asequencer.h                    |   1 +
 include/uapi/sound/asound.h                        |   3 +
 include/uapi/sound/emu10k1.h                       |   9 +-
 include/uapi/sound/hdspm.h                         |   6 +
 include/uapi/xen/gntalloc.h                        |   6 +
 include/uapi/xen/gntdev.h                          |   6 +
 scripts/headers.sh                                 |   2 +-
 scripts/headers_compile_test.sh                    | 143 +++++++++++++++++++++
 scripts/headers_install.sh                         |  15 ++-
 41 files changed, 306 insertions(+), 18 deletions(-)
 create mode 100755 scripts/headers_compile_test.sh

-- 
2.1.4


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

* [PATCH 01/45] Makefile: propagate verbose options
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17  7:18   ` Masahiro Yamada
  2015-02-16 23:05 ` [PATCH 02/45] scripts/headers.sh: add verbose option to make calls if defined Mikko Rapeli
                   ` (46 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, Michal Marek, linux-kbuild

Usefull when debugging the make scripts.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 4e93284..c1b515d 100644
--- a/Makefile
+++ b/Makefile
@@ -912,13 +912,13 @@ quiet_cmd_link-vmlinux = LINK    $@
 # execute if the rest of the kernel build went well.
 vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
 ifdef CONFIG_HEADERS_CHECK
-	$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
+	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) -f $(srctree)/Makefile headers_check
 endif
 ifdef CONFIG_SAMPLES
-	$(Q)$(MAKE) $(build)=samples
+	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) $(build)=samples
 endif
 ifdef CONFIG_BUILD_DOCSRC
-	$(Q)$(MAKE) $(build)=Documentation
+	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) $(build)=Documentation
 endif
 	+$(call if_changed,link-vmlinux)
 
@@ -1069,7 +1069,7 @@ headers_check_all: headers_install_all
 PHONY += headers_check
 headers_check: headers_install
 	$(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1
-	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
+	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
 
 # ---------------------------------------------------------------------------
 # Kernel selftest
-- 
2.1.4


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

* [PATCH 02/45] scripts/headers.sh: add verbose option to make calls if defined
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 01/45] Makefile: propagate verbose options Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17  7:18   ` Masahiro Yamada
  2015-02-16 23:05 ` [PATCH 03/45] headers_install.sh: enhance error handling Mikko Rapeli
                   ` (45 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, Masahiro Yamada

Useful when debugging the scripts.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 scripts/headers.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/headers.sh b/scripts/headers.sh
index 95ece06..aa62fd8 100755
--- a/scripts/headers.sh
+++ b/scripts/headers.sh
@@ -7,7 +7,7 @@ set -e
 do_command()
 {
 	if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
-		make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
+		make V=$KBUILD_VERBOSE ARCH=$2 KBUILD_HEADERS=$1 headers_$1
 	else
 		printf "Ignoring arch: %s\n" ${arch}
 	fi
-- 
2.1.4


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

* [PATCH 03/45] headers_install.sh: enhance error handling
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 01/45] Makefile: propagate verbose options Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 02/45] scripts/headers.sh: add verbose option to make calls if defined Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17 13:17   ` Michal Marek
  2015-02-16 23:05 ` [PATCH 04/45] scripts/headers_compile_test.sh: compile test script for exported headers Mikko Rapeli
                   ` (44 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, Andrew Morton, Michal Marek, Javier Barrio

Exit with error if using undefined variables or if any sub command fails
with error return value. unidef needs special handling since but this can
be done without the trap. Enables exaniming intermediate files if some
commands failed.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 scripts/headers_install.sh | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
index fdebd66..072f7d3 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -1,4 +1,7 @@
 #!/bin/sh
+set -e
+set -u
+#set -x
 
 if [ $# -lt 2 ]
 then
@@ -26,7 +29,6 @@ shift
 # Iterate through files listed on command line
 
 FILE=
-trap 'rm -f "$OUTDIR/$FILE" "$OUTDIR/$FILE.sed"' EXIT
 for i in "$@"
 do
 	FILE="$(basename "$i")"
@@ -37,10 +39,13 @@ do
 		-e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \
 		-e 's/(^|[ \t(])(inline|asm|volatile)([ \t(]|$)/\1__\2__\3/g' \
 		-e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @' \
-		"$SRCDIR/$i" > "$OUTDIR/$FILE.sed" || exit 1
+		"$SRCDIR/$i" > "$OUTDIR/$FILE.sed" || \
+		( rm -f "$OUTDIR/$FILE.sed" ; exit 1 )
 	scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ "$OUTDIR/$FILE.sed" \
-		> "$OUTDIR/$FILE"
-	[ $? -gt 1 ] && exit 1
+		> "$OUTDIR/$FILE" || \
+		( if [ $? -gt 1 ]; then \
+				rm -f "$OUTDIR/$FILE" "$OUTDIR/$FILE.sed" ; \
+				exit 1 ; \
+		  fi )
 	rm -f "$OUTDIR/$FILE.sed"
 done
-trap - EXIT
-- 
2.1.4


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

* [PATCH 04/45] scripts/headers_compile_test.sh: compile test script for exported headers
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (2 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 03/45] headers_install.sh: enhance error handling Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 05/45] drm.h: include stdlib.h in userspace Mikko Rapeli
                   ` (43 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli

Users of kernel header files would be happier if they did not contain
kernel specific parts and would contain #include statements for all
other header files that they depend on, and in general would compile.

For each header file exported to userspace, this script creates
a simple .c file which just includes the header file. Then it
tries to compile it together with minimal header files from GCC
and libc, and reports results.

Default libc and GCC header file locations are parsed from compiler
configuration.

Kernel headers depend on GCC headers so their path is included in
the test compiler command line.

Some gcc and kernel headers depend on libc headers which are made available
by copying from the compiler default location to a temporary location and
removing possibly existing kernel headers from this directory. This is a bit
of a hack but seems to work in multiple environments.

Tested natively on:

Debian unstable, i586-linux-gnu and gcc 4.9.2
Raspbian Wheezy, arm-linux-gnueabihf and gcc 4.6.3
Ubuntu 12.04 LTS, x86_64-linux-gnu and gcc 4.6.3

Tested cross compilation using standard CROSS_COMPILE=/path/to/gcc with:

arm-linux-gnueabihf-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease)

Execute the script in the directory where kernel header files are installed.
For example:

$ make headers_install
$ cd usr/include
$ ../../scripts/headers_compile_test.sh

Example statistics from 3.18.4 kernel:

130 files failed the compile test.
609 files passed the compile test.

Example error types from 3.18.4 kernel:

$ ../../scripts/headers_compile_test.sh 2>&1 | \
grep error: | sed -e 's/.*error://g' | sort | uniq -c | sort -rn

    352  unknown type name ‘uint32_t’
    134  unknown type name ‘uint64_t’
    103  unknown type name ‘size_t’
     43  unknown type name ‘__kernel_ulong_t’
     38  unknown type name ‘uint8_t’
     24  unknown type name ‘int32_t’
     22  field ‘addr’ has incomplete type
     18  field ‘tstamp’ has incomplete type
     16  unknown type name ‘__kernel_time_t’
     16  field ‘in’ has incomplete type
     16  field ‘in6’ has incomplete type
     14  unknown type name ‘__be16’
     13  ‘IFNAMSIZ’ undeclared here (not in a function)
     12  unknown type name ‘uint16_t’
      9  field ‘ifru_netmask’ has incomplete type
      9  field ‘ifru_hwaddr’ has incomplete type
      9  field ‘ifru_dstaddr’ has incomplete type
      9  field ‘ifru_broadaddr’ has incomplete type
      9  field ‘ifru_addr’ has incomplete type
      8  unknown type name ‘__kernel_pid_t’
      7  unknown type name ‘u_short’
      7  unknown type name ‘pid_t’
      6  invalid application of ‘sizeof’ to incomplete type ‘struct timespec’
      6  field ‘src’ has incomplete type
      6  field ‘audio_tstamp’ has incomplete type
      6  array type has incomplete element type
      5  unknown type name ‘__kernel_long_t’
      5  requested alignment is not an integer constant
      5  field ‘smsk’ has incomplete type
      4  unknown type name ‘__kernel_uid32_t’
      4  unknown type name ‘__kernel_gid32_t’
      4  ‘ETH_ALEN’ undeclared here (not in a function)
      3  unknown type name ‘int64_t’
      3  unknown type name ‘caddr_t’
      3  ‘IPSET_ERR_TYPE_SPECIFIC’ undeclared here (not in a function)
      3  field ‘trigger_tstamp’ has incomplete type
      3  field ‘src_addr’ has incomplete type
      3  field ‘sin_addr’ has incomplete type
      3  field ‘laddr’ has incomplete type
      3  field ‘id’ has incomplete type
      3  field ‘dmsk’ has incomplete type
      3  field ‘bssid’ has incomplete type
      3  expected specifier-qualifier-list before ‘uint64_t’
      2  unknown type name ‘u_long’
      2  unknown type name ‘stack_t’
      2  unknown type name ‘sigset_t’
      2  unknown type name ‘sa_family_t’
      2  unknown type name ‘__kernel_mode_t’
      2  unknown type name ‘__kernel_key_t’
      2  unknown type name ‘elf_gregset_t’
      2  unknown type name ‘bool’
      2  ‘uint64_t’ undeclared here (not in a function)
      2  ‘true’ undeclared (first use in this function)
      2  ‘NAME_MAX’ undeclared here (not in a function)
      2  ‘__kernel_mode_t’ undeclared here (not in a function)
      2  invalid application of ‘sizeof’ to incomplete type ‘struct sockaddr’
      2  field ‘uc_mcontext’ has incomplete type
      2  field ‘tmsk’ has incomplete type
      2  field ‘tgt’ has incomplete type
      2  field ‘shm_perm’ has incomplete type
      2  field ‘sem_perm’ has incomplete type
      2  field ‘raddr’ has incomplete type
      2  field ‘msg_perm’ has incomplete type
      2  field ‘grp’ has incomplete type
      2  field ‘dst’ has incomplete type
      2  field ‘dst_addr’ has incomplete type
      2  field ‘arp_pa’ has incomplete type
      2  field ‘arp_netmask’ has incomplete type
      2  field ‘arp_ha’ has incomplete type
      2  ‘false’ undeclared (first use in this function)
      1  xen/interface/xen.h: No such file or directory
      1  via_drmclient.h: No such file or directory
      1  unknown type name ‘wait_queue_head_t’
      1  unknown type name ‘snd_seq_client_type_t’
      1  unknown type name ‘int16_t’
      1  unknown type name ‘ino_t’
      1  unknown type name ‘elf_greg_t’
      1  unknown type name ‘elf_fpxregset_t’
      1  unknown type name ‘elf_fpregset_t’
      1  unknown type name ‘__be32’
      1  ‘SIOCDEVPRIVATE’ undeclared here (not in a function)
      1  ‘sa_family_t’ undeclared here (not in a function)
      1  ‘NULL’ undeclared (first use in this function)
      1  ‘MSG_FIN’ undeclared here (not in a function)
      1  ‘MAX_IPOPTLEN’ undeclared here (not in a function)
      1  ‘MAX_ADDR_LEN’ undeclared here (not in a function)
      1  ‘IFHWADDRLEN’ undeclared here (not in a function)
      1  field ‘vmask’ has incomplete type
      1  field ‘vifc_rmt_addr’ has incomplete type
      1  field ‘vifc_lcl_addr’ has incomplete type
      1  field ‘vaddr’ has incomplete type
      1  field ‘uc_chain’ has incomplete type
      1  field ‘tgt_ip’ has incomplete type
      1  field ‘tcp’ has incomplete type
      1  field ‘sw_reserved’ has incomplete type
      1  field ‘sspp_addr’ has incomplete type
      1  field ‘ssp_addr’ has incomplete type
      1  field ‘src_mask’ has incomplete type
      1  field ‘src_ip’ has incomplete type
      1  field ‘spt_address’ has incomplete type
      1  field ‘spp_address’ has incomplete type
      1  field ‘spinfo_address’ has incomplete type
      1  field ‘spc_aaddr’ has incomplete type
      1  field ‘sas_obs_rto_ipaddr’ has incomplete type
      1  field ‘saddr’ has incomplete type
      1  field ‘rtmsg_src’ has incomplete type
      1  field ‘rtmsg_gateway’ has incomplete type
      1  field ‘rtmsg_dst’ has incomplete type
      1  field ‘rt_genmask’ has incomplete type
      1  field ‘rt_gateway’ has incomplete type
      1  field ‘rt_dst’ has incomplete type
      1  field ‘real’ has incomplete type
      1  field ‘prefix’ has incomplete type
      1  field ‘obj_list’ has incomplete type
      1  field ‘mfcc_origin’ has incomplete type
      1  field ‘mfcc_mcastgrp’ has incomplete type
      1  field ‘mf6cc_origin’ has incomplete type
      1  field ‘mf6cc_mcastgrp’ has incomplete type
      1  field ‘mask’ has incomplete type
      1  field ‘ival2’ has incomplete type
      1  field ‘ival1’ has incomplete type
      1  field ‘iph’ has incomplete type
      1  field ‘ip’ has incomplete type
      1  field ‘im_src’ has incomplete type
      1  field ‘im_dst’ has incomplete type
      1  field ‘im6_src’ has incomplete type
      1  field ‘im6_dst’ has incomplete type
      1  field ‘gw’ has incomplete type
      1  field ‘expected’ has incomplete type
      1  field ‘dst_mask’ has incomplete type
      1  field ‘dest_addr’ has incomplete type
      1  field ‘daddr’ has incomplete type
      1  field ‘ap_addr’ has incomplete type
      1  field ‘a6’ has incomplete type
      1  field ‘a4’ has incomplete type
      1  expected specifier-qualifier-list before ‘DECLARE_BITMAP’
      1  expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘snd_seq_client_type_t’
      1  #error "patchkey.h included directly"
      1  ‘DLM_RESNAME_MAXLEN’ undeclared here (not in a function)

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 scripts/headers_compile_test.sh | 143 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 143 insertions(+)
 create mode 100755 scripts/headers_compile_test.sh

diff --git a/scripts/headers_compile_test.sh b/scripts/headers_compile_test.sh
new file mode 100755
index 0000000..9a73945
--- /dev/null
+++ b/scripts/headers_compile_test.sh
@@ -0,0 +1,143 @@
+#!/bin/bash
+# bash due to arithmetics and pipefail
+set -euo pipefail
+
+# Debugging
+#set -x
+
+echo Simple compile test for header files meant for userspace.
+
+# sanity test
+if [ ! -d ./linux ]; then
+	echo Sanity check error: ./linux directory not found
+	echo Should be called in usr/include after \'make headers_install\'.
+	echo Returns number of failed files, 0 if none.
+	exit 1
+fi
+
+# Support CC variable for compiler and ccache, and cross compiling.
+# CC is used without quotes to support CC="ccache gcc".
+set +u
+if [ "$CC"foobar == "foobar" ]; then
+	CC=cc
+fi
+
+if [ "$CROSS_COMPILE"foobar != "foobar" ]; then
+	# Using gcc name since some cross compiler tool chains don't provide
+	# the cc symlink
+	CC="$CROSS_COMPILE"gcc
+fi
+set -u
+
+# Kernel headers refer to some gcc and libc headers so make them available.
+set +u
+if [ "$ARCH_TRIPLET"foobar == "foobar" ]; then
+	# Taking triplet from gcc/cpp
+	ARCH_TRIPLET="$( $CC -v -x c -E - < /dev/null 2>&1 | \
+			grep Target | sed -e 's/Target: //' )"
+fi
+
+if [ "$LIBC"foobar == "foobar" ]; then
+	# trying to grep libc includes from gcc/cpp defaults
+	_TEMP="$( $CC -v -x c -E - < /dev/null 2>&1 | \
+		sed -n -e '/^#include <...> search starts here:$/,/^End of search list.$/{//!p}' | \
+		sed -e 's/^\ \//\//g' | \
+		grep '/usr/include' )"
+
+	# sanity check and prepare LIBC dirs
+	for d in $_TEMP; do
+		if [ ! -d "$d" ]; then
+			echo "$d not a directory"
+			exit 1
+		fi
+		LIBC="$LIBC $d"
+	done
+fi
+set -u
+
+# Copy libc include files to temp directory for the tests.
+
+COMPILE_TEST_INC=../headers_compile_test_include
+rm -rf "$COMPILE_TEST_INC"
+mkdir -p "$COMPILE_TEST_INC"
+
+for d in $LIBC; do
+	# check if last part of dir is the arch triplet, cross compile paths
+	# can have it also elsewhere so just the last one counts.
+	if !( echo "$d" | egrep "$ARCH_TRIPLET$" > /dev/null ); then
+		# hopefully just main libc dir, e.g. /usr/include
+		cp -a "$d"/* "$COMPILE_TEST_INC"/
+	elif ( echo "$d" | egrep "$ARCH_TRIPLET$" > /dev/null ); then
+		# hopefully the arch specific dir, e.g. /usr/include/x86_64-linux-gnu
+		cp -ar "$d"/* "$COMPILE_TEST_INC/"
+	else
+		echo "$d unexpected, bailing out"
+		exit 1
+	fi
+done
+
+# Simulate libc headers without kernel headers by removing
+# all known kernel header dirs from the copied libc ones.
+# This seems to magically work.
+_KERNEL_DIRS="$( find . -type d | grep -v '^\.$' )"
+( cd "$COMPILE_TEST_INC" && rm -rf $_KERNEL_DIRS )
+
+# GCC headers
+set +u
+if [ "$GCC_INC"foobar == "foobar" ]; then
+	# Take from $CC default system include paths, filter out
+	# /usr/local/include and /usr/include stuff first, then try to match
+	# for gcc.
+	_TEMP="$( $CC -v -x c -E - < /dev/null 2>&1 | \
+		sed -n -e '/^#include <...> search starts here:$/,/^End of search list.$/{//!p}' | \
+		sed -e 's/^\ \//\//g' | \
+		egrep -v '/usr/local/include' | \
+		egrep -v '/usr/include' | \
+		grep gcc | \
+		xargs )"
+
+	# merge and prepare for use with $CC
+	for d in $_TEMP; do
+		# sanity test
+		if [ ! -d "$d" ]; then
+			echo "$d: is not a directory"
+			exit 1
+		fi
+		GCC_INC="$GCC_INC -I $d"
+	done
+fi
+set -u
+
+# For each header file, create a .c which includes the header file
+# and try to compile it using only current directory for searching other
+# included header files.
+_FAILED=0
+_PASSED=0
+for f in $( find . -name "*\.h" | xargs ); do
+	_FAIL=0
+	CFILE="$( echo "$( dirname "$f" )"/"$( basename "$f" .h )".c )"
+
+	# create .c file
+	echo "#include <"$( echo "$f" | sed -e 's|^.\/||' )">" \
+		> "$(dirname "$f")"/"$(basename "$f" .h)".c
+
+	# compile test, CC not quoted to support ccache
+	echo $CC -Wall -c -nostdinc $GCC_INC -I . -I "$COMPILE_TEST_INC" -I "$COMPILE_TEST_INC/$ARCH_TRIPLET" "$CFILE"
+	$CC -Wall -c -nostdinc $GCC_INC -I . -I "$COMPILE_TEST_INC" -I "$COMPILE_TEST_INC/$ARCH_TRIPLET" "$CFILE" \
+		|| _FAIL=1
+
+	# report errors
+	if [ "$_FAIL" -gt 0 ]; then
+		echo "FAILED: $f"
+		_FAILED="$(( $_FAILED + 1 ))"
+	else
+		echo "PASSED: $f"
+		_PASSED="$(( $_PASSED + 1))"
+	fi
+done
+
+echo Statistics:
+echo "$_FAILED files failed the compile test."
+echo "$_PASSED files passed the compile test."
+
+exit "$_FAILED"
-- 
2.1.4


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

* [PATCH 05/45] drm.h: include stdlib.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (3 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 04/45] scripts/headers_compile_test.sh: compile test script for exported headers Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-23 10:26     ` Emil Velikov
  2015-02-16 23:05 ` [PATCH 06/45] drm_mode.h: include stdint.h and linux/types.h " Mikko Rapeli
                   ` (42 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, David Airlie, dri-devel, linux-api

Fixes <drm/drm.h> compilation error:

drm/drm.h:132:2: error: unknown type name ‘size_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/drm.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index b0b8556..8f4488f 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -42,6 +42,10 @@
 #include <asm/ioctl.h>
 typedef unsigned int drm_handle_t;
 
+#ifndef __KERNEL__
+#include <stdlib.h>
+#endif
+
 #else /* One of the BSDs */
 
 #include <sys/ioccom.h>
-- 
2.1.4


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

* [PATCH 06/45] drm_mode.h: include stdint.h and linux/types.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (4 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 05/45] drm.h: include stdlib.h in userspace Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05   ` Mikko Rapeli
                   ` (41 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, David Airlie, dri-devel, linux-api

Fixes compilation error:

drm/drm_mode.h:472:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/drm_mode.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index a0db2d4a..c55dfdf 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -27,7 +27,12 @@
 #ifndef _DRM_MODE_H
 #define _DRM_MODE_H
 
+#ifdef __KERNEL__
 #include <linux/types.h>
+#else
+#include <stdint.h>
+#include <linux/types.h>
+#endif
 
 #define DRM_DISPLAY_INFO_LEN	32
 #define DRM_CONNECTOR_NAME_LEN	32
-- 
2.1.4


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

* [PATCH 07/45] exynos_drm.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
@ 2015-02-16 23:05   ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 02/45] scripts/headers.sh: add verbose option to make calls if defined Mikko Rapeli
                     ` (46 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Inki Dae, Joonyoung Shim, Seung-Woo Kim,
	Kyungmin Park, David Airlie, Kukjin Kim, dri-devel, linux-api,
	linux-arm-kernel, linux-samsung-soc

Fixes compilation errors like:

drm/exynos_drm.h:30:2: error: unknown type name ‘uint64_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/exynos_drm.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/uapi/drm/exynos_drm.h b/include/uapi/drm/exynos_drm.h
index 5575ed1..03d094d 100644
--- a/include/uapi/drm/exynos_drm.h
+++ b/include/uapi/drm/exynos_drm.h
@@ -15,6 +15,11 @@
 #ifndef _UAPI_EXYNOS_DRM_H_
 #define _UAPI_EXYNOS_DRM_H_
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <drm/drm.h>
 
 /**
-- 
2.1.4


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

* [PATCH 07/45] exynos_drm.h: include stdint.h in userspace
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-arm-kernel

Fixes compilation errors like:

drm/exynos_drm.h:30:2: error: unknown type name ?uint64_t?

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/exynos_drm.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/uapi/drm/exynos_drm.h b/include/uapi/drm/exynos_drm.h
index 5575ed1..03d094d 100644
--- a/include/uapi/drm/exynos_drm.h
+++ b/include/uapi/drm/exynos_drm.h
@@ -15,6 +15,11 @@
 #ifndef _UAPI_EXYNOS_DRM_H_
 #define _UAPI_EXYNOS_DRM_H_
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <drm/drm.h>
 
 /**
-- 
2.1.4

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

* [PATCH 08/45] nouveau_drm.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (6 preceding siblings ...)
  2015-02-16 23:05   ` Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 09/45] radeon_drm.h: " Mikko Rapeli
                   ` (39 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, David Airlie, dri-devel, linux-api

Fixes compilation error:

drm/nouveau_drm.h:41:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/nouveau_drm.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/drm/nouveau_drm.h b/include/uapi/drm/nouveau_drm.h
index 0d7608d..4baf959 100644
--- a/include/uapi/drm/nouveau_drm.h
+++ b/include/uapi/drm/nouveau_drm.h
@@ -35,6 +35,12 @@
 #define NOUVEAU_ABI16_DEVICE   0xdddddddd
 #define NOUVEAU_ABI16_CHAN(n) (0xcccc0000 | (n))
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
 #define NOUVEAU_GEM_DOMAIN_CPU       (1 << 0)
 #define NOUVEAU_GEM_DOMAIN_VRAM      (1 << 1)
 #define NOUVEAU_GEM_DOMAIN_GART      (1 << 2)
-- 
2.1.4


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

* [PATCH 09/45] radeon_drm.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (7 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 08/45] nouveau_drm.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 10/45] r128_drm.h: include drm/drm.h Mikko Rapeli
                   ` (38 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Alex Deucher, Christian König, David Airlie,
	dri-devel, linux-api

Fixes compiler error:

drm/radeon_drm.h:794:2: error: unknown type name ‘uint64_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/radeon_drm.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
index 50d0fb4..4d8ed03 100644
--- a/include/uapi/drm/radeon_drm.h
+++ b/include/uapi/drm/radeon_drm.h
@@ -33,6 +33,11 @@
 #ifndef __RADEON_DRM_H__
 #define __RADEON_DRM_H__
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <drm/drm.h>
 
 /* WARNING: If you change any of these defines, make sure to change the
-- 
2.1.4


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

* [PATCH 10/45] r128_drm.h: include drm/drm.h
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (8 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 09/45] radeon_drm.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 11/45] via_drm.h: include linux/types.h instead of non-existing via_drmclient.h Mikko Rapeli
                   ` (37 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, David Airlie, dri-devel, linux-api

Fixes compile error:

drm/r128_drm.h:156:23: error: array type has incomplete element type
  struct drm_clip_rect boxes[R128_NR_SAREA_CLIPRECTS];

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/r128_drm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/drm/r128_drm.h b/include/uapi/drm/r128_drm.h
index 8d8878b..76b0aa3 100644
--- a/include/uapi/drm/r128_drm.h
+++ b/include/uapi/drm/r128_drm.h
@@ -33,6 +33,8 @@
 #ifndef __R128_DRM_H__
 #define __R128_DRM_H__
 
+#include <drm/drm.h>
+
 /* WARNING: If you change any of these defines, make sure to change the
  * defines in the X server file (r128_sarea.h)
  */
-- 
2.1.4


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

* [PATCH 11/45] via_drm.h: include linux/types.h instead of non-existing via_drmclient.h
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (9 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 10/45] r128_drm.h: include drm/drm.h Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 12/45] via_drm.h: hide struct via_file_private in userspace Mikko Rapeli
                   ` (36 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, David Airlie, dri-devel, linux-api

Fixes compiler error:

drm/via_drm.h:36:27: fatal error: via_drmclient.h: No such file or directory

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/via_drm.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/uapi/drm/via_drm.h b/include/uapi/drm/via_drm.h
index 8b0533c..791531e 100644
--- a/include/uapi/drm/via_drm.h
+++ b/include/uapi/drm/via_drm.h
@@ -24,6 +24,7 @@
 #ifndef _VIA_DRM_H_
 #define _VIA_DRM_H_
 
+#include <linux/types.h>
 #include <drm/drm.h>
 
 /* WARNING: These defines must be the same as what the Xserver uses.
@@ -33,9 +34,6 @@
 #ifndef _VIA_DEFINES_
 #define _VIA_DEFINES_
 
-#ifndef __KERNEL__
-#include "via_drmclient.h"
-#endif
 
 #define VIA_NR_SAREA_CLIPRECTS		8
 #define VIA_NR_XVMC_PORTS               10
-- 
2.1.4


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

* [PATCH 12/45] via_drm.h: hide struct via_file_private in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (10 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 11/45] via_drm.h: include linux/types.h instead of non-existing via_drmclient.h Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 13/45] savage_drm.h: include <drm/drm.h> Mikko Rapeli
                   ` (35 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, David Airlie, dri-devel, linux-api

Fixes compiler error since list_head is not exported to userspace headers.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/via_drm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/drm/via_drm.h b/include/uapi/drm/via_drm.h
index 791531e..34ce658 100644
--- a/include/uapi/drm/via_drm.h
+++ b/include/uapi/drm/via_drm.h
@@ -272,8 +272,10 @@ typedef struct drm_via_dmablit {
 	drm_via_blitsync_t sync;
 } drm_via_dmablit_t;
 
+#ifdef __KERNEL__
 struct via_file_private {
 	struct list_head obj_list;
 };
+#endif
 
 #endif				/* _VIA_DRM_H_ */
-- 
2.1.4


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

* [PATCH 13/45] savage_drm.h: include <drm/drm.h>
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (11 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 12/45] via_drm.h: hide struct via_file_private in userspace Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 14/45] sis_drm.h: hide sis_file_private in userspace Mikko Rapeli
                   ` (34 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, David Airlie, dri-devel, linux-api

Fixes compiler error:

drm/savage_drm.h:50:24: error: array type has incomplete element type
  struct drm_tex_region texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS +

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/savage_drm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/drm/savage_drm.h b/include/uapi/drm/savage_drm.h
index 818d49b..9dc9dc1 100644
--- a/include/uapi/drm/savage_drm.h
+++ b/include/uapi/drm/savage_drm.h
@@ -26,6 +26,8 @@
 #ifndef __SAVAGE_DRM_H__
 #define __SAVAGE_DRM_H__
 
+#include <drm/drm.h>
+
 #ifndef __SAVAGE_SAREA_DEFINES__
 #define __SAVAGE_SAREA_DEFINES__
 
-- 
2.1.4


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

* [PATCH 14/45] sis_drm.h: hide sis_file_private in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (12 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 13/45] savage_drm.h: include <drm/drm.h> Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 15/45] dm-log-userspace.h: include stdint.h " Mikko Rapeli
                   ` (33 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, David Airlie, dri-devel, linux-api

Fixes compiler error:

drm/sis_drm.h:68:19: error: field ‘obj_list’ has incomplete type
  struct list_head obj_list;

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/sis_drm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/drm/sis_drm.h b/include/uapi/drm/sis_drm.h
index df37632..3d0903f 100644
--- a/include/uapi/drm/sis_drm.h
+++ b/include/uapi/drm/sis_drm.h
@@ -64,8 +64,10 @@ typedef struct {
 	unsigned long offset, size;
 } drm_sis_fb_t;
 
+#ifdef __KERNEL__
 struct sis_file_private {
 	struct list_head obj_list;
 };
+#endif
 
 #endif				/* __SIS_DRM_H__ */
-- 
2.1.4


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

* [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (13 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 14/45] sis_drm.h: hide sis_file_private in userspace Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:32   ` Mike Snitzer
  2015-02-17  9:08     ` Arnd Bergmann
  2015-02-16 23:05 ` [PATCH 16/45] hsi_char.h: " Mikko Rapeli
                   ` (32 subsequent siblings)
  47 siblings, 2 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Alasdair Kergon, Mike Snitzer, dm-devel, linux-api

Fixes compilation error:

linux/dm-log-userspace.h:416:2: error: unknown type name ‘uint64_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/dm-log-userspace.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/uapi/linux/dm-log-userspace.h b/include/uapi/linux/dm-log-userspace.h
index 0fa0d9e..7b9684e 100644
--- a/include/uapi/linux/dm-log-userspace.h
+++ b/include/uapi/linux/dm-log-userspace.h
@@ -7,6 +7,11 @@
 #ifndef __DM_LOG_USERSPACE_H__
 #define __DM_LOG_USERSPACE_H__
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <linux/dm-ioctl.h> /* For DM_UUID_LEN */
 
 /*
-- 
2.1.4


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

* [PATCH 16/45] hsi_char.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (14 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 15/45] dm-log-userspace.h: include stdint.h " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 17/45] ebtables.h: " Mikko Rapeli
                   ` (31 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, Sebastian Reichel, linux-api

Fixes compiler error:

linux/hsi/hsi_char.h:51:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/hsi/hsi_char.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/hsi/hsi_char.h b/include/uapi/linux/hsi/hsi_char.h
index 76160b4..9fa8f91 100644
--- a/include/uapi/linux/hsi/hsi_char.h
+++ b/include/uapi/linux/hsi/hsi_char.h
@@ -20,10 +20,15 @@
  * 02110-1301 USA
  */
 
-
 #ifndef __HSI_CHAR_H
 #define __HSI_CHAR_H
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
 #define HSI_CHAR_MAGIC		'k'
 #define HSC_IOW(num, dtype)	_IOW(HSI_CHAR_MAGIC, num, dtype)
 #define HSC_IOR(num, dtype)	_IOR(HSI_CHAR_MAGIC, num, dtype)
-- 
2.1.4


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

* [PATCH 17/45] ebtables.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (15 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 16/45] hsi_char.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 18/45] cld.h: " Mikko Rapeli
                   ` (30 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, linux-api

Fixes compilation error:

linux/netfilter_bridge/ebtables.h:38:2: error: unknown type name ‘uint64_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/netfilter_bridge/ebtables.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/uapi/linux/netfilter_bridge/ebtables.h b/include/uapi/linux/netfilter_bridge/ebtables.h
index ba99336..9e8d6b4 100644
--- a/include/uapi/linux/netfilter_bridge/ebtables.h
+++ b/include/uapi/linux/netfilter_bridge/ebtables.h
@@ -12,6 +12,11 @@
 
 #ifndef _UAPI__LINUX_BRIDGE_EFF_H
 #define _UAPI__LINUX_BRIDGE_EFF_H
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <linux/if.h>
 #include <linux/netfilter_bridge.h>
 #include <linux/if_ether.h>
-- 
2.1.4


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

* [PATCH 18/45] cld.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (16 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 17/45] ebtables.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05   ` Mikko Rapeli
                   ` (29 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, J. Bruce Fields, linux-nfs, linux-api

Fixes compilation error:

linux/nfsd/cld.h:40:2: error: unknown type name ‘uint16_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/nfsd/cld.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/linux/nfsd/cld.h b/include/uapi/linux/nfsd/cld.h
index f14a9ab..9f60f9c 100644
--- a/include/uapi/linux/nfsd/cld.h
+++ b/include/uapi/linux/nfsd/cld.h
@@ -22,6 +22,12 @@
 #ifndef _NFSD_CLD_H
 #define _NFSD_CLD_H
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
 /* latest upcall version available */
 #define CLD_UPCALL_VERSION 1
 
-- 
2.1.4


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

* [PATCH 19/45] rds.h: include stdint.h in userspace
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, linux-api

Fixes compilation error:

linux/rds.h:96:2: error: unknown type name ‘uint8_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/rds.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h
index 9195095..7ff0c70 100644
--- a/include/uapi/linux/rds.h
+++ b/include/uapi/linux/rds.h
@@ -34,7 +34,11 @@
 #ifndef _LINUX_RDS_H
 #define _LINUX_RDS_H
 
+#ifdef __KERNEL__
 #include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 
 #define RDS_IB_ABI_VERSION		0x301
 
-- 
2.1.4


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

* [PATCH 19/45] rds.h: include stdint.h in userspace
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Mikko Rapeli, linux-api-u79uwXL29TY76Z2rM5mHXA

Fixes compilation error:

linux/rds.h:96:2: error: unknown type name ‘uint8_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
---
 include/uapi/linux/rds.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h
index 9195095..7ff0c70 100644
--- a/include/uapi/linux/rds.h
+++ b/include/uapi/linux/rds.h
@@ -34,7 +34,11 @@
 #ifndef _LINUX_RDS_H
 #define _LINUX_RDS_H
 
+#ifdef __KERNEL__
 #include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 
 #define RDS_IB_ABI_VERSION		0x301
 
-- 
2.1.4

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

* [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Vlad Yasevich, Neil Horman, linux-sctp, linux-api

Fixes compilation error:

linux/sctp.h:652:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/sctp.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index ce70fe6..9fd31cf 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -53,7 +53,11 @@
 #ifndef _UAPI_SCTP_H
 #define _UAPI_SCTP_H
 
+#ifdef __KERNEL__
 #include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <linux/socket.h>
 
 typedef __s32 sctp_assoc_t;
-- 
2.1.4


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

* [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Mikko Rapeli, Vlad Yasevich, Neil Horman,
	linux-sctp-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

Fixes compilation error:

linux/sctp.h:652:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/sctp.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index ce70fe6..9fd31cf 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -53,7 +53,11 @@
 #ifndef _UAPI_SCTP_H
 #define _UAPI_SCTP_H
 
+#ifdef __KERNEL__
 #include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <linux/socket.h>
 
 typedef __s32 sctp_assoc_t;
-- 
2.1.4


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

* [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Mikko Rapeli, Vlad Yasevich, Neil Horman,
	linux-sctp-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

Fixes compilation error:

linux/sctp.h:652:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
---
 include/uapi/linux/sctp.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index ce70fe6..9fd31cf 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -53,7 +53,11 @@
 #ifndef _UAPI_SCTP_H
 #define _UAPI_SCTP_H
 
+#ifdef __KERNEL__
 #include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <linux/socket.h>
 
 typedef __s32 sctp_assoc_t;
-- 
2.1.4

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

* [PATCH 21/45] scsi_bsg_fc.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (19 preceding siblings ...)
  2015-02-16 23:05   ` Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 22/45] scsi_netlink.h: " Mikko Rapeli
                   ` (26 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, linux-api

Fixes compilation error:

scsi/scsi_bsg_fc.h:83:2: error: unknown type name ‘uint8_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/scsi/scsi_bsg_fc.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/scsi/scsi_bsg_fc.h b/include/uapi/scsi/scsi_bsg_fc.h
index 3031b90..5cc25df 100644
--- a/include/uapi/scsi/scsi_bsg_fc.h
+++ b/include/uapi/scsi/scsi_bsg_fc.h
@@ -22,6 +22,12 @@
 #ifndef SCSI_BSG_FC_H
 #define SCSI_BSG_FC_H
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
 /*
  * This file intended to be included by both kernel and user space
  */
-- 
2.1.4


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

* [PATCH 22/45] scsi_netlink.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (20 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 21/45] scsi_bsg_fc.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 23/45] scsi_netlink_fc.h: " Mikko Rapeli
                   ` (25 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, linux-api

Fixes compilation error:

scsi/scsi_netlink.h:43:2: error: unknown type name ‘uint8_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/scsi/scsi_netlink.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/uapi/scsi/scsi_netlink.h b/include/uapi/scsi/scsi_netlink.h
index 62b4eda..9d14592 100644
--- a/include/uapi/scsi/scsi_netlink.h
+++ b/include/uapi/scsi/scsi_netlink.h
@@ -22,8 +22,12 @@
 #ifndef SCSI_NETLINK_H
 #define SCSI_NETLINK_H
 
-#include <linux/netlink.h>
+#ifdef __KERNEL__
 #include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+#include <linux/netlink.h>
 
 /*
  * This file intended to be included by both kernel and user space
-- 
2.1.4


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

* [PATCH 23/45] scsi_netlink_fc.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (21 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 22/45] scsi_netlink.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 24/45] hdspm.h: " Mikko Rapeli
                   ` (24 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, linux-api

Fixes compilation error:

scsi/scsi_netlink_fc.h:60:2: error: expected specifier-qualifier-list before ‘uint64_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/scsi/scsi_netlink_fc.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/uapi/scsi/scsi_netlink_fc.h b/include/uapi/scsi/scsi_netlink_fc.h
index cbf76e4..d969337 100644
--- a/include/uapi/scsi/scsi_netlink_fc.h
+++ b/include/uapi/scsi/scsi_netlink_fc.h
@@ -21,6 +21,11 @@
 #ifndef SCSI_NETLINK_FC_H
 #define SCSI_NETLINK_FC_H
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <scsi/scsi_netlink.h>
 
 /*
-- 
2.1.4


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

* [PATCH 24/45] hdspm.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (22 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 23/45] scsi_netlink_fc.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17  6:46     ` Takashi Iwai
  2015-02-16 23:05 ` [PATCH 25/45] gntalloc.h: " Mikko Rapeli
                   ` (23 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-api

Fixes compilation error:

sound/hdspm.h:43:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/sound/hdspm.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/sound/hdspm.h b/include/uapi/sound/hdspm.h
index d956c35..f799828 100644
--- a/include/uapi/sound/hdspm.h
+++ b/include/uapi/sound/hdspm.h
@@ -20,6 +20,12 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
 /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */
 #define HDSPM_MAX_CHANNELS      64
 
-- 
2.1.4


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

* [PATCH 25/45] gntalloc.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (23 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 24/45] hdspm.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-18 11:53   ` David Vrabel
  2015-02-18 11:53     ` David Vrabel
  2015-02-16 23:05 ` Mikko Rapeli
                   ` (22 subsequent siblings)
  47 siblings, 2 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Konrad Rzeszutek Wilk, Boris Ostrovsky,
	David Vrabel, xen-devel, linux-api

Fixes compilation error:

xen/gntalloc.h:22:2: error: unknown type name ‘uint16_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/xen/gntalloc.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/xen/gntalloc.h b/include/uapi/xen/gntalloc.h
index 76bd580..184df7e 100644
--- a/include/uapi/xen/gntalloc.h
+++ b/include/uapi/xen/gntalloc.h
@@ -11,6 +11,12 @@
 #ifndef __LINUX_PUBLIC_GNTALLOC_H__
 #define __LINUX_PUBLIC_GNTALLOC_H__
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
 /*
  * Allocates a new page and creates a new grant reference.
  */
-- 
2.1.4


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

* [PATCH 25/45] gntalloc.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (24 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 25/45] gntalloc.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 26/45] gntdev.h: " Mikko Rapeli
                   ` (21 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, David Vrabel, linux-api, xen-devel, Boris Ostrovsky

Fixes compilation error:

xen/gntalloc.h:22:2: error: unknown type name ‘uint16_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/xen/gntalloc.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/xen/gntalloc.h b/include/uapi/xen/gntalloc.h
index 76bd580..184df7e 100644
--- a/include/uapi/xen/gntalloc.h
+++ b/include/uapi/xen/gntalloc.h
@@ -11,6 +11,12 @@
 #ifndef __LINUX_PUBLIC_GNTALLOC_H__
 #define __LINUX_PUBLIC_GNTALLOC_H__
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
 /*
  * Allocates a new page and creates a new grant reference.
  */
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* [PATCH 26/45] gntdev.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (26 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 26/45] gntdev.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 27/45] include/uapi/linux/sysctl.h: include stdlib.h " Mikko Rapeli
                   ` (19 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Konrad Rzeszutek Wilk, Boris Ostrovsky,
	David Vrabel, xen-devel, linux-api

Fixes compilation error:

xen/gntdev.h:38:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/xen/gntdev.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/xen/gntdev.h b/include/uapi/xen/gntdev.h
index 5304bd3..f724f75 100644
--- a/include/uapi/xen/gntdev.h
+++ b/include/uapi/xen/gntdev.h
@@ -33,6 +33,12 @@
 #ifndef __LINUX_PUBLIC_GNTDEV_H__
 #define __LINUX_PUBLIC_GNTDEV_H__
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
 struct ioctl_gntdev_grant_ref {
 	/* The domain ID of the grant to be mapped. */
 	uint32_t domid;
-- 
2.1.4


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

* [PATCH 26/45] gntdev.h: include stdint.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (25 preceding siblings ...)
  2015-02-16 23:05 ` Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` Mikko Rapeli
                   ` (20 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, David Vrabel, linux-api, xen-devel, Boris Ostrovsky

Fixes compilation error:

xen/gntdev.h:38:2: error: unknown type name ‘uint32_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/xen/gntdev.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/xen/gntdev.h b/include/uapi/xen/gntdev.h
index 5304bd3..f724f75 100644
--- a/include/uapi/xen/gntdev.h
+++ b/include/uapi/xen/gntdev.h
@@ -33,6 +33,12 @@
 #ifndef __LINUX_PUBLIC_GNTDEV_H__
 #define __LINUX_PUBLIC_GNTDEV_H__
 
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
 struct ioctl_gntdev_grant_ref {
 	/* The domain ID of the grant to be mapped. */
 	uint32_t domid;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* [PATCH 27/45] include/uapi/linux/sysctl.h: include stdlib.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (27 preceding siblings ...)
  2015-02-16 23:05 ` Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 28/45] include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h Mikko Rapeli
                   ` (18 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, David S. Miller, Ben Greear, linux-api

Fixes userspace compilation error:

error: unknown type name ‘size_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/sysctl.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h
index 43aaba1..b7b344f 100644
--- a/include/uapi/linux/sysctl.h
+++ b/include/uapi/linux/sysctl.h
@@ -26,6 +26,10 @@
 #include <linux/types.h>
 #include <linux/compiler.h>
 
+#ifndef __KERNEL__
+#include <stdlib.h>
+#endif
+
 struct completion;
 
 #define CTL_MAXNAME 10		/* how many path components do we allow in a
-- 
2.1.4


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

* [PATCH 28/45] include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (28 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 27/45] include/uapi/linux/sysctl.h: include stdlib.h " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05   ` Mikko Rapeli
                   ` (17 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api

Fixes userspace compilation error:

error: unknown type name ‘__kernel_key_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/asm-generic/ipcbuf.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h
index 3dbcc1e..909f825 100644
--- a/include/uapi/asm-generic/ipcbuf.h
+++ b/include/uapi/asm-generic/ipcbuf.h
@@ -1,6 +1,8 @@
 #ifndef __ASM_GENERIC_IPCBUF_H
 #define __ASM_GENERIC_IPCBUF_H
 
+#include <linux/posix_types.h>
+
 /*
  * The generic ipc64_perm structure:
  * Note extra padding because this structure is passed back and forth
-- 
2.1.4


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

* [PATCH 29/45] include/uapi/asm-generic/msgbuf.h: include asm/ipcbuf.h
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api

Fixes userspace compilation errors like:

error: field ‘msg_perm’ has incomplete type
struct ipc64_perm msg_perm

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/asm-generic/msgbuf.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h
index f55ecc4..f5fbd8e 100644
--- a/include/uapi/asm-generic/msgbuf.h
+++ b/include/uapi/asm-generic/msgbuf.h
@@ -2,6 +2,8 @@
 #define __ASM_GENERIC_MSGBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
+
 /*
  * generic msqid64_ds structure.
  *
-- 
2.1.4


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

* [PATCH 29/45] include/uapi/asm-generic/msgbuf.h: include asm/ipcbuf.h
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Mikko Rapeli, Arnd Bergmann, linux-arch-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

Fixes userspace compilation errors like:

error: field ‘msg_perm’ has incomplete type
struct ipc64_perm msg_perm

Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
---
 include/uapi/asm-generic/msgbuf.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h
index f55ecc4..f5fbd8e 100644
--- a/include/uapi/asm-generic/msgbuf.h
+++ b/include/uapi/asm-generic/msgbuf.h
@@ -2,6 +2,8 @@
 #define __ASM_GENERIC_MSGBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/ipcbuf.h>
+
 /*
  * generic msqid64_ds structure.
  *
-- 
2.1.4

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

* [PATCH 30/45] include/uapi/asm-generic/shmbuf.h: include fixes
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (30 preceding siblings ...)
  2015-02-16 23:05   ` Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 31/45] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
                   ` (15 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api

Fixes userspace compilation errors like:

error: field ‘shm_perm’ has incomplete type
struct ipc64_perm shm_perm; /* operation perms */
error: unknown type name ‘size_t’
error: unknown type name ‘__kernel_time_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/asm-generic/shmbuf.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h
index 7e9fb2f..24ef152 100644
--- a/include/uapi/asm-generic/shmbuf.h
+++ b/include/uapi/asm-generic/shmbuf.h
@@ -1,7 +1,13 @@
 #ifndef __ASM_GENERIC_SHMBUF_H
 #define __ASM_GENERIC_SHMBUF_H
 
+#include <linux/types.h>
 #include <asm/bitsperlong.h>
+#include <asm/msgbuf.h>
+
+#ifndef __KERNEL__
+#include <stdlib.h>
+#endif
 
 /*
  * The shmid64_ds structure for x86 architecture.
-- 
2.1.4


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

* [PATCH 31/45] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (31 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 30/45] include/uapi/asm-generic/shmbuf.h: include fixes Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 32/45] drm/i810_drm.h: include drm/drm.h Mikko Rapeli
                   ` (14 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api

Fixes userspace compilation errors like:

error: field ‘msg_perm’ has incomplete type
struct ipc64_perm msg_perm;
error: unknown type name ‘__kernel_ulong_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/asm-generic/sembuf.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h
index 4cb2c13..17d523f 100644
--- a/include/uapi/asm-generic/sembuf.h
+++ b/include/uapi/asm-generic/sembuf.h
@@ -2,6 +2,8 @@
 #define __ASM_GENERIC_SEMBUF_H
 
 #include <asm/bitsperlong.h>
+#include <asm/posix_types.h>
+#include <asm/ipcbuf.h>
 
 /*
  * The semid64_ds structure for x86 architecture.
-- 
2.1.4


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

* [PATCH 32/45] drm/i810_drm.h: include drm/drm.h
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (32 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 31/45] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace Mikko Rapeli
                   ` (13 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, David Airlie, dri-devel, linux-api

Fixes userspace compilation error:

error: array type has incomplete element type
struct drm_clip_rect boxes[I810_NR_SAREA_CLIPRECTS];

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/drm/i810_drm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/drm/i810_drm.h b/include/uapi/drm/i810_drm.h
index 7a10bb6..34736ef 100644
--- a/include/uapi/drm/i810_drm.h
+++ b/include/uapi/drm/i810_drm.h
@@ -1,6 +1,8 @@
 #ifndef _I810_DRM_H_
 #define _I810_DRM_H_
 
+#include <drm/drm.h>
+
 /* WARNING: These defines must be the same as what the Xserver uses.
  * if you change them, you must change the defines in the Xserver.
  */
-- 
2.1.4


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

* [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (33 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 32/45] drm/i810_drm.h: include drm/drm.h Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17  9:44     ` Arnd Bergmann
  2015-02-16 23:05 ` [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition " Mikko Rapeli
                   ` (12 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api

Fixes compiler warning:
error: unknown type name ‘size_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/asm-generic/signal.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index 9df61f1..8a341a2 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -3,6 +3,10 @@
 
 #include <linux/types.h>
 
+#ifndef __KERNEL__
+#include <stdlib.h>
+#endif
+
 #define _NSIG		64
 #define _NSIG_BPW	__BITS_PER_LONG
 #define _NSIG_WORDS	(_NSIG / _NSIG_BPW)
-- 
2.1.4


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

* [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (34 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17  9:16     ` Arnd Bergmann
  2015-02-16 23:05 ` [PATCH 35/45] include/uapi/sound/asound.h: include stdlib.h " Mikko Rapeli
                   ` (11 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api

It is already defined by libc headers in
/usr/include/i386-linux-gnu/sys/select.h

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/asm-generic/signal.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index 8a341a2..af4d83a 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -88,9 +88,12 @@
 #define SIGSTKSZ	8192
 
 #ifndef __ASSEMBLY__
+#ifdef __KERNEL__
+/* already defined in userspace via stdlib.h */
 typedef struct {
 	unsigned long sig[_NSIG_WORDS];
 } sigset_t;
+#endif /* __KERNEL__ */
 
 /* not actually used, but required for linux/syscalls.h */
 typedef unsigned long old_sigset_t;
-- 
2.1.4


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

* [PATCH 35/45] include/uapi/sound/asound.h: include stdlib.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (35 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17  6:46   ` Takashi Iwai
  2015-02-16 23:05 ` [PATCH 36/45] include/uapi/linux/netfilter.h: include in.h and in6.h Mikko Rapeli
                   ` (10 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-api

Fixes compiler errors like:
error: field ‘trigger_tstamp’ has incomplete type
error: invalid application of ‘sizeof’ to incomplete t
ype ‘struct timespec’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/sound/asound.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
index 941d32f..af156b0 100644
--- a/include/uapi/sound/asound.h
+++ b/include/uapi/sound/asound.h
@@ -25,6 +25,9 @@
 
 #include <linux/types.h>
 
+#ifndef __KERNEL__
+#include <stdlib.h>
+#endif
 
 /*
  *  protocol version
-- 
2.1.4


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

* [PATCH 36/45] include/uapi/linux/netfilter.h: include in.h and in6.h
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (36 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 35/45] include/uapi/sound/asound.h: include stdlib.h " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace Mikko Rapeli
                   ` (9 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Pablo Neira Ayuso, Patrick McHardy,
	Jozsef Kadlecsik, netfilter-devel, coreteam, linux-api

Fixes userspace compile errors like:
error: field ‘in’ has incomplete type
error: field ‘in6’ has incomplete type

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/netfilter.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/netfilter.h b/include/uapi/linux/netfilter.h
index ef1b1f8..750c04e 100644
--- a/include/uapi/linux/netfilter.h
+++ b/include/uapi/linux/netfilter.h
@@ -4,7 +4,8 @@
 #include <linux/types.h>
 #include <linux/compiler.h>
 #include <linux/sysctl.h>
-
+#include <linux/in.h>
+#include <linux/in6.h>
 
 /* Responses from hook functions. */
 #define NF_DROP 0
-- 
2.1.4


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

* [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (37 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 36/45] include/uapi/linux/netfilter.h: include in.h and in6.h Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17  9:14     ` Arnd Bergmann
  2015-02-16 23:05 ` [PATCH 38/45] include/uapi/linux/agpgart.h: include stdlib.h " Mikko Rapeli
                   ` (8 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, linux-api

This libc header has sockaddr definition for userspace.
Fixes compilation errors like:
error: field ‘ifru_addr’ has incomplete type
struct sockaddr ifru_addr;

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/socket.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/socket.h b/include/uapi/linux/socket.h
index 76ab0c6..8a81197 100644
--- a/include/uapi/linux/socket.h
+++ b/include/uapi/linux/socket.h
@@ -1,6 +1,10 @@
 #ifndef _UAPI_LINUX_SOCKET_H
 #define _UAPI_LINUX_SOCKET_H
 
+#ifndef __KERNEL__
+#include <sys/socket.h>
+#endif
+
 /*
  * Desired design of maximum size and alignment (see RFC2553)
  */
-- 
2.1.4


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

* [PATCH 38/45] include/uapi/linux/agpgart.h: include stdlib.h in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (38 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05   ` Mikko Rapeli
                   ` (7 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, David Airlie, linux-api

Fixes userspace compiler error:
error: unknown type name ‘size_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/agpgart.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/agpgart.h b/include/uapi/linux/agpgart.h
index 4e828cf..f525104 100644
--- a/include/uapi/linux/agpgart.h
+++ b/include/uapi/linux/agpgart.h
@@ -52,6 +52,7 @@
 
 #ifndef __KERNEL__
 #include <linux/types.h>
+#include <stdlib.h>
 
 struct agp_version {
 	__u16 major;
-- 
2.1.4


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

* [PATCH 39/45] include/uapi/sound/asequencer.h: include sound/asound.h
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-api

Fixes userspace compilation error:
error: unknown type name ‘snd_seq_client_type_t’
snd_seq_client_type_t type; /* client type */

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/sound/asequencer.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/sound/asequencer.h b/include/uapi/sound/asequencer.h
index 09c8a00..5a5fa49 100644
--- a/include/uapi/sound/asequencer.h
+++ b/include/uapi/sound/asequencer.h
@@ -22,6 +22,7 @@
 #ifndef _UAPI__SOUND_ASEQUENCER_H
 #define _UAPI__SOUND_ASEQUENCER_H
 
+#include <sound/asound.h>
 
 /** version of the sequencer */
 #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION (1, 0, 1)
-- 
2.1.4


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

* [PATCH 39/45] include/uapi/sound/asequencer.h: include sound/asound.h
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Mikko Rapeli, Jaroslav Kysela, Takashi Iwai,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-api-u79uwXL29TY76Z2rM5mHXA

Fixes userspace compilation error:
error: unknown type name ‘snd_seq_client_type_t’
snd_seq_client_type_t type; /* client type */

Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
---
 include/uapi/sound/asequencer.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/sound/asequencer.h b/include/uapi/sound/asequencer.h
index 09c8a00..5a5fa49 100644
--- a/include/uapi/sound/asequencer.h
+++ b/include/uapi/sound/asequencer.h
@@ -22,6 +22,7 @@
 #ifndef _UAPI__SOUND_ASEQUENCER_H
 #define _UAPI__SOUND_ASEQUENCER_H
 
+#include <sound/asound.h>
 
 /** version of the sequencer */
 #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION (1, 0, 1)
-- 
2.1.4

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

* [PATCH 40/45] include/uapi/sound/emu10k1.h: include sound/asound.h
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (40 preceding siblings ...)
  2015-02-16 23:05   ` Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17  6:46   ` Takashi Iwai
  2015-02-16 23:05 ` [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace Mikko Rapeli
                   ` (5 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-api

Fixes userspace compilation errors like:
error: field ‘id’ has incomplete type
struct snd_ctl_elem_id id;  /* full control ID definition */

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/sound/emu10k1.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/uapi/sound/emu10k1.h b/include/uapi/sound/emu10k1.h
index d1bbaf7..ec1535b 100644
--- a/include/uapi/sound/emu10k1.h
+++ b/include/uapi/sound/emu10k1.h
@@ -23,8 +23,7 @@
 #define _UAPI__SOUND_EMU10K1_H
 
 #include <linux/types.h>
-
-
+#include <sound/asound.h>
 
 /*
  * ---- FX8010 ----
-- 
2.1.4


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

* [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (41 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 40/45] include/uapi/sound/emu10k1.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17  6:27     ` Takashi Iwai
  2015-02-16 23:05   ` Mikko Rapeli
                   ` (4 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-api

The DECLARE_BITMAP macro is not available in userspace headers.
Fixes userspace compile error:
error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/sound/emu10k1.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/sound/emu10k1.h b/include/uapi/sound/emu10k1.h
index ec1535b..f2fd870 100644
--- a/include/uapi/sound/emu10k1.h
+++ b/include/uapi/sound/emu10k1.h
@@ -300,7 +300,9 @@ struct snd_emu10k1_fx8010_control_old_gpr {
 struct snd_emu10k1_fx8010_code {
 	char name[128];
 
+#ifdef __KERNEL__
 	DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
+#endif
 	__u32 __user *gpr_map;		/* initializers */
 
 	unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
@@ -313,11 +315,15 @@ struct snd_emu10k1_fx8010_code {
 	unsigned int gpr_list_control_total; /* total count of GPR controls */
 	struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */
 
+#ifdef __KERNEL__
 	DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
+#endif
 	__u32 __user *tram_data_map;	  /* data initializers */
 	__u32 __user *tram_addr_map;	  /* map initializers */
 
+#ifdef __KERNEL__
 	DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
+#endif
 	__u32 __user *code;		  /* one instruction - 64 bits */
 };
 
-- 
2.1.4


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

* [PATCH 42/45] include/uapi/linux/rds.h: include linux/socket.h and linux/types.h always
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, linux-api

Fixes compilation errors in userspace like:

error: unknown type name ‘__be32’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/rds.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h
index 7ff0c70..47b1ede 100644
--- a/include/uapi/linux/rds.h
+++ b/include/uapi/linux/rds.h
@@ -34,9 +34,9 @@
 #ifndef _LINUX_RDS_H
 #define _LINUX_RDS_H
 
-#ifdef __KERNEL__
 #include <linux/types.h>
-#else
+#include <linux/socket.h>
+#ifndef __KERNEL__
 #include <stdint.h>
 #endif
 
-- 
2.1.4


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

* [PATCH 42/45] include/uapi/linux/rds.h: include linux/socket.h and linux/types.h always
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Mikko Rapeli, linux-api-u79uwXL29TY76Z2rM5mHXA

Fixes compilation errors in userspace like:

error: unknown type name ‘__be32’

Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
---
 include/uapi/linux/rds.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h
index 7ff0c70..47b1ede 100644
--- a/include/uapi/linux/rds.h
+++ b/include/uapi/linux/rds.h
@@ -34,9 +34,9 @@
 #ifndef _LINUX_RDS_H
 #define _LINUX_RDS_H
 
-#ifdef __KERNEL__
 #include <linux/types.h>
-#else
+#include <linux/socket.h>
+#ifndef __KERNEL__
 #include <stdint.h>
 #endif
 
-- 
2.1.4

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

* [PATCH 43/45] include/uapi/linux/netfilter_bridge.h: include if.h
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (43 preceding siblings ...)
  2015-02-16 23:05   ` Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17  0:02     ` Jan Engelhardt
  2015-02-16 23:05   ` Mikko Rapeli
                   ` (2 subsequent siblings)
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Pablo Neira Ayuso, Patrick McHardy,
	Jozsef Kadlecsik, netfilter-devel, coreteam, linux-api

Fixes userspace compilation errors like:

error: field ‘in’ has incomplete type
struct in_addr in;

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/netfilter_bridge.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/netfilter_bridge.h b/include/uapi/linux/netfilter_bridge.h
index a5eda6d..5bb0528 100644
--- a/include/uapi/linux/netfilter_bridge.h
+++ b/include/uapi/linux/netfilter_bridge.h
@@ -4,6 +4,7 @@
 /* bridge-specific defines for netfilter. 
  */
 
+#include <linux/if.h>
 #include <linux/netfilter.h>
 #include <linux/if_ether.h>
 #include <linux/if_vlan.h>
-- 
2.1.4


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

* [PATCH 44/45] nf_conntrack_tuple_common.h: include linux/types.h and linux/netfilter.h
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
@ 2015-02-16 23:05   ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 02/45] scripts/headers.sh: add verbose option to make calls if defined Mikko Rapeli
                     ` (46 subsequent siblings)
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Pablo Neira Ayuso, Patrick McHardy,
	Jozsef Kadlecsik, netfilter-devel, coreteam, linux-api

Fixes userspace compilation errors like:
error: unknown type name ‘__be16’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/netfilter/nf_conntrack_tuple_common.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/uapi/linux/netfilter/nf_conntrack_tuple_common.h b/include/uapi/linux/netfilter/nf_conntrack_tuple_common.h
index 2f6bbc5..a9c3834 100644
--- a/include/uapi/linux/netfilter/nf_conntrack_tuple_common.h
+++ b/include/uapi/linux/netfilter/nf_conntrack_tuple_common.h
@@ -1,6 +1,9 @@
 #ifndef _NF_CONNTRACK_TUPLE_COMMON_H
 #define _NF_CONNTRACK_TUPLE_COMMON_H
 
+#include <linux/types.h>
+#include <linux/netfilter.h>
+
 enum ip_conntrack_dir {
 	IP_CT_DIR_ORIGINAL,
 	IP_CT_DIR_REPLY,
-- 
2.1.4


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

* [PATCH 44/45] nf_conntrack_tuple_common.h: include linux/types.h and linux/netfilter.h
@ 2015-02-16 23:05   ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mikko Rapeli, Pablo Neira Ayuso, Patrick McHardy,
	Jozsef Kadlecsik, netfilter-devel, coreteam, linux-api

Fixes userspace compilation errors like:
error: unknown type name ‘__be16’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/linux/netfilter/nf_conntrack_tuple_common.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/uapi/linux/netfilter/nf_conntrack_tuple_common.h b/include/uapi/linux/netfilter/nf_conntrack_tuple_common.h
index 2f6bbc5..a9c3834 100644
--- a/include/uapi/linux/netfilter/nf_conntrack_tuple_common.h
+++ b/include/uapi/linux/netfilter/nf_conntrack_tuple_common.h
@@ -1,6 +1,9 @@
 #ifndef _NF_CONNTRACK_TUPLE_COMMON_H
 #define _NF_CONNTRACK_TUPLE_COMMON_H
 
+#include <linux/types.h>
+#include <linux/netfilter.h>
+
 enum ip_conntrack_dir {
 	IP_CT_DIR_ORIGINAL,
 	IP_CT_DIR_REPLY,
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (45 preceding siblings ...)
  2015-02-16 23:05   ` Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-17  9:10   ` Arnd Bergmann
  2015-02-18 16:16 ` [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
  47 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mikko Rapeli, Arnd Bergmann, linux-arch, linux-api

Fixes userspace compiler errors:

error: unknown type name ‘stack_t’
error: field ‘uc_mcontext’ has incomplete type
struct sigcontext uc_mcontext;
error: unknown type name ‘sigset_t’

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 include/uapi/asm-generic/ucontext.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/uapi/asm-generic/ucontext.h b/include/uapi/asm-generic/ucontext.h
index ad77343..31ece341 100644
--- a/include/uapi/asm-generic/ucontext.h
+++ b/include/uapi/asm-generic/ucontext.h
@@ -1,6 +1,9 @@
 #ifndef __ASM_GENERIC_UCONTEXT_H
 #define __ASM_GENERIC_UCONTEXT_H
 
+#include <asm-generic/signal.h>
+#include <asm/sigcontext.h>
+
 struct ucontext {
 	unsigned long	  uc_flags;
 	struct ucontext  *uc_link;
-- 
2.1.4


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

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
  2015-02-16 23:05 ` [PATCH 15/45] dm-log-userspace.h: include stdint.h " Mikko Rapeli
@ 2015-02-16 23:32   ` Mike Snitzer
  2015-02-16 23:48       ` Mikko Rapeli
  2015-02-17  9:08     ` Arnd Bergmann
  1 sibling, 1 reply; 143+ messages in thread
From: Mike Snitzer @ 2015-02-16 23:32 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, Alasdair Kergon, dm-devel, linux-api

On Mon, Feb 16 2015 at  6:05pm -0500,
Mikko Rapeli <mikko.rapeli@iki.fi> wrote:

> Fixes compilation error:
> 
> linux/dm-log-userspace.h:416:2: error: unknown type name ‘uint64_t’

What userspace code are you compiling?  Do you have a feel for when this
stopped working?

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

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
@ 2015-02-16 23:48       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:48 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: linux-kernel, Alasdair Kergon, dm-devel, linux-api

On Mon, Feb 16, 2015 at 06:32:54PM -0500, Mike Snitzer wrote:
> On Mon, Feb 16 2015 at  6:05pm -0500,
> Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> 
> > Fixes compilation error:
> > 
> > linux/dm-log-userspace.h:416:2: error: unknown type name ‘uint64_t’
> 
> What userspace code are you compiling?  Do you have a feel for when this
> stopped working?

See Message-Id: <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
or https://lkml.org/lkml/2015/2/16/521

The failure comes from a test which tries to compile each exported header file
in userspace one at a time.

-Mikko

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

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
@ 2015-02-16 23:48       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-16 23:48 UTC (permalink / raw)
  To: Mike Snitzer
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Alasdair Kergon,
	dm-devel-H+wXaHxf7aLQT0dZR+AlfA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Mon, Feb 16, 2015 at 06:32:54PM -0500, Mike Snitzer wrote:
> On Mon, Feb 16 2015 at  6:05pm -0500,
> Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org> wrote:
> 
> > Fixes compilation error:
> > 
> > linux/dm-log-userspace.h:416:2: error: unknown type name ‘uint64_t’
> 
> What userspace code are you compiling?  Do you have a feel for when this
> stopped working?

See Message-Id: <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
or https://lkml.org/lkml/2015/2/16/521

The failure comes from a test which tries to compile each exported header file
in userspace one at a time.

-Mikko

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

* Re: [PATCH 43/45] include/uapi/linux/netfilter_bridge.h: include if.h
  2015-02-16 23:05 ` [PATCH 43/45] include/uapi/linux/netfilter_bridge.h: include if.h Mikko Rapeli
@ 2015-02-17  0:02     ` Jan Engelhardt
  0 siblings, 0 replies; 143+ messages in thread
From: Jan Engelhardt @ 2015-02-17  0:02 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: Linux Kernel Mailing List, Netfilter Developer Mailing List, linux-api

On Tuesday 2015-02-17 00:05, Mikko Rapeli wrote:

>Fixes userspace compilation errors like:
>
>error: field ‘in’ has incomplete type
>struct in_addr in;
> 
>+#include <linux/if.h>

Patch 36/45 included linux/in.h instead of linux/if.h for addressing "in has incomplete
type". Should this be used here too?

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

* Re: [PATCH 43/45] include/uapi/linux/netfilter_bridge.h: include if.h
@ 2015-02-17  0:02     ` Jan Engelhardt
  0 siblings, 0 replies; 143+ messages in thread
From: Jan Engelhardt @ 2015-02-17  0:02 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: Linux Kernel Mailing List, Netfilter Developer Mailing List, linux-api

On Tuesday 2015-02-17 00:05, Mikko Rapeli wrote:

>Fixes userspace compilation errors like:
>
>error: field ‘in’ has incomplete type
>struct in_addr in;
> 
>+#include <linux/if.h>

Patch 36/45 included linux/in.h instead of linux/if.h for addressing "in has incomplete
type". Should this be used here too?

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-02-17  6:27     ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-02-17  6:27 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

At Tue, 17 Feb 2015 00:05:44 +0100,
Mikko Rapeli wrote:
> 
> The DECLARE_BITMAP macro is not available in userspace headers.
> Fixes userspace compile error:
> error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’

It's nonsense.  This results in an incompatible structure, thus ABI
would be broken completely (actually this will break the compile of
ld10k1).


Takashi

> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
>  include/uapi/sound/emu10k1.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/uapi/sound/emu10k1.h b/include/uapi/sound/emu10k1.h
> index ec1535b..f2fd870 100644
> --- a/include/uapi/sound/emu10k1.h
> +++ b/include/uapi/sound/emu10k1.h
> @@ -300,7 +300,9 @@ struct snd_emu10k1_fx8010_control_old_gpr {
>  struct snd_emu10k1_fx8010_code {
>  	char name[128];
>  
> +#ifdef __KERNEL__
>  	DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
> +#endif
>  	__u32 __user *gpr_map;		/* initializers */
>  
>  	unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
> @@ -313,11 +315,15 @@ struct snd_emu10k1_fx8010_code {
>  	unsigned int gpr_list_control_total; /* total count of GPR controls */
>  	struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */
>  
> +#ifdef __KERNEL__
>  	DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
> +#endif
>  	__u32 __user *tram_data_map;	  /* data initializers */
>  	__u32 __user *tram_addr_map;	  /* map initializers */
>  
> +#ifdef __KERNEL__
>  	DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
> +#endif
>  	__u32 __user *code;		  /* one instruction - 64 bits */
>  };
>  
> -- 
> 2.1.4
> 

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-02-17  6:27     ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-02-17  6:27 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Jaroslav Kysela,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-api-u79uwXL29TY76Z2rM5mHXA

At Tue, 17 Feb 2015 00:05:44 +0100,
Mikko Rapeli wrote:
> 
> The DECLARE_BITMAP macro is not available in userspace headers.
> Fixes userspace compile error:
> error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’

It's nonsense.  This results in an incompatible structure, thus ABI
would be broken completely (actually this will break the compile of
ld10k1).


Takashi

> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> ---
>  include/uapi/sound/emu10k1.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/uapi/sound/emu10k1.h b/include/uapi/sound/emu10k1.h
> index ec1535b..f2fd870 100644
> --- a/include/uapi/sound/emu10k1.h
> +++ b/include/uapi/sound/emu10k1.h
> @@ -300,7 +300,9 @@ struct snd_emu10k1_fx8010_control_old_gpr {
>  struct snd_emu10k1_fx8010_code {
>  	char name[128];
>  
> +#ifdef __KERNEL__
>  	DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
> +#endif
>  	__u32 __user *gpr_map;		/* initializers */
>  
>  	unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
> @@ -313,11 +315,15 @@ struct snd_emu10k1_fx8010_code {
>  	unsigned int gpr_list_control_total; /* total count of GPR controls */
>  	struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */
>  
> +#ifdef __KERNEL__
>  	DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
> +#endif
>  	__u32 __user *tram_data_map;	  /* data initializers */
>  	__u32 __user *tram_addr_map;	  /* map initializers */
>  
> +#ifdef __KERNEL__
>  	DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
> +#endif
>  	__u32 __user *code;		  /* one instruction - 64 bits */
>  };
>  
> -- 
> 2.1.4
> 

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

* Re: [PATCH 24/45] hdspm.h: include stdint.h in userspace
  2015-02-16 23:05 ` [PATCH 24/45] hdspm.h: " Mikko Rapeli
@ 2015-02-17  6:46     ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-02-17  6:46 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

At Tue, 17 Feb 2015 00:05:27 +0100,
Mikko Rapeli wrote:
> 
> Fixes compilation error:
> 
> sound/hdspm.h:43:2: error: unknown type name ‘uint32_t’
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

Applied for 3.21, thanks.


Takashi

> ---
>  include/uapi/sound/hdspm.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/uapi/sound/hdspm.h b/include/uapi/sound/hdspm.h
> index d956c35..f799828 100644
> --- a/include/uapi/sound/hdspm.h
> +++ b/include/uapi/sound/hdspm.h
> @@ -20,6 +20,12 @@
>   *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
>   */
>  
> +#ifdef __KERNEL__
> +#include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif
> +
>  /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */
>  #define HDSPM_MAX_CHANNELS      64
>  
> -- 
> 2.1.4
> 

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

* Re: [PATCH 24/45] hdspm.h: include stdint.h in userspace
@ 2015-02-17  6:46     ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-02-17  6:46 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-api, alsa-devel, linux-kernel

At Tue, 17 Feb 2015 00:05:27 +0100,
Mikko Rapeli wrote:
> 
> Fixes compilation error:
> 
> sound/hdspm.h:43:2: error: unknown type name ‘uint32_t’
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

Applied for 3.21, thanks.


Takashi

> ---
>  include/uapi/sound/hdspm.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/uapi/sound/hdspm.h b/include/uapi/sound/hdspm.h
> index d956c35..f799828 100644
> --- a/include/uapi/sound/hdspm.h
> +++ b/include/uapi/sound/hdspm.h
> @@ -20,6 +20,12 @@
>   *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
>   */
>  
> +#ifdef __KERNEL__
> +#include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif
> +
>  /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */
>  #define HDSPM_MAX_CHANNELS      64
>  
> -- 
> 2.1.4
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [PATCH 35/45] include/uapi/sound/asound.h: include stdlib.h in userspace
  2015-02-16 23:05 ` [PATCH 35/45] include/uapi/sound/asound.h: include stdlib.h " Mikko Rapeli
@ 2015-02-17  6:46   ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-02-17  6:46 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

At Tue, 17 Feb 2015 00:05:38 +0100,
Mikko Rapeli wrote:
> 
> Fixes compiler errors like:
> error: field ‘trigger_tstamp’ has incomplete type
> error: invalid application of ‘sizeof’ to incomplete t
> ype ‘struct timespec’
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

Applied for 3.21, thanks.


Takashi

> ---
>  include/uapi/sound/asound.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
> index 941d32f..af156b0 100644
> --- a/include/uapi/sound/asound.h
> +++ b/include/uapi/sound/asound.h
> @@ -25,6 +25,9 @@
>  
>  #include <linux/types.h>
>  
> +#ifndef __KERNEL__
> +#include <stdlib.h>
> +#endif
>  
>  /*
>   *  protocol version
> -- 
> 2.1.4
> 

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

* Re: [PATCH 39/45] include/uapi/sound/asequencer.h: include sound/asound.h
  2015-02-16 23:05   ` Mikko Rapeli
  (?)
@ 2015-02-17  6:46   ` Takashi Iwai
  -1 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-02-17  6:46 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

At Tue, 17 Feb 2015 00:05:42 +0100,
Mikko Rapeli wrote:
> 
> Fixes userspace compilation error:
> error: unknown type name ‘snd_seq_client_type_t’
> snd_seq_client_type_t type; /* client type */
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

Applied for 3.21, thanks.


Takashi

> ---
>  include/uapi/sound/asequencer.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/uapi/sound/asequencer.h b/include/uapi/sound/asequencer.h
> index 09c8a00..5a5fa49 100644
> --- a/include/uapi/sound/asequencer.h
> +++ b/include/uapi/sound/asequencer.h
> @@ -22,6 +22,7 @@
>  #ifndef _UAPI__SOUND_ASEQUENCER_H
>  #define _UAPI__SOUND_ASEQUENCER_H
>  
> +#include <sound/asound.h>
>  
>  /** version of the sequencer */
>  #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION (1, 0, 1)
> -- 
> 2.1.4
> 

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

* Re: [PATCH 40/45] include/uapi/sound/emu10k1.h: include sound/asound.h
  2015-02-16 23:05 ` [PATCH 40/45] include/uapi/sound/emu10k1.h: " Mikko Rapeli
@ 2015-02-17  6:46   ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-02-17  6:46 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

At Tue, 17 Feb 2015 00:05:43 +0100,
Mikko Rapeli wrote:
> 
> Fixes userspace compilation errors like:
> error: field ‘id’ has incomplete type
> struct snd_ctl_elem_id id;  /* full control ID definition */
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

Applied for 3.21, thanks.


Takashi

> ---
>  include/uapi/sound/emu10k1.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/include/uapi/sound/emu10k1.h b/include/uapi/sound/emu10k1.h
> index d1bbaf7..ec1535b 100644
> --- a/include/uapi/sound/emu10k1.h
> +++ b/include/uapi/sound/emu10k1.h
> @@ -23,8 +23,7 @@
>  #define _UAPI__SOUND_EMU10K1_H
>  
>  #include <linux/types.h>
> -
> -
> +#include <sound/asound.h>
>  
>  /*
>   * ---- FX8010 ----
> -- 
> 2.1.4
> 

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

* Re: [PATCH 01/45] Makefile: propagate verbose options
  2015-02-16 23:05 ` [PATCH 01/45] Makefile: propagate verbose options Mikko Rapeli
@ 2015-02-17  7:18   ` Masahiro Yamada
  2015-03-10 22:36     ` Mikko Rapeli
  0 siblings, 1 reply; 143+ messages in thread
From: Masahiro Yamada @ 2015-02-17  7:18 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, Michal Marek, linux-kbuild

Hi Mikko,

On Tue, 17 Feb 2015 00:05:04 +0100
Mikko Rapeli <mikko.rapeli@iki.fi> wrote:

> Usefull when debugging the make scripts.
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
>  Makefile | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 4e93284..c1b515d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -912,13 +912,13 @@ quiet_cmd_link-vmlinux = LINK    $@
>  # execute if the rest of the kernel build went well.
>  vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
>  ifdef CONFIG_HEADERS_CHECK
> -	$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
> +	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) -f $(srctree)/Makefile headers_check
>  endif
>  ifdef CONFIG_SAMPLES
> -	$(Q)$(MAKE) $(build)=samples
> +	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) $(build)=samples
>  endif
>  ifdef CONFIG_BUILD_DOCSRC
> -	$(Q)$(MAKE) $(build)=Documentation
> +	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) $(build)=Documentation
>  endif
>  	+$(call if_changed,link-vmlinux)
>  
> @@ -1069,7 +1069,7 @@ headers_check_all: headers_install_all
>  PHONY += headers_check
>  headers_check: headers_install
>  	$(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1
> -	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
> +	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
>  
>  # ---------------------------------------------------------------------------
>  # Kernel selftest



If you give V=... from the command line, it is automatically propagated
to its sub-makes.

I think this patch has no point.


Best Regards
Masahiro Yamada


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

* Re: [PATCH 02/45] scripts/headers.sh: add verbose option to make calls if defined
  2015-02-16 23:05 ` [PATCH 02/45] scripts/headers.sh: add verbose option to make calls if defined Mikko Rapeli
@ 2015-02-17  7:18   ` Masahiro Yamada
  2015-03-10 22:37     ` Mikko Rapeli
  0 siblings, 1 reply; 143+ messages in thread
From: Masahiro Yamada @ 2015-02-17  7:18 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel


On Tue, 17 Feb 2015 00:05:05 +0100
Mikko Rapeli <mikko.rapeli@iki.fi> wrote:

> Useful when debugging the scripts.
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
>  scripts/headers.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/headers.sh b/scripts/headers.sh
> index 95ece06..aa62fd8 100755
> --- a/scripts/headers.sh
> +++ b/scripts/headers.sh
> @@ -7,7 +7,7 @@ set -e
>  do_command()
>  {
>  	if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
> -		make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
> +		make V=$KBUILD_VERBOSE ARCH=$2 KBUILD_HEADERS=$1 headers_$1
>  	else
>  		printf "Ignoring arch: %s\n" ${arch}
>  	fi
> -- 


KBUILD_VERBOSE is already exported.

Why do you need to set V=... again here?


Best Regards
Masahiro Yamada


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

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
@ 2015-02-17  9:08     ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-02-17  9:08 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-kernel, Alasdair Kergon, Mike Snitzer, dm-devel, linux-api

On Tuesday 17 February 2015 00:05:18 Mikko Rapeli wrote:
> --- a/include/uapi/linux/dm-log-userspace.h
> +++ b/include/uapi/linux/dm-log-userspace.h
> @@ -7,6 +7,11 @@
>  #ifndef __DM_LOG_USERSPACE_H__
>  #define __DM_LOG_USERSPACE_H__
>  
> +#ifdef __KERNEL__
> +#include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif
>  #include <linux/dm-ioctl.h> /* For DM_UUID_LEN */
> 

The normal way to do this in kernel headers is to use linux/types.h
but change the data structures to use __u64 instead of uint64_t
to avoid the build error.

It's possible that the maintainers of this code have a strong opinion
on this matter, but try doing that first.

	Arnd

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

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
@ 2015-02-17  9:08     ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-02-17  9:08 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Alasdair Kergon,
	Mike Snitzer, dm-devel-H+wXaHxf7aLQT0dZR+AlfA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Tuesday 17 February 2015 00:05:18 Mikko Rapeli wrote:
> --- a/include/uapi/linux/dm-log-userspace.h
> +++ b/include/uapi/linux/dm-log-userspace.h
> @@ -7,6 +7,11 @@
>  #ifndef __DM_LOG_USERSPACE_H__
>  #define __DM_LOG_USERSPACE_H__
>  
> +#ifdef __KERNEL__
> +#include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif
>  #include <linux/dm-ioctl.h> /* For DM_UUID_LEN */
> 

The normal way to do this in kernel headers is to use linux/types.h
but change the data structures to use __u64 instead of uint64_t
to avoid the build error.

It's possible that the maintainers of this code have a strong opinion
on this matter, but try doing that first.

	Arnd

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

* Re: [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h
  2015-02-16 23:05 ` [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h Mikko Rapeli
@ 2015-02-17  9:10   ` Arnd Bergmann
  2015-03-11  1:59     ` Mikko Rapeli
  0 siblings, 1 reply; 143+ messages in thread
From: Arnd Bergmann @ 2015-02-17  9:10 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, linux-arch, linux-api

On Tuesday 17 February 2015 00:05:48 Mikko Rapeli wrote:
>  #ifndef __ASM_GENERIC_UCONTEXT_H
>  #define __ASM_GENERIC_UCONTEXT_H
>  
> +#include <asm-generic/signal.h>
> +#include <asm/sigcontext.h>
> +
>  struct ucontext {
> 

Including another asm-generic header here is a bad idea: it breaks
if an architecture overrides asm/signal.h with its own version
but wants to use the asm-generic/ucontext.h file.

It would be best to just use linux/signal.h here, which includes
the correct architecture specific files.

	Arnd

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

* Re: [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace
@ 2015-02-17  9:14     ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-02-17  9:14 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, linux-api

On Tuesday 17 February 2015 00:05:40 Mikko Rapeli wrote:
> This libc header has sockaddr definition for userspace.
> Fixes compilation errors like:
> error: field ‘ifru_addr’ has incomplete type
> struct sockaddr ifru_addr;
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
>  include/uapi/linux/socket.h | 4 ++++
>  1 file changed, 4 insertions(+)

This looks wrong: where do you see a use of ifru_addr
in uapi/linux/socket.h?

	Arnd

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

* Re: [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace
@ 2015-02-17  9:14     ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-02-17  9:14 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-api-u79uwXL29TY76Z2rM5mHXA

On Tuesday 17 February 2015 00:05:40 Mikko Rapeli wrote:
> This libc header has sockaddr definition for userspace.
> Fixes compilation errors like:
> error: field ‘ifru_addr’ has incomplete type
> struct sockaddr ifru_addr;
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> ---
>  include/uapi/linux/socket.h | 4 ++++
>  1 file changed, 4 insertions(+)

This looks wrong: where do you see a use of ifru_addr
in uapi/linux/socket.h?

	Arnd

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

* Re: [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition in userspace
@ 2015-02-17  9:16     ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-02-17  9:16 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, linux-arch, linux-api

On Tuesday 17 February 2015 00:05:37 Mikko Rapeli wrote:
> +#ifdef __KERNEL__
> +/* already defined in userspace via stdlib.h */
>  typedef struct {
>         unsigned long sig[_NSIG_WORDS];
>  } sigset_t;
> +#endif /* __KERNEL__ */

I'm not sure here: Is this structure always identical to the one
we see in user space?

If not, we might want to rename the typedef to __kernel_sigset_t
instead and use that inside of the uapi headers.

	Arnd

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

* Re: [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition in userspace
@ 2015-02-17  9:16     ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-02-17  9:16 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arch-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Tuesday 17 February 2015 00:05:37 Mikko Rapeli wrote:
> +#ifdef __KERNEL__
> +/* already defined in userspace via stdlib.h */
>  typedef struct {
>         unsigned long sig[_NSIG_WORDS];
>  } sigset_t;
> +#endif /* __KERNEL__ */

I'm not sure here: Is this structure always identical to the one
we see in user space?

If not, we might want to rename the typedef to __kernel_sigset_t
instead and use that inside of the uapi headers.

	Arnd

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

* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
@ 2015-02-17  9:44     ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-02-17  9:44 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, linux-arch, linux-api

On Tuesday 17 February 2015 00:05:36 Mikko Rapeli wrote:
> Fixes compiler warning:
> error: unknown type name ‘size_t’
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
>  include/uapi/asm-generic/signal.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
> index 9df61f1..8a341a2 100644
> --- a/include/uapi/asm-generic/signal.h
> +++ b/include/uapi/asm-generic/signal.h
> @@ -3,6 +3,10 @@
>  
>  #include <linux/types.h>
>  
> +#ifndef __KERNEL__
> +#include <stdlib.h>
> +#endif
> +

Hmm, maybe we should use __kernel_size_t instead?

	Arnd

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

* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
@ 2015-02-17  9:44     ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-02-17  9:44 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arch-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Tuesday 17 February 2015 00:05:36 Mikko Rapeli wrote:
> Fixes compiler warning:
> error: unknown type name ‘size_t’
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> ---
>  include/uapi/asm-generic/signal.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
> index 9df61f1..8a341a2 100644
> --- a/include/uapi/asm-generic/signal.h
> +++ b/include/uapi/asm-generic/signal.h
> @@ -3,6 +3,10 @@
>  
>  #include <linux/types.h>
>  
> +#ifndef __KERNEL__
> +#include <stdlib.h>
> +#endif
> +

Hmm, maybe we should use __kernel_size_t instead?

	Arnd

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

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-17 13:11     ` Neil Horman
  0 siblings, 0 replies; 143+ messages in thread
From: Neil Horman @ 2015-02-17 13:11 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, Vlad Yasevich, linux-sctp, linux-api

On Tue, Feb 17, 2015 at 12:05:23AM +0100, Mikko Rapeli wrote:
> Fixes compilation error:
> 
> linux/sctp.h:652:2: error: unknown type name ‘uint32_t’
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Neil Horman <nhorman@tuxdriver.com>

> ---
>  include/uapi/linux/sctp.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
> index ce70fe6..9fd31cf 100644
> --- a/include/uapi/linux/sctp.h
> +++ b/include/uapi/linux/sctp.h
> @@ -53,7 +53,11 @@
>  #ifndef _UAPI_SCTP_H
>  #define _UAPI_SCTP_H
>  
> +#ifdef __KERNEL__
>  #include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif
>  #include <linux/socket.h>
>  
>  typedef __s32 sctp_assoc_t;
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-17 13:11     ` Neil Horman
  0 siblings, 0 replies; 143+ messages in thread
From: Neil Horman @ 2015-02-17 13:11 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Vlad Yasevich,
	linux-sctp-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Tue, Feb 17, 2015 at 12:05:23AM +0100, Mikko Rapeli wrote:
> Fixes compilation error:
> 
> linux/sctp.h:652:2: error: unknown type name ‘uint32_t’
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Acked-by: Neil Horman <nhorman@tuxdriver.com>

> ---
>  include/uapi/linux/sctp.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
> index ce70fe6..9fd31cf 100644
> --- a/include/uapi/linux/sctp.h
> +++ b/include/uapi/linux/sctp.h
> @@ -53,7 +53,11 @@
>  #ifndef _UAPI_SCTP_H
>  #define _UAPI_SCTP_H
>  
> +#ifdef __KERNEL__
>  #include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif
>  #include <linux/socket.h>
>  
>  typedef __s32 sctp_assoc_t;
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-17 13:11     ` Neil Horman
  0 siblings, 0 replies; 143+ messages in thread
From: Neil Horman @ 2015-02-17 13:11 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Vlad Yasevich,
	linux-sctp-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Tue, Feb 17, 2015 at 12:05:23AM +0100, Mikko Rapeli wrote:
> Fixes compilation error:
> 
> linux/sctp.h:652:2: error: unknown type name ‘uint32_t’
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
Acked-by: Neil Horman <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>

> ---
>  include/uapi/linux/sctp.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
> index ce70fe6..9fd31cf 100644
> --- a/include/uapi/linux/sctp.h
> +++ b/include/uapi/linux/sctp.h
> @@ -53,7 +53,11 @@
>  #ifndef _UAPI_SCTP_H
>  #define _UAPI_SCTP_H
>  
> +#ifdef __KERNEL__
>  #include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif
>  #include <linux/socket.h>
>  
>  typedef __s32 sctp_assoc_t;
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH 03/45] headers_install.sh: enhance error handling
  2015-02-16 23:05 ` [PATCH 03/45] headers_install.sh: enhance error handling Mikko Rapeli
@ 2015-02-17 13:17   ` Michal Marek
  2015-03-10 22:44     ` Mikko Rapeli
  0 siblings, 1 reply; 143+ messages in thread
From: Michal Marek @ 2015-02-17 13:17 UTC (permalink / raw)
  To: Mikko Rapeli, linux-kernel; +Cc: Andrew Morton, Javier Barrio

On 2015-02-17 00:05, Mikko Rapeli wrote:
> Exit with error if using undefined variables or if any sub command fails
> with error return value. unidef needs special handling since but this can
> be done without the trap. Enables exaniming intermediate files if some
> commands failed.

The intermediate files are removed by your patch as well, aren't they?
Actually, I don't see any change in behavior after your patch.


> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
>  scripts/headers_install.sh | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
> index fdebd66..072f7d3 100755
> --- a/scripts/headers_install.sh
> +++ b/scripts/headers_install.sh
> @@ -1,4 +1,7 @@
>  #!/bin/sh
> +set -e
> +set -u
> +#set -x

The commented-out statement should be removed.

Michal

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

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
  2015-02-17  9:08     ` Arnd Bergmann
  (?)
@ 2015-02-17 13:38     ` Alasdair G Kergon
  2015-02-17 13:55         ` Arnd Bergmann
  -1 siblings, 1 reply; 143+ messages in thread
From: Alasdair G Kergon @ 2015-02-17 13:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mikko Rapeli, linux-kernel, Alasdair Kergon, Mike Snitzer,
	dm-devel, linux-api

On Tue, Feb 17, 2015 at 10:08:56AM +0100, Arnd Bergmann wrote:
> The normal way to do this in kernel headers is to use linux/types.h
> but change the data structures to use __u64 instead of uint64_t
> to avoid the build error.
 
That's what happened to dm-ioctl.h.
(Or someone could adjust linux/types.h to include these as standard.)

Alasdair


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

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
@ 2015-02-17 13:55         ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-02-17 13:55 UTC (permalink / raw)
  To: Alasdair G Kergon
  Cc: Mikko Rapeli, linux-kernel, Mike Snitzer, dm-devel, linux-api

On Tuesday 17 February 2015 13:38:06 Alasdair G Kergon wrote:
> On Tue, Feb 17, 2015 at 10:08:56AM +0100, Arnd Bergmann wrote:
> > The normal way to do this in kernel headers is to use linux/types.h
> > but change the data structures to use __u64 instead of uint64_t
> > to avoid the build error.
>  
> That's what happened to dm-ioctl.h.

Ah, indeed. It turns out that it was my own change that did this:


commit 9adfbfb611307060db54691bc7e6d53fdc12312b
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Thu Feb 26 00:51:40 2009 +0100

    make most exported headers use strict integer types
    
    This takes care of all files that have only a small number
    of non-strict integer type uses.

> (Or someone could adjust linux/types.h to include these as standard.)

No, that wouldn't work. The C user space headers are not meant to
be included implicitly by any standard headers, which might pull
in linux/types.h implicitly.

I think it would be best to change all patches in the new series
in the same way for consistency and try to avoid using stdint.h
as much as we can.

	Arnd

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

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
@ 2015-02-17 13:55         ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-02-17 13:55 UTC (permalink / raw)
  To: Alasdair G Kergon
  Cc: Mikko Rapeli, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Mike Snitzer,
	dm-devel-H+wXaHxf7aLQT0dZR+AlfA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Tuesday 17 February 2015 13:38:06 Alasdair G Kergon wrote:
> On Tue, Feb 17, 2015 at 10:08:56AM +0100, Arnd Bergmann wrote:
> > The normal way to do this in kernel headers is to use linux/types.h
> > but change the data structures to use __u64 instead of uint64_t
> > to avoid the build error.
>  
> That's what happened to dm-ioctl.h.

Ah, indeed. It turns out that it was my own change that did this:


commit 9adfbfb611307060db54691bc7e6d53fdc12312b
Author: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Date:   Thu Feb 26 00:51:40 2009 +0100

    make most exported headers use strict integer types
    
    This takes care of all files that have only a small number
    of non-strict integer type uses.

> (Or someone could adjust linux/types.h to include these as standard.)

No, that wouldn't work. The C user space headers are not meant to
be included implicitly by any standard headers, which might pull
in linux/types.h implicitly.

I think it would be best to change all patches in the new series
in the same way for consistency and try to avoid using stdint.h
as much as we can.

	Arnd

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

* Re: [Xen-devel] [PATCH 25/45] gntalloc.h: include stdint.h in userspace
@ 2015-02-18 11:53     ` David Vrabel
  0 siblings, 0 replies; 143+ messages in thread
From: David Vrabel @ 2015-02-18 11:53 UTC (permalink / raw)
  To: Mikko Rapeli, linux-kernel
  Cc: David Vrabel, linux-api, xen-devel, Boris Ostrovsky

On 16/02/15 23:05, Mikko Rapeli wrote:
> Fixes compilation error:
> 
> xen/gntalloc.h:22:2: error: unknown type name ‘uint16_t’
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
>  include/uapi/xen/gntalloc.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/uapi/xen/gntalloc.h b/include/uapi/xen/gntalloc.h
> index 76bd580..184df7e 100644
> --- a/include/uapi/xen/gntalloc.h
> +++ b/include/uapi/xen/gntalloc.h
> @@ -11,6 +11,12 @@
>  #ifndef __LINUX_PUBLIC_GNTALLOC_H__
>  #define __LINUX_PUBLIC_GNTALLOC_H__
>  
> +#ifdef __KERNEL__
> +#include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif

I think it would be preferrable to #include <linux/types.h> only and
switch to using the __u32 etc. types (as others have suggested).

David

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

* Re: [Xen-devel] [PATCH 25/45] gntalloc.h: include stdint.h in userspace
@ 2015-02-18 11:53     ` David Vrabel
  0 siblings, 0 replies; 143+ messages in thread
From: David Vrabel @ 2015-02-18 11:53 UTC (permalink / raw)
  To: Mikko Rapeli, linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: David Vrabel, linux-api-u79uwXL29TY76Z2rM5mHXA,
	xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, Boris Ostrovsky

On 16/02/15 23:05, Mikko Rapeli wrote:
> Fixes compilation error:
> 
> xen/gntalloc.h:22:2: error: unknown type name ‘uint16_t’
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> ---
>  include/uapi/xen/gntalloc.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/uapi/xen/gntalloc.h b/include/uapi/xen/gntalloc.h
> index 76bd580..184df7e 100644
> --- a/include/uapi/xen/gntalloc.h
> +++ b/include/uapi/xen/gntalloc.h
> @@ -11,6 +11,12 @@
>  #ifndef __LINUX_PUBLIC_GNTALLOC_H__
>  #define __LINUX_PUBLIC_GNTALLOC_H__
>  
> +#ifdef __KERNEL__
> +#include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif

I think it would be preferrable to #include <linux/types.h> only and
switch to using the __u32 etc. types (as others have suggested).

David

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

* Re: [PATCH 25/45] gntalloc.h: include stdint.h in userspace
  2015-02-16 23:05 ` [PATCH 25/45] gntalloc.h: " Mikko Rapeli
@ 2015-02-18 11:53   ` David Vrabel
  2015-02-18 11:53     ` David Vrabel
  1 sibling, 0 replies; 143+ messages in thread
From: David Vrabel @ 2015-02-18 11:53 UTC (permalink / raw)
  To: Mikko Rapeli, linux-kernel
  Cc: linux-api, Boris Ostrovsky, David Vrabel, xen-devel

On 16/02/15 23:05, Mikko Rapeli wrote:
> Fixes compilation error:
> 
> xen/gntalloc.h:22:2: error: unknown type name ‘uint16_t’
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
>  include/uapi/xen/gntalloc.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/uapi/xen/gntalloc.h b/include/uapi/xen/gntalloc.h
> index 76bd580..184df7e 100644
> --- a/include/uapi/xen/gntalloc.h
> +++ b/include/uapi/xen/gntalloc.h
> @@ -11,6 +11,12 @@
>  #ifndef __LINUX_PUBLIC_GNTALLOC_H__
>  #define __LINUX_PUBLIC_GNTALLOC_H__
>  
> +#ifdef __KERNEL__
> +#include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif

I think it would be preferrable to #include <linux/types.h> only and
switch to using the __u32 etc. types (as others have suggested).

David

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-18 15:48     ` Daniel Borkmann
  0 siblings, 0 replies; 143+ messages in thread
From: Daniel Borkmann @ 2015-02-18 15:48 UTC (permalink / raw)
  To: Mikko Rapeli, linux-kernel
  Cc: Vlad Yasevich, Neil Horman, linux-sctp, linux-api

On 02/17/2015 12:05 AM, Mikko Rapeli wrote:
> Fixes compilation error:
>
> linux/sctp.h:652:2: error: unknown type name ‘uint32_t’
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

I have no idea where the rest of this series went (neither netdev, nor
lkml, nor linux-sctp) and what user space application making use of the
header you are trying to fix !?

> ---
>   include/uapi/linux/sctp.h | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
> index ce70fe6..9fd31cf 100644
> --- a/include/uapi/linux/sctp.h
> +++ b/include/uapi/linux/sctp.h
> @@ -53,7 +53,11 @@
>   #ifndef _UAPI_SCTP_H
>   #define _UAPI_SCTP_H
>
> +#ifdef __KERNEL__
>   #include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif
>   #include <linux/socket.h>

Looks ugly, but could also be resolved in user space.

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

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-18 15:48     ` Daniel Borkmann
  0 siblings, 0 replies; 143+ messages in thread
From: Daniel Borkmann @ 2015-02-18 15:48 UTC (permalink / raw)
  To: Mikko Rapeli, linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Vlad Yasevich, Neil Horman, linux-sctp-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On 02/17/2015 12:05 AM, Mikko Rapeli wrote:
> Fixes compilation error:
>
> linux/sctp.h:652:2: error: unknown type name ‘uint32_t’
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>

I have no idea where the rest of this series went (neither netdev, nor
lkml, nor linux-sctp) and what user space application making use of the
header you are trying to fix !?

> ---
>   include/uapi/linux/sctp.h | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
> index ce70fe6..9fd31cf 100644
> --- a/include/uapi/linux/sctp.h
> +++ b/include/uapi/linux/sctp.h
> @@ -53,7 +53,11 @@
>   #ifndef _UAPI_SCTP_H
>   #define _UAPI_SCTP_H
>
> +#ifdef __KERNEL__
>   #include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif
>   #include <linux/socket.h>

Looks ugly, but could also be resolved in user space.

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

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-18 15:48     ` Daniel Borkmann
  0 siblings, 0 replies; 143+ messages in thread
From: Daniel Borkmann @ 2015-02-18 15:48 UTC (permalink / raw)
  To: Mikko Rapeli, linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Vlad Yasevich, Neil Horman, linux-sctp-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On 02/17/2015 12:05 AM, Mikko Rapeli wrote:
> Fixes compilation error:
>
> linux/sctp.h:652:2: error: unknown type name ‘uint32_t’
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>

I have no idea where the rest of this series went (neither netdev, nor
lkml, nor linux-sctp) and what user space application making use of the
header you are trying to fix !?

> ---
>   include/uapi/linux/sctp.h | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
> index ce70fe6..9fd31cf 100644
> --- a/include/uapi/linux/sctp.h
> +++ b/include/uapi/linux/sctp.h
> @@ -53,7 +53,11 @@
>   #ifndef _UAPI_SCTP_H
>   #define _UAPI_SCTP_H
>
> +#ifdef __KERNEL__
>   #include <linux/types.h>
> +#else
> +#include <stdint.h>
> +#endif
>   #include <linux/socket.h>

Looks ugly, but could also be resolved in user space.

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

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-18 16:05       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-18 16:05 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: linux-kernel, Vlad Yasevich, Neil Horman, linux-sctp, linux-api

On Wed, Feb 18, 2015 at 04:48:04PM +0100, Daniel Borkmann wrote:
> On 02/17/2015 12:05 AM, Mikko Rapeli wrote:
> >Fixes compilation error:
> >
> >linux/sctp.h:652:2: error: unknown type name ‘uint32_t’
> >
> >Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> 
> I have no idea where the rest of this series went (neither netdev, nor
> lkml, nor linux-sctp) and what user space application making use of the
> header you are trying to fix !?

There is a test written to test compilation of exported kernel headers
one by one in userspace. lkml thread is here:

https://lkml.org/lkml/2015/2/16/521

The series should have gone to the right addresses with:

$ git send-email --to linux-kernel@vger.kernel.org \
	--cc-cmd "scripts/get_maintainer.pl --norolestats"

-Mikko

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

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-18 16:05       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-18 16:05 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Vlad Yasevich, Neil Horman,
	linux-sctp-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Wed, Feb 18, 2015 at 04:48:04PM +0100, Daniel Borkmann wrote:
> On 02/17/2015 12:05 AM, Mikko Rapeli wrote:
> >Fixes compilation error:
> >
> >linux/sctp.h:652:2: error: unknown type name ‘uint32_t’
> >
> >Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> 
> I have no idea where the rest of this series went (neither netdev, nor
> lkml, nor linux-sctp) and what user space application making use of the
> header you are trying to fix !?

There is a test written to test compilation of exported kernel headers
one by one in userspace. lkml thread is here:

https://lkml.org/lkml/2015/2/16/521

The series should have gone to the right addresses with:

$ git send-email --to linux-kernel@vger.kernel.org \
	--cc-cmd "scripts/get_maintainer.pl --norolestats"

-Mikko

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

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
@ 2015-02-18 16:05       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-18 16:05 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Vlad Yasevich, Neil Horman,
	linux-sctp-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Wed, Feb 18, 2015 at 04:48:04PM +0100, Daniel Borkmann wrote:
> On 02/17/2015 12:05 AM, Mikko Rapeli wrote:
> >Fixes compilation error:
> >
> >linux/sctp.h:652:2: error: unknown type name ‘uint32_t’
> >
> >Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> 
> I have no idea where the rest of this series went (neither netdev, nor
> lkml, nor linux-sctp) and what user space application making use of the
> header you are trying to fix !?

There is a test written to test compilation of exported kernel headers
one by one in userspace. lkml thread is here:

https://lkml.org/lkml/2015/2/16/521

The series should have gone to the right addresses with:

$ git send-email --to linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
	--cc-cmd "scripts/get_maintainer.pl --norolestats"

-Mikko

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

* Re: [PATCH RFC v02 00/45] Compile test and fixes for exported header files
  2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
                   ` (46 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h Mikko Rapeli
@ 2015-02-18 16:16 ` Mikko Rapeli
  47 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-18 16:16 UTC (permalink / raw)
  To: linux-kernel
  Cc: Masahiro Yamada, Michal Marek, Mike Snitzer, Arnd Bergmann,
	Alasdair G Kergon, Neil Horman, Daniel Borkmann, David Vrabel,
	Jan Engelhardt

Thanks for all the reviews!

I'm going through the review feedback and will try to address all findings
and find correct ways to fix things but this will take some time from my
side.

-Mikko

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

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
@ 2015-02-23 10:26     ` Emil Velikov
  0 siblings, 0 replies; 143+ messages in thread
From: Emil Velikov @ 2015-02-23 10:26 UTC (permalink / raw)
  To: Mikko Rapeli, linux-kernel; +Cc: emil.l.velikov, dri-devel, linux-api

On 16/02/15 23:05, Mikko Rapeli wrote:
> Fixes <drm/drm.h> compilation error:
> 
> drm/drm.h:132:2: error: unknown type name ‘size_t’
> 
Hi Mikko,

Can you let us know how you're getting these (series-wise) errors ? I've
been meaning to sync the uapi/drm and libdrm headers and would be nice
to have an extra step to test things.

Thanks
Emil

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

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
@ 2015-02-23 10:26     ` Emil Velikov
  0 siblings, 0 replies; 143+ messages in thread
From: Emil Velikov @ 2015-02-23 10:26 UTC (permalink / raw)
  To: Mikko Rapeli, linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On 16/02/15 23:05, Mikko Rapeli wrote:
> Fixes <drm/drm.h> compilation error:
> 
> drm/drm.h:132:2: error: unknown type name ‘size_t’
> 
Hi Mikko,

Can you let us know how you're getting these (series-wise) errors ? I've
been meaning to sync the uapi/drm and libdrm headers and would be nice
to have an extra step to test things.

Thanks
Emil

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

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
@ 2015-02-23 10:35       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-23 10:35 UTC (permalink / raw)
  To: Emil Velikov; +Cc: linux-kernel, dri-devel, linux-api

On Mon, Feb 23, 2015 at 10:26:58AM +0000, Emil Velikov wrote:
> On 16/02/15 23:05, Mikko Rapeli wrote:
> > Fixes <drm/drm.h> compilation error:
> > 
> > drm/drm.h:132:2: error: unknown type name ‘size_t’
> > 
> Hi Mikko,
> 
> Can you let us know how you're getting these (series-wise) errors ? I've
> been meaning to sync the uapi/drm and libdrm headers and would be nice
> to have an extra step to test things.

This should have everything needed to reproduce these compile errors,
though some of the errors hide behind other errors and fixes:

https://lkml.org/lkml/2015/2/16/525

-Mikko

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

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
@ 2015-02-23 10:35       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-02-23 10:35 UTC (permalink / raw)
  To: Emil Velikov
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Mon, Feb 23, 2015 at 10:26:58AM +0000, Emil Velikov wrote:
> On 16/02/15 23:05, Mikko Rapeli wrote:
> > Fixes <drm/drm.h> compilation error:
> > 
> > drm/drm.h:132:2: error: unknown type name ‘size_t’
> > 
> Hi Mikko,
> 
> Can you let us know how you're getting these (series-wise) errors ? I've
> been meaning to sync the uapi/drm and libdrm headers and would be nice
> to have an extra step to test things.

This should have everything needed to reproduce these compile errors,
though some of the errors hide behind other errors and fixes:

https://lkml.org/lkml/2015/2/16/525

-Mikko

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

* Re: [PATCH 01/45] Makefile: propagate verbose options
  2015-02-17  7:18   ` Masahiro Yamada
@ 2015-03-10 22:36     ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-10 22:36 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: linux-kernel, Michal Marek, linux-kbuild

On Tue, Feb 17, 2015 at 04:18:12PM +0900, Masahiro Yamada wrote:
> Hi Mikko,
> 
> On Tue, 17 Feb 2015 00:05:04 +0100
> Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> 
> > Usefull when debugging the make scripts.
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > ---
> >  Makefile | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Makefile b/Makefile
> > index 4e93284..c1b515d 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -912,13 +912,13 @@ quiet_cmd_link-vmlinux = LINK    $@
> >  # execute if the rest of the kernel build went well.
> >  vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
> >  ifdef CONFIG_HEADERS_CHECK
> > -	$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
> > +	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) -f $(srctree)/Makefile headers_check
> >  endif
> >  ifdef CONFIG_SAMPLES
> > -	$(Q)$(MAKE) $(build)=samples
> > +	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) $(build)=samples
> >  endif
> >  ifdef CONFIG_BUILD_DOCSRC
> > -	$(Q)$(MAKE) $(build)=Documentation
> > +	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) $(build)=Documentation
> >  endif
> >  	+$(call if_changed,link-vmlinux)
> >  
> > @@ -1069,7 +1069,7 @@ headers_check_all: headers_install_all
> >  PHONY += headers_check
> >  headers_check: headers_install
> >  	$(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1
> > -	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
> > +	$(Q)$(MAKE) V=$(KBUILD_VERBOSE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
> >  
> >  # ---------------------------------------------------------------------------
> >  # Kernel selftest
> 
> 
> 
> If you give V=... from the command line, it is automatically propagated
> to its sub-makes.
> 
> I think this patch has no point.

You are right, I'll drop this patch.

-Mikko

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

* Re: [PATCH 02/45] scripts/headers.sh: add verbose option to make calls if defined
  2015-02-17  7:18   ` Masahiro Yamada
@ 2015-03-10 22:37     ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-10 22:37 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: linux-kernel

On Tue, Feb 17, 2015 at 04:18:59PM +0900, Masahiro Yamada wrote:
> 
> On Tue, 17 Feb 2015 00:05:05 +0100
> Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> 
> > Useful when debugging the scripts.
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > ---
> >  scripts/headers.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/headers.sh b/scripts/headers.sh
> > index 95ece06..aa62fd8 100755
> > --- a/scripts/headers.sh
> > +++ b/scripts/headers.sh
> > @@ -7,7 +7,7 @@ set -e
> >  do_command()
> >  {
> >  	if [ -f ${srctree}/arch/$2/include/asm/Kbuild ]; then
> > -		make ARCH=$2 KBUILD_HEADERS=$1 headers_$1
> > +		make V=$KBUILD_VERBOSE ARCH=$2 KBUILD_HEADERS=$1 headers_$1
> >  	else
> >  		printf "Ignoring arch: %s\n" ${arch}
> >  	fi
> > -- 
> 
> 
> KBUILD_VERBOSE is already exported.
> 
> Why do you need to set V=... again here?

You're right, I'll drop this too. Thanks for the review!

-Mikko

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

* Re: [PATCH 03/45] headers_install.sh: enhance error handling
  2015-02-17 13:17   ` Michal Marek
@ 2015-03-10 22:44     ` Mikko Rapeli
  2015-03-11 10:16       ` Michal Marek
  0 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-10 22:44 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kernel, Andrew Morton, Javier Barrio

On Tue, Feb 17, 2015 at 02:17:51PM +0100, Michal Marek wrote:
> On 2015-02-17 00:05, Mikko Rapeli wrote:
> > Exit with error if using undefined variables or if any sub command fails
> > with error return value. unidef needs special handling since but this can
> > be done without the trap. Enables exaniming intermediate files if some
> > commands failed.
> 
> The intermediate files are removed by your patch as well, aren't they?
> Actually, I don't see any change in behavior after your patch.

Yes, if everything succeeded without errors, then intermediate files
are removed. But the files are left around if something fails which is
what I like in scripts.

-Mikko

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

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
  2015-02-17 13:55         ` Arnd Bergmann
@ 2015-03-10 22:48           ` Mikko Rapeli
  -1 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-10 22:48 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Alasdair G Kergon, linux-kernel, Mike Snitzer, dm-devel, linux-api

On Tue, Feb 17, 2015 at 02:55:49PM +0100, Arnd Bergmann wrote:
> On Tuesday 17 February 2015 13:38:06 Alasdair G Kergon wrote:
> > On Tue, Feb 17, 2015 at 10:08:56AM +0100, Arnd Bergmann wrote:
> > > The normal way to do this in kernel headers is to use linux/types.h
> > > but change the data structures to use __u64 instead of uint64_t
> > > to avoid the build error.
> >  
> > That's what happened to dm-ioctl.h.
> 
> Ah, indeed. It turns out that it was my own change that did this:
> 
> 
> commit 9adfbfb611307060db54691bc7e6d53fdc12312b
> Author: Arnd Bergmann <arnd@arndb.de>
> Date:   Thu Feb 26 00:51:40 2009 +0100
> 
>     make most exported headers use strict integer types
>     
>     This takes care of all files that have only a small number
>     of non-strict integer type uses.
> 
> > (Or someone could adjust linux/types.h to include these as standard.)
> 
> No, that wouldn't work. The C user space headers are not meant to
> be included implicitly by any standard headers, which might pull
> in linux/types.h implicitly.
> 
> I think it would be best to change all patches in the new series
> in the same way for consistency and try to avoid using stdint.h
> as much as we can.

Ok, I'll change all patches to use __u8 etc types instead of uint8_t etc via
stdint.h.

-Mikko

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

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
@ 2015-03-10 22:48           ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-10 22:48 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Alasdair G Kergon, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Mike Snitzer, dm-devel-H+wXaHxf7aLQT0dZR+AlfA,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Tue, Feb 17, 2015 at 02:55:49PM +0100, Arnd Bergmann wrote:
> On Tuesday 17 February 2015 13:38:06 Alasdair G Kergon wrote:
> > On Tue, Feb 17, 2015 at 10:08:56AM +0100, Arnd Bergmann wrote:
> > > The normal way to do this in kernel headers is to use linux/types.h
> > > but change the data structures to use __u64 instead of uint64_t
> > > to avoid the build error.
> >  
> > That's what happened to dm-ioctl.h.
> 
> Ah, indeed. It turns out that it was my own change that did this:
> 
> 
> commit 9adfbfb611307060db54691bc7e6d53fdc12312b
> Author: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> Date:   Thu Feb 26 00:51:40 2009 +0100
> 
>     make most exported headers use strict integer types
>     
>     This takes care of all files that have only a small number
>     of non-strict integer type uses.
> 
> > (Or someone could adjust linux/types.h to include these as standard.)
> 
> No, that wouldn't work. The C user space headers are not meant to
> be included implicitly by any standard headers, which might pull
> in linux/types.h implicitly.
> 
> I think it would be best to change all patches in the new series
> in the same way for consistency and try to avoid using stdint.h
> as much as we can.

Ok, I'll change all patches to use __u8 etc types instead of uint8_t etc via
stdint.h.

-Mikko

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

* Re: [Xen-devel] [PATCH 25/45] gntalloc.h: include stdint.h in userspace
@ 2015-03-10 22:48       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-10 22:48 UTC (permalink / raw)
  To: David Vrabel; +Cc: linux-kernel, linux-api, xen-devel, Boris Ostrovsky

On Wed, Feb 18, 2015 at 11:53:22AM +0000, David Vrabel wrote:
> On 16/02/15 23:05, Mikko Rapeli wrote:
> > Fixes compilation error:
> > 
> > xen/gntalloc.h:22:2: error: unknown type name ‘uint16_t’
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > ---
> >  include/uapi/xen/gntalloc.h | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/include/uapi/xen/gntalloc.h b/include/uapi/xen/gntalloc.h
> > index 76bd580..184df7e 100644
> > --- a/include/uapi/xen/gntalloc.h
> > +++ b/include/uapi/xen/gntalloc.h
> > @@ -11,6 +11,12 @@
> >  #ifndef __LINUX_PUBLIC_GNTALLOC_H__
> >  #define __LINUX_PUBLIC_GNTALLOC_H__
> >  
> > +#ifdef __KERNEL__
> > +#include <linux/types.h>
> > +#else
> > +#include <stdint.h>
> > +#endif
> 
> I think it would be preferrable to #include <linux/types.h> only and
> switch to using the __u32 etc. types (as others have suggested).

Yes, I'm changes the patches to these.

-Mikko

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

* Re: [Xen-devel] [PATCH 25/45] gntalloc.h: include stdint.h in userspace
@ 2015-03-10 22:48       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-10 22:48 UTC (permalink / raw)
  To: David Vrabel
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA,
	xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b, Boris Ostrovsky

On Wed, Feb 18, 2015 at 11:53:22AM +0000, David Vrabel wrote:
> On 16/02/15 23:05, Mikko Rapeli wrote:
> > Fixes compilation error:
> > 
> > xen/gntalloc.h:22:2: error: unknown type name ‘uint16_t’
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> > ---
> >  include/uapi/xen/gntalloc.h | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/include/uapi/xen/gntalloc.h b/include/uapi/xen/gntalloc.h
> > index 76bd580..184df7e 100644
> > --- a/include/uapi/xen/gntalloc.h
> > +++ b/include/uapi/xen/gntalloc.h
> > @@ -11,6 +11,12 @@
> >  #ifndef __LINUX_PUBLIC_GNTALLOC_H__
> >  #define __LINUX_PUBLIC_GNTALLOC_H__
> >  
> > +#ifdef __KERNEL__
> > +#include <linux/types.h>
> > +#else
> > +#include <stdint.h>
> > +#endif
> 
> I think it would be preferrable to #include <linux/types.h> only and
> switch to using the __u32 etc. types (as others have suggested).

Yes, I'm changes the patches to these.

-Mikko

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

* Re: [PATCH 25/45] gntalloc.h: include stdint.h in userspace
  2015-02-18 11:53     ` David Vrabel
  (?)
@ 2015-03-10 22:48     ` Mikko Rapeli
  -1 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-10 22:48 UTC (permalink / raw)
  To: David Vrabel; +Cc: linux-api, Boris Ostrovsky, linux-kernel, xen-devel

On Wed, Feb 18, 2015 at 11:53:22AM +0000, David Vrabel wrote:
> On 16/02/15 23:05, Mikko Rapeli wrote:
> > Fixes compilation error:
> > 
> > xen/gntalloc.h:22:2: error: unknown type name ‘uint16_t’
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > ---
> >  include/uapi/xen/gntalloc.h | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/include/uapi/xen/gntalloc.h b/include/uapi/xen/gntalloc.h
> > index 76bd580..184df7e 100644
> > --- a/include/uapi/xen/gntalloc.h
> > +++ b/include/uapi/xen/gntalloc.h
> > @@ -11,6 +11,12 @@
> >  #ifndef __LINUX_PUBLIC_GNTALLOC_H__
> >  #define __LINUX_PUBLIC_GNTALLOC_H__
> >  
> > +#ifdef __KERNEL__
> > +#include <linux/types.h>
> > +#else
> > +#include <stdint.h>
> > +#endif
> 
> I think it would be preferrable to #include <linux/types.h> only and
> switch to using the __u32 etc. types (as others have suggested).

Yes, I'm changes the patches to these.

-Mikko

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
  2015-02-17  9:44     ` Arnd Bergmann
  (?)
@ 2015-03-10 22:58     ` Mikko Rapeli
  2015-03-11 10:02         ` Arnd Bergmann
  -1 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-10 22:58 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-kernel, linux-arch, linux-api

On Tue, Feb 17, 2015 at 10:44:48AM +0100, Arnd Bergmann wrote:
> On Tuesday 17 February 2015 00:05:36 Mikko Rapeli wrote:
> > Fixes compiler warning:
> > error: unknown type name ‘size_t’
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > ---
> >  include/uapi/asm-generic/signal.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
> > index 9df61f1..8a341a2 100644
> > --- a/include/uapi/asm-generic/signal.h
> > +++ b/include/uapi/asm-generic/signal.h
> > @@ -3,6 +3,10 @@
> >  
> >  #include <linux/types.h>
> >  
> > +#ifndef __KERNEL__
> > +#include <stdlib.h>
> > +#endif
> > +
> 
> Hmm, maybe we should use __kernel_size_t instead?

This problem is in several uapi header files on x86:

asm-generic/shmbuf.h
asm-generic/signal.h
asm/signal.h
drm/drm.h
linux/agpgart.h
linux/kexec.h
linux/ncp_fs.h
linux/nfc.h
linux/omapfb.h
linux/reiserfs_xattr.h
linux/sysctl.h
sound/asound.h

so I guess using __kernel_size_t is the correct approach for all of them,
right?

linux/kexec.h seems suspicious though:

#ifndef __KERNEL__
/*
 * This structure is used to hold the arguments that are used when
 * loading  kernel binaries.
 */
struct kexec_segment {
        const void *buf;
        size_t bufsz;
        const void *mem;
        size_t memsz;
};

#endif /* __KERNEL__ */

-Mikko


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

* Re: [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition in userspace
  2015-02-17  9:16     ` Arnd Bergmann
  (?)
@ 2015-03-11  0:05     ` Mikko Rapeli
  -1 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11  0:05 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-kernel, linux-arch, linux-api

On Tue, Feb 17, 2015 at 10:16:09AM +0100, Arnd Bergmann wrote:
> On Tuesday 17 February 2015 00:05:37 Mikko Rapeli wrote:
> > +#ifdef __KERNEL__
> > +/* already defined in userspace via stdlib.h */
> >  typedef struct {
> >         unsigned long sig[_NSIG_WORDS];
> >  } sigset_t;
> > +#endif /* __KERNEL__ */
> 
> I'm not sure here: Is this structure always identical to the one
> we see in user space?
> 
> If not, we might want to rename the typedef to __kernel_sigset_t
> instead and use that inside of the uapi headers.

I was copying this ifdef from the struct sigaction part in the same file:

#ifndef __KERNEL__
struct sigaction {
        __sighandler_t sa_handler;
        unsigned long sa_flags;
#ifdef SA_RESTORER
        __sigrestore_t sa_restorer;
#endif
        sigset_t sa_mask;               /* mask last for extensibility */
};
#endif

I assumed it had the same problems at some point.

-Mikko

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

* Re: [PATCH 24/45] hdspm.h: include stdint.h in userspace
  2015-02-17  6:46     ` Takashi Iwai
  (?)
@ 2015-03-11  0:28     ` Mikko Rapeli
  2015-03-11  6:09         ` Takashi Iwai
  -1 siblings, 1 reply; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11  0:28 UTC (permalink / raw)
  To: Takashi Iwai, Arnd Bergmann
  Cc: linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

On Tue, Feb 17, 2015 at 07:46:02AM +0100, Takashi Iwai wrote:
> At Tue, 17 Feb 2015 00:05:27 +0100,
> Mikko Rapeli wrote:
> > 
> > Fixes compilation error:
> > 
> > sound/hdspm.h:43:2: error: unknown type name ‘uint32_t’
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> 
> Applied for 3.21, thanks.

Sorry, but this should maybe be dropped or reverted from the sound tree.

Arnd and others pointed out that kernel headers should be using __u32 etc
types from linux/types.h instead of including stdint.h from libc and using
uint32_t et al.

I'll post a new patch version for hdspm.h too in the next revision.

-Mikko

> 
> Takashi
> 
> > ---
> >  include/uapi/sound/hdspm.h | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/include/uapi/sound/hdspm.h b/include/uapi/sound/hdspm.h
> > index d956c35..f799828 100644
> > --- a/include/uapi/sound/hdspm.h
> > +++ b/include/uapi/sound/hdspm.h
> > @@ -20,6 +20,12 @@
> >   *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
> >   */
> >  
> > +#ifdef __KERNEL__
> > +#include <linux/types.h>
> > +#else
> > +#include <stdint.h>
> > +#endif
> > +
> >  /* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */
> >  #define HDSPM_MAX_CHANNELS      64
> >  
> > -- 
> > 2.1.4
> > 

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

* Re: [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace
  2015-02-17  9:14     ` Arnd Bergmann
@ 2015-03-11  0:38       ` Mikko Rapeli
  -1 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11  0:38 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-kernel, linux-api

On Tue, Feb 17, 2015 at 10:14:10AM +0100, Arnd Bergmann wrote:
> On Tuesday 17 February 2015 00:05:40 Mikko Rapeli wrote:
> > This libc header has sockaddr definition for userspace.
> > Fixes compilation errors like:
> > error: field ‘ifru_addr’ has incomplete type
> > struct sockaddr ifru_addr;
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > ---
> >  include/uapi/linux/socket.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> 
> This looks wrong: where do you see a use of ifru_addr
> in uapi/linux/socket.h?

Indeed, this one seems completely wrong. Based on the test logs the
change should have gone to linux/if.h.

-Mikko

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

* Re: [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace
@ 2015-03-11  0:38       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11  0:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-api-u79uwXL29TY76Z2rM5mHXA

On Tue, Feb 17, 2015 at 10:14:10AM +0100, Arnd Bergmann wrote:
> On Tuesday 17 February 2015 00:05:40 Mikko Rapeli wrote:
> > This libc header has sockaddr definition for userspace.
> > Fixes compilation errors like:
> > error: field ‘ifru_addr’ has incomplete type
> > struct sockaddr ifru_addr;
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> > ---
> >  include/uapi/linux/socket.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> 
> This looks wrong: where do you see a use of ifru_addr
> in uapi/linux/socket.h?

Indeed, this one seems completely wrong. Based on the test logs the
change should have gone to linux/if.h.

-Mikko

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

* Re: [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace
@ 2015-03-11  0:59         ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11  0:59 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-kernel, linux-api

On Wed, Mar 11, 2015 at 02:38:15AM +0200, Mikko Rapeli wrote:
> On Tue, Feb 17, 2015 at 10:14:10AM +0100, Arnd Bergmann wrote:
> > On Tuesday 17 February 2015 00:05:40 Mikko Rapeli wrote:
> > > This libc header has sockaddr definition for userspace.
> > > Fixes compilation errors like:
> > > error: field ‘ifru_addr’ has incomplete type
> > > struct sockaddr ifru_addr;
> > > 
> > > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > > ---
> > >  include/uapi/linux/socket.h | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > 
> > This looks wrong: where do you see a use of ifru_addr
> > in uapi/linux/socket.h?
> 
> Indeed, this one seems completely wrong. Based on the test logs the
> change should have gone to linux/if.h.

Hmm, turns out this was not so straight forward. If I drop this I get 20
more errors from headers which include linux/socket.h and expect sockaddr
to be defined which is not true since it comes from sys/socket.h.

One way to fix this for all linux/socket.h users is to include sys/socket.h
already in linux/socket.h. After this I get rid of all compile test errors from
missing sockaddr definitions except cases where headers fail to include even
linux/socket.h.

Other option would be to include sys/socket.h in all headers using sockaddr.

I would prefer to include sys/socket.h already in linux/socket.h but I will
improve the commit message with this detail.

-Mikko

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

* Re: [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace
@ 2015-03-11  0:59         ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11  0:59 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-api-u79uwXL29TY76Z2rM5mHXA

On Wed, Mar 11, 2015 at 02:38:15AM +0200, Mikko Rapeli wrote:
> On Tue, Feb 17, 2015 at 10:14:10AM +0100, Arnd Bergmann wrote:
> > On Tuesday 17 February 2015 00:05:40 Mikko Rapeli wrote:
> > > This libc header has sockaddr definition for userspace.
> > > Fixes compilation errors like:
> > > error: field ‘ifru_addr’ has incomplete type
> > > struct sockaddr ifru_addr;
> > > 
> > > Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> > > ---
> > >  include/uapi/linux/socket.h | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > 
> > This looks wrong: where do you see a use of ifru_addr
> > in uapi/linux/socket.h?
> 
> Indeed, this one seems completely wrong. Based on the test logs the
> change should have gone to linux/if.h.

Hmm, turns out this was not so straight forward. If I drop this I get 20
more errors from headers which include linux/socket.h and expect sockaddr
to be defined which is not true since it comes from sys/socket.h.

One way to fix this for all linux/socket.h users is to include sys/socket.h
already in linux/socket.h. After this I get rid of all compile test errors from
missing sockaddr definitions except cases where headers fail to include even
linux/socket.h.

Other option would be to include sys/socket.h in all headers using sockaddr.

I would prefer to include sys/socket.h already in linux/socket.h but I will
improve the commit message with this detail.

-Mikko

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-03-11  1:22       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11  1:22 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

On Tue, Feb 17, 2015 at 07:27:38AM +0100, Takashi Iwai wrote:
> At Tue, 17 Feb 2015 00:05:44 +0100,
> Mikko Rapeli wrote:
> > 
> > The DECLARE_BITMAP macro is not available in userspace headers.
> > Fixes userspace compile error:
> > error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’
> 
> It's nonsense.  This results in an incompatible structure, thus ABI
> would be broken completely (actually this will break the compile of
> ld10k1).

None of the exported headers after 'make headers_install' have definition
of DECLARE_BITMAP macro. It is defined in include/linux/types.h which is
different from include/uapi/linux/types.h and missing this definition and
a few other things.

One option would be add DECLARE_BITMAP macro to include/uapi/linux/types.h
and add include/linux/bitops.h to uapi.

Thoughts?

-Mikko

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-03-11  1:22       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11  1:22 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Jaroslav Kysela,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Tue, Feb 17, 2015 at 07:27:38AM +0100, Takashi Iwai wrote:
> At Tue, 17 Feb 2015 00:05:44 +0100,
> Mikko Rapeli wrote:
> > 
> > The DECLARE_BITMAP macro is not available in userspace headers.
> > Fixes userspace compile error:
> > error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’
> 
> It's nonsense.  This results in an incompatible structure, thus ABI
> would be broken completely (actually this will break the compile of
> ld10k1).

None of the exported headers after 'make headers_install' have definition
of DECLARE_BITMAP macro. It is defined in include/linux/types.h which is
different from include/uapi/linux/types.h and missing this definition and
a few other things.

One option would be add DECLARE_BITMAP macro to include/uapi/linux/types.h
and add include/linux/bitops.h to uapi.

Thoughts?

-Mikko

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

* Re: [PATCH 43/45] include/uapi/linux/netfilter_bridge.h: include if.h
@ 2015-03-11  1:49       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11  1:49 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Linux Kernel Mailing List, Netfilter Developer Mailing List, linux-api

On Tue, Feb 17, 2015 at 01:02:50AM +0100, Jan Engelhardt wrote:
> On Tuesday 2015-02-17 00:05, Mikko Rapeli wrote:
> 
> >Fixes userspace compilation errors like:
> >
> >error: field ‘in’ has incomplete type
> >struct in_addr in;
> > 
> >+#include <linux/if.h>
> 
> Patch 36/45 included linux/in.h instead of linux/if.h for addressing "in has incomplete
> type". Should this be used here too?

It could, yes. It seems I cut some corners since this was hiding behind it:

In file included from ./linux/netfilter_bridge.h:11:0,
                 from ./linux/netfilter_bridge.c:1:
./linux/if_pppox.h:42:11: error: ‘IFNAMSIZ’ undeclared here (not in a function)
  char          dev[IFNAMSIZ];          /* Local device to use */

I'll fix these.

-Mikko

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

* Re: [PATCH 43/45] include/uapi/linux/netfilter_bridge.h: include if.h
@ 2015-03-11  1:49       ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11  1:49 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Linux Kernel Mailing List, Netfilter Developer Mailing List,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Tue, Feb 17, 2015 at 01:02:50AM +0100, Jan Engelhardt wrote:
> On Tuesday 2015-02-17 00:05, Mikko Rapeli wrote:
> 
> >Fixes userspace compilation errors like:
> >
> >error: field ‘in’ has incomplete type
> >struct in_addr in;
> > 
> >+#include <linux/if.h>
> 
> Patch 36/45 included linux/in.h instead of linux/if.h for addressing "in has incomplete
> type". Should this be used here too?

It could, yes. It seems I cut some corners since this was hiding behind it:

In file included from ./linux/netfilter_bridge.h:11:0,
                 from ./linux/netfilter_bridge.c:1:
./linux/if_pppox.h:42:11: error: ‘IFNAMSIZ’ undeclared here (not in a function)
  char          dev[IFNAMSIZ];          /* Local device to use */

I'll fix these.

-Mikko

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

* Re: [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h
  2015-02-17  9:10   ` Arnd Bergmann
@ 2015-03-11  1:59     ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11  1:59 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-kernel, linux-arch, linux-api

On Tue, Feb 17, 2015 at 10:10:42AM +0100, Arnd Bergmann wrote:
> On Tuesday 17 February 2015 00:05:48 Mikko Rapeli wrote:
> >  #ifndef __ASM_GENERIC_UCONTEXT_H
> >  #define __ASM_GENERIC_UCONTEXT_H
> >  
> > +#include <asm-generic/signal.h>
> > +#include <asm/sigcontext.h>
> > +
> >  struct ucontext {
> > 
> 
> Including another asm-generic header here is a bad idea: it breaks
> if an architecture overrides asm/signal.h with its own version
> but wants to use the asm-generic/ucontext.h file.
> 
> It would be best to just use linux/signal.h here, which includes
> the correct architecture specific files.

Thanks, I will use asm/signal.h instead.

-Mikko

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

* Re: [PATCH 24/45] hdspm.h: include stdint.h in userspace
@ 2015-03-11  6:09         ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-03-11  6:09 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: Arnd Bergmann, linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

At Wed, 11 Mar 2015 02:28:12 +0200,
Mikko Rapeli wrote:
> 
> On Tue, Feb 17, 2015 at 07:46:02AM +0100, Takashi Iwai wrote:
> > At Tue, 17 Feb 2015 00:05:27 +0100,
> > Mikko Rapeli wrote:
> > > 
> > > Fixes compilation error:
> > > 
> > > sound/hdspm.h:43:2: error: unknown type name ‘uint32_t’
> > > 
> > > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > 
> > Applied for 3.21, thanks.
> 
> Sorry, but this should maybe be dropped or reverted from the sound tree.
> 
> Arnd and others pointed out that kernel headers should be using __u32 etc
> types from linux/types.h instead of including stdint.h from libc and using
> uint32_t et al.
> 
> I'll post a new patch version for hdspm.h too in the next revision.

Then please post an incremental patch to for-next branch of sound git
tree (or the current linux-next tree).


Takashi

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

* Re: [PATCH 24/45] hdspm.h: include stdint.h in userspace
@ 2015-03-11  6:09         ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-03-11  6:09 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: Arnd Bergmann, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Jaroslav Kysela, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-api-u79uwXL29TY76Z2rM5mHXA

At Wed, 11 Mar 2015 02:28:12 +0200,
Mikko Rapeli wrote:
> 
> On Tue, Feb 17, 2015 at 07:46:02AM +0100, Takashi Iwai wrote:
> > At Tue, 17 Feb 2015 00:05:27 +0100,
> > Mikko Rapeli wrote:
> > > 
> > > Fixes compilation error:
> > > 
> > > sound/hdspm.h:43:2: error: unknown type name ‘uint32_t’
> > > 
> > > Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> > 
> > Applied for 3.21, thanks.
> 
> Sorry, but this should maybe be dropped or reverted from the sound tree.
> 
> Arnd and others pointed out that kernel headers should be using __u32 etc
> types from linux/types.h instead of including stdint.h from libc and using
> uint32_t et al.
> 
> I'll post a new patch version for hdspm.h too in the next revision.

Then please post an incremental patch to for-next branch of sound git
tree (or the current linux-next tree).


Takashi

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-03-11  6:11         ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-03-11  6:11 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

At Wed, 11 Mar 2015 03:22:04 +0200,
Mikko Rapeli wrote:
> 
> On Tue, Feb 17, 2015 at 07:27:38AM +0100, Takashi Iwai wrote:
> > At Tue, 17 Feb 2015 00:05:44 +0100,
> > Mikko Rapeli wrote:
> > > 
> > > The DECLARE_BITMAP macro is not available in userspace headers.
> > > Fixes userspace compile error:
> > > error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’
> > 
> > It's nonsense.  This results in an incompatible structure, thus ABI
> > would be broken completely (actually this will break the compile of
> > ld10k1).
> 
> None of the exported headers after 'make headers_install' have definition
> of DECLARE_BITMAP macro. It is defined in include/linux/types.h which is
> different from include/uapi/linux/types.h and missing this definition and
> a few other things.
> 
> One option would be add DECLARE_BITMAP macro to include/uapi/linux/types.h
> and add include/linux/bitops.h to uapi.
> 
> Thoughts?

Are there any other headers like that?  If this is the only one, leave
it as is.  The only program that reads this are some alsa-tools ones
and they have already own DECLARE_BITMAP() definition.  Adding the
extra definition here will even break the compilation out of sudden.


Takashi

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-03-11  6:11         ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-03-11  6:11 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Jaroslav Kysela,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-api-u79uwXL29TY76Z2rM5mHXA

At Wed, 11 Mar 2015 03:22:04 +0200,
Mikko Rapeli wrote:
> 
> On Tue, Feb 17, 2015 at 07:27:38AM +0100, Takashi Iwai wrote:
> > At Tue, 17 Feb 2015 00:05:44 +0100,
> > Mikko Rapeli wrote:
> > > 
> > > The DECLARE_BITMAP macro is not available in userspace headers.
> > > Fixes userspace compile error:
> > > error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’
> > 
> > It's nonsense.  This results in an incompatible structure, thus ABI
> > would be broken completely (actually this will break the compile of
> > ld10k1).
> 
> None of the exported headers after 'make headers_install' have definition
> of DECLARE_BITMAP macro. It is defined in include/linux/types.h which is
> different from include/uapi/linux/types.h and missing this definition and
> a few other things.
> 
> One option would be add DECLARE_BITMAP macro to include/uapi/linux/types.h
> and add include/linux/bitops.h to uapi.
> 
> Thoughts?

Are there any other headers like that?  If this is the only one, leave
it as is.  The only program that reads this are some alsa-tools ones
and they have already own DECLARE_BITMAP() definition.  Adding the
extra definition here will even break the compilation out of sudden.


Takashi

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-03-11  9:46           ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-03-11  9:46 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Mikko Rapeli, linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

On Wednesday 11 March 2015 07:11:18 Takashi Iwai wrote:
> At Wed, 11 Mar 2015 03:22:04 +0200,
> Mikko Rapeli wrote:
> > 
> > On Tue, Feb 17, 2015 at 07:27:38AM +0100, Takashi Iwai wrote:
> > > At Tue, 17 Feb 2015 00:05:44 +0100,
> > > Mikko Rapeli wrote:
> > > > 
> > > > The DECLARE_BITMAP macro is not available in userspace headers.
> > > > Fixes userspace compile error:
> > > > error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’
> > > 
> > > It's nonsense.  This results in an incompatible structure, thus ABI
> > > would be broken completely (actually this will break the compile of
> > > ld10k1).
> > 
> > None of the exported headers after 'make headers_install' have definition
> > of DECLARE_BITMAP macro. It is defined in include/linux/types.h which is
> > different from include/uapi/linux/types.h and missing this definition and
> > a few other things.
> > 
> > One option would be add DECLARE_BITMAP macro to include/uapi/linux/types.h
> > and add include/linux/bitops.h to uapi.
> > 
> > Thoughts?
> 
> Are there any other headers like that?  If this is the only one, leave
> it as is.  The only program that reads this are some alsa-tools ones
> and they have already own DECLARE_BITMAP() definition.  Adding the
> extra definition here will even break the compilation out of sudden.

I think it's a worthy goal to have the header files be compilable
standalone, but I don't think we should make the DECLARE_BITMAP()
macro globally visible in user space, in particular because it will
clash with every instance in which user space has a macro of the
same name.

What we could do here is to add a private copy of the macro to emu10k1.h
under a different name, such as __EMU10K1_DECLARE_BITMAP().

	Arnd

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-03-11  9:46           ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-03-11  9:46 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Mikko Rapeli, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Jaroslav Kysela, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Wednesday 11 March 2015 07:11:18 Takashi Iwai wrote:
> At Wed, 11 Mar 2015 03:22:04 +0200,
> Mikko Rapeli wrote:
> > 
> > On Tue, Feb 17, 2015 at 07:27:38AM +0100, Takashi Iwai wrote:
> > > At Tue, 17 Feb 2015 00:05:44 +0100,
> > > Mikko Rapeli wrote:
> > > > 
> > > > The DECLARE_BITMAP macro is not available in userspace headers.
> > > > Fixes userspace compile error:
> > > > error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’
> > > 
> > > It's nonsense.  This results in an incompatible structure, thus ABI
> > > would be broken completely (actually this will break the compile of
> > > ld10k1).
> > 
> > None of the exported headers after 'make headers_install' have definition
> > of DECLARE_BITMAP macro. It is defined in include/linux/types.h which is
> > different from include/uapi/linux/types.h and missing this definition and
> > a few other things.
> > 
> > One option would be add DECLARE_BITMAP macro to include/uapi/linux/types.h
> > and add include/linux/bitops.h to uapi.
> > 
> > Thoughts?
> 
> Are there any other headers like that?  If this is the only one, leave
> it as is.  The only program that reads this are some alsa-tools ones
> and they have already own DECLARE_BITMAP() definition.  Adding the
> extra definition here will even break the compilation out of sudden.

I think it's a worthy goal to have the header files be compilable
standalone, but I don't think we should make the DECLARE_BITMAP()
macro globally visible in user space, in particular because it will
clash with every instance in which user space has a macro of the
same name.

What we could do here is to add a private copy of the macro to emu10k1.h
under a different name, such as __EMU10K1_DECLARE_BITMAP().

	Arnd

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

* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
@ 2015-03-11 10:02         ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-03-11 10:02 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-kernel, linux-arch, linux-api, Geoff Levand, Paul Bolle

On Wednesday 11 March 2015 00:58:28 Mikko Rapeli wrote:
> linux/kexec.h seems suspicious though:
> 
> #ifndef __KERNEL__
> /*
>  * This structure is used to hold the arguments that are used when
>  * loading  kernel binaries.
>  */
> struct kexec_segment {
>         const void *buf;
>         size_t bufsz;
>         const void *mem;
>         size_t memsz;
> };
> 
> #endif /* __KERNEL__ */
> 

Hmm, maybe that just needs to be removed as well, after we
have removed the function declaration that used to follow it
as part of this commit:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9dc5c05f45ca8101025046cd

Using __kernel_size_t would work here as well, but I suspect that
the entire structure is useless as it is not used by kernel or
user space, and kexec_tools has its own copy of the structure.

	Arnd

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

* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
@ 2015-03-11 10:02         ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-03-11 10:02 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arch-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA, Geoff Levand, Paul Bolle

On Wednesday 11 March 2015 00:58:28 Mikko Rapeli wrote:
> linux/kexec.h seems suspicious though:
> 
> #ifndef __KERNEL__
> /*
>  * This structure is used to hold the arguments that are used when
>  * loading  kernel binaries.
>  */
> struct kexec_segment {
>         const void *buf;
>         size_t bufsz;
>         const void *mem;
>         size_t memsz;
> };
> 
> #endif /* __KERNEL__ */
> 

Hmm, maybe that just needs to be removed as well, after we
have removed the function declaration that used to follow it
as part of this commit:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9dc5c05f45ca8101025046cd

Using __kernel_size_t would work here as well, but I suspect that
the entire structure is useless as it is not used by kernel or
user space, and kexec_tools has its own copy of the structure.

	Arnd

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

* Re: [PATCH 03/45] headers_install.sh: enhance error handling
  2015-03-10 22:44     ` Mikko Rapeli
@ 2015-03-11 10:16       ` Michal Marek
  2015-03-11 10:24         ` Mikko Rapeli
  0 siblings, 1 reply; 143+ messages in thread
From: Michal Marek @ 2015-03-11 10:16 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: linux-kernel, Andrew Morton, Javier Barrio

On 2015-03-10 23:44, Mikko Rapeli wrote:
> On Tue, Feb 17, 2015 at 02:17:51PM +0100, Michal Marek wrote:
>> On 2015-02-17 00:05, Mikko Rapeli wrote:
>>> Exit with error if using undefined variables or if any sub command fails
>>> with error return value. unidef needs special handling since but this can
>>> be done without the trap. Enables exaniming intermediate files if some
>>> commands failed.
>>
>> The intermediate files are removed by your patch as well, aren't they?
>> Actually, I don't see any change in behavior after your patch.
> 
> Yes, if everything succeeded without errors, then intermediate files
> are removed. But the files are left around if something fails

They are not:

+		"$SRCDIR/$i" > "$OUTDIR/$FILE.sed" || \
+		( rm -f "$OUTDIR/$FILE.sed" ; exit 1 )

This removes "$OUTDIR/$FILE.sed" if the sed command files. Just like the
trap command has been doing.

Michal

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

* Re: [PATCH 03/45] headers_install.sh: enhance error handling
  2015-03-11 10:16       ` Michal Marek
@ 2015-03-11 10:24         ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-11 10:24 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kernel, Andrew Morton, Javier Barrio

On Wed, Mar 11, 2015 at 11:16:11AM +0100, Michal Marek wrote:
> On 2015-03-10 23:44, Mikko Rapeli wrote:
> > On Tue, Feb 17, 2015 at 02:17:51PM +0100, Michal Marek wrote:
> >> On 2015-02-17 00:05, Mikko Rapeli wrote:
> >>> Exit with error if using undefined variables or if any sub command fails
> >>> with error return value. unidef needs special handling since but this can
> >>> be done without the trap. Enables exaniming intermediate files if some
> >>> commands failed.
> >>
> >> The intermediate files are removed by your patch as well, aren't they?
> >> Actually, I don't see any change in behavior after your patch.
> > 
> > Yes, if everything succeeded without errors, then intermediate files
> > are removed. But the files are left around if something fails
> 
> They are not:
> 
> +		"$SRCDIR/$i" > "$OUTDIR/$FILE.sed" || \
> +		( rm -f "$OUTDIR/$FILE.sed" ; exit 1 )
> 
> This removes "$OUTDIR/$FILE.sed" if the sed command files. Just like the
> trap command has been doing.

Heh, you're right. I might as well change this to leave the sed script
around if something failed.

-Mikko

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
  2015-03-11  9:46           ` Arnd Bergmann
@ 2015-03-12  6:11             ` Takashi Iwai
  -1 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-03-12  6:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mikko Rapeli, linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

At Wed, 11 Mar 2015 10:46:29 +0100,
Arnd Bergmann wrote:
> 
> On Wednesday 11 March 2015 07:11:18 Takashi Iwai wrote:
> > At Wed, 11 Mar 2015 03:22:04 +0200,
> > Mikko Rapeli wrote:
> > > 
> > > On Tue, Feb 17, 2015 at 07:27:38AM +0100, Takashi Iwai wrote:
> > > > At Tue, 17 Feb 2015 00:05:44 +0100,
> > > > Mikko Rapeli wrote:
> > > > > 
> > > > > The DECLARE_BITMAP macro is not available in userspace headers.
> > > > > Fixes userspace compile error:
> > > > > error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’
> > > > 
> > > > It's nonsense.  This results in an incompatible structure, thus ABI
> > > > would be broken completely (actually this will break the compile of
> > > > ld10k1).
> > > 
> > > None of the exported headers after 'make headers_install' have definition
> > > of DECLARE_BITMAP macro. It is defined in include/linux/types.h which is
> > > different from include/uapi/linux/types.h and missing this definition and
> > > a few other things.
> > > 
> > > One option would be add DECLARE_BITMAP macro to include/uapi/linux/types.h
> > > and add include/linux/bitops.h to uapi.
> > > 
> > > Thoughts?
> > 
> > Are there any other headers like that?  If this is the only one, leave
> > it as is.  The only program that reads this are some alsa-tools ones
> > and they have already own DECLARE_BITMAP() definition.  Adding the
> > extra definition here will even break the compilation out of sudden.
> 
> I think it's a worthy goal to have the header files be compilable
> standalone,

In general yes, but this case is very minor issue:
- the file in question is for a hardware device-specific data
  definition,
- there are only two programs read this file, both can be built
  properly,
- and the device and the programs are very old, modifying such need
  extra care.

> but I don't think we should make the DECLARE_BITMAP()
> macro globally visible in user space, in particular because it will
> clash with every instance in which user space has a macro of the
> same name.
> 
> What we could do here is to add a private copy of the macro to emu10k1.h
> under a different name, such as __EMU10K1_DECLARE_BITMAP().

Yes, it's a better option.


thanks,

Takashi

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-03-12  6:11             ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-03-12  6:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mikko Rapeli, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Jaroslav Kysela, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-api-u79uwXL29TY76Z2rM5mHXA

At Wed, 11 Mar 2015 10:46:29 +0100,
Arnd Bergmann wrote:
> 
> On Wednesday 11 March 2015 07:11:18 Takashi Iwai wrote:
> > At Wed, 11 Mar 2015 03:22:04 +0200,
> > Mikko Rapeli wrote:
> > > 
> > > On Tue, Feb 17, 2015 at 07:27:38AM +0100, Takashi Iwai wrote:
> > > > At Tue, 17 Feb 2015 00:05:44 +0100,
> > > > Mikko Rapeli wrote:
> > > > > 
> > > > > The DECLARE_BITMAP macro is not available in userspace headers.
> > > > > Fixes userspace compile error:
> > > > > error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’
> > > > 
> > > > It's nonsense.  This results in an incompatible structure, thus ABI
> > > > would be broken completely (actually this will break the compile of
> > > > ld10k1).
> > > 
> > > None of the exported headers after 'make headers_install' have definition
> > > of DECLARE_BITMAP macro. It is defined in include/linux/types.h which is
> > > different from include/uapi/linux/types.h and missing this definition and
> > > a few other things.
> > > 
> > > One option would be add DECLARE_BITMAP macro to include/uapi/linux/types.h
> > > and add include/linux/bitops.h to uapi.
> > > 
> > > Thoughts?
> > 
> > Are there any other headers like that?  If this is the only one, leave
> > it as is.  The only program that reads this are some alsa-tools ones
> > and they have already own DECLARE_BITMAP() definition.  Adding the
> > extra definition here will even break the compilation out of sudden.
> 
> I think it's a worthy goal to have the header files be compilable
> standalone,

In general yes, but this case is very minor issue:
- the file in question is for a hardware device-specific data
  definition,
- there are only two programs read this file, both can be built
  properly,
- and the device and the programs are very old, modifying such need
  extra care.

> but I don't think we should make the DECLARE_BITMAP()
> macro globally visible in user space, in particular because it will
> clash with every instance in which user space has a macro of the
> same name.
> 
> What we could do here is to add a private copy of the macro to emu10k1.h
> under a different name, such as __EMU10K1_DECLARE_BITMAP().

Yes, it's a better option.


thanks,

Takashi

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-03-12  8:45               ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-03-12  8:45 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Mikko Rapeli, linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

On Thursday 12 March 2015 07:11:48 Takashi Iwai wrote:
> At Wed, 11 Mar 2015 10:46:29 +0100,
> Arnd Bergmann wrote:
> > 
> > On Wednesday 11 March 2015 07:11:18 Takashi Iwai wrote:
> > > At Wed, 11 Mar 2015 03:22:04 +0200,
> > > 
> > > Are there any other headers like that?  If this is the only one, leave
> > > it as is.  The only program that reads this are some alsa-tools ones
> > > and they have already own DECLARE_BITMAP() definition.  Adding the
> > > extra definition here will even break the compilation out of sudden.
> > 
> > I think it's a worthy goal to have the header files be compilable
> > standalone,
> 
> In general yes, but this case is very minor issue:
> - the file in question is for a hardware device-specific data
>   definition,
> - there are only two programs read this file, both can be built
>   properly,
> - and the device and the programs are very old, modifying such need
>   extra care.

Right, we should only do it if the goal is to have all uapi headers
includable standalone. For a particular header file there is very
little benefit as you say, but it would be useful if we can automatically
test for regressions with new or modified headers.

	Arnd

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-03-12  8:45               ` Arnd Bergmann
  0 siblings, 0 replies; 143+ messages in thread
From: Arnd Bergmann @ 2015-03-12  8:45 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Mikko Rapeli, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Jaroslav Kysela, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Thursday 12 March 2015 07:11:48 Takashi Iwai wrote:
> At Wed, 11 Mar 2015 10:46:29 +0100,
> Arnd Bergmann wrote:
> > 
> > On Wednesday 11 March 2015 07:11:18 Takashi Iwai wrote:
> > > At Wed, 11 Mar 2015 03:22:04 +0200,
> > > 
> > > Are there any other headers like that?  If this is the only one, leave
> > > it as is.  The only program that reads this are some alsa-tools ones
> > > and they have already own DECLARE_BITMAP() definition.  Adding the
> > > extra definition here will even break the compilation out of sudden.
> > 
> > I think it's a worthy goal to have the header files be compilable
> > standalone,
> 
> In general yes, but this case is very minor issue:
> - the file in question is for a hardware device-specific data
>   definition,
> - there are only two programs read this file, both can be built
>   properly,
> - and the device and the programs are very old, modifying such need
>   extra care.

Right, we should only do it if the goal is to have all uapi headers
includable standalone. For a particular header file there is very
little benefit as you say, but it would be useful if we can automatically
test for regressions with new or modified headers.

	Arnd

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
  2015-03-12  8:45               ` Arnd Bergmann
@ 2015-03-12  9:05                 ` Takashi Iwai
  -1 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-03-12  9:05 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mikko Rapeli, linux-kernel, Jaroslav Kysela, alsa-devel, linux-api

At Thu, 12 Mar 2015 09:45:42 +0100,
Arnd Bergmann wrote:
> 
> On Thursday 12 March 2015 07:11:48 Takashi Iwai wrote:
> > At Wed, 11 Mar 2015 10:46:29 +0100,
> > Arnd Bergmann wrote:
> > > 
> > > On Wednesday 11 March 2015 07:11:18 Takashi Iwai wrote:
> > > > At Wed, 11 Mar 2015 03:22:04 +0200,
> > > > 
> > > > Are there any other headers like that?  If this is the only one, leave
> > > > it as is.  The only program that reads this are some alsa-tools ones
> > > > and they have already own DECLARE_BITMAP() definition.  Adding the
> > > > extra definition here will even break the compilation out of sudden.
> > > 
> > > I think it's a worthy goal to have the header files be compilable
> > > standalone,
> > 
> > In general yes, but this case is very minor issue:
> > - the file in question is for a hardware device-specific data
> >   definition,
> > - there are only two programs read this file, both can be built
> >   properly,
> > - and the device and the programs are very old, modifying such need
> >   extra care.
> 
> Right, we should only do it if the goal is to have all uapi headers
> includable standalone. For a particular header file there is very
> little benefit as you say, but it would be useful if we can automatically
> test for regressions with new or modified headers.

True.  Yet another option would be just move this file back from
include/uapi/sound to include/sound.  Basically no user-space programs
care about this file, as they have already a copy of old header fils
in the package.

But maybe defining __EMU10K1_DECLARE_BITMAP() would be the easiest
solution, I suppose.


thanks,

Takashi

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

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
@ 2015-03-12  9:05                 ` Takashi Iwai
  0 siblings, 0 replies; 143+ messages in thread
From: Takashi Iwai @ 2015-03-12  9:05 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mikko Rapeli, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	Jaroslav Kysela, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-api-u79uwXL29TY76Z2rM5mHXA

At Thu, 12 Mar 2015 09:45:42 +0100,
Arnd Bergmann wrote:
> 
> On Thursday 12 March 2015 07:11:48 Takashi Iwai wrote:
> > At Wed, 11 Mar 2015 10:46:29 +0100,
> > Arnd Bergmann wrote:
> > > 
> > > On Wednesday 11 March 2015 07:11:18 Takashi Iwai wrote:
> > > > At Wed, 11 Mar 2015 03:22:04 +0200,
> > > > 
> > > > Are there any other headers like that?  If this is the only one, leave
> > > > it as is.  The only program that reads this are some alsa-tools ones
> > > > and they have already own DECLARE_BITMAP() definition.  Adding the
> > > > extra definition here will even break the compilation out of sudden.
> > > 
> > > I think it's a worthy goal to have the header files be compilable
> > > standalone,
> > 
> > In general yes, but this case is very minor issue:
> > - the file in question is for a hardware device-specific data
> >   definition,
> > - there are only two programs read this file, both can be built
> >   properly,
> > - and the device and the programs are very old, modifying such need
> >   extra care.
> 
> Right, we should only do it if the goal is to have all uapi headers
> includable standalone. For a particular header file there is very
> little benefit as you say, but it would be useful if we can automatically
> test for regressions with new or modified headers.

True.  Yet another option would be just move this file back from
include/uapi/sound to include/sound.  Basically no user-space programs
care about this file, as they have already a copy of old header fils
in the package.

But maybe defining __EMU10K1_DECLARE_BITMAP() would be the easiest
solution, I suppose.


thanks,

Takashi

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

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
@ 2015-03-20 20:25         ` Emil Velikov
  0 siblings, 0 replies; 143+ messages in thread
From: Emil Velikov @ 2015-03-20 20:25 UTC (permalink / raw)
  To: Mikko Rapeli, David Howells, Daniel Vetter, Dave Airlie
  Cc: Linux-Kernel@Vger. Kernel. Org, ML dri-devel, linux-api

On 23 February 2015 at 10:35, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> On Mon, Feb 23, 2015 at 10:26:58AM +0000, Emil Velikov wrote:
>> On 16/02/15 23:05, Mikko Rapeli wrote:
>> > Fixes <drm/drm.h> compilation error:
>> >
>> > drm/drm.h:132:2: error: unknown type name ‘size_t’
>> >
>> Hi Mikko,
>>
>> Can you let us know how you're getting these (series-wise) errors ? I've
>> been meaning to sync the uapi/drm and libdrm headers and would be nice
>> to have an extra step to test things.
>
> This should have everything needed to reproduce these compile errors,
> though some of the errors hide behind other errors and fixes:
>
> https://lkml.org/lkml/2015/2/16/525
>
Thanks for the link Mikko.

Afaict the general consensus seems to be that one should avoid using
stdint's uint8_t, but stick to __u8 and friends. Did you had the
chance to roll out another series that does so ?

That aside I'm not 100% sure that doing the UAPI split, as is, was the
perfect solution. Afaik drm used to live as an out of tree userspace
library(libdrm). Not sure at which point the major restructuring took
part, but one is certain - libdrm remains the only authoritative
sources of the headers. It's possible that some buggy programs pull
the UAPI headers while linking against the library, but I'd say that
won't end up well in the long term. Additionally since the UAPI split
the `make update-headers' target used to sync libdrm's headers have
been broken leading people to copy misc. hunks and/or files. Leading
to greater chance of things going sour.

All that said, I will need to gather some opinions for drm developers
and maintainers if the idea of part revering 718dcedd7e8(UAPI:
(Scripted) Disintegrate include/drm) will be the way forward.

Thanks
Emil

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

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
@ 2015-03-20 20:25         ` Emil Velikov
  0 siblings, 0 replies; 143+ messages in thread
From: Emil Velikov @ 2015-03-20 20:25 UTC (permalink / raw)
  To: Mikko Rapeli, David Howells, Daniel Vetter, Dave Airlie
  Cc: Linux-Kernel@Vger. Kernel. Org, ML dri-devel,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On 23 February 2015 at 10:35, Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org> wrote:
> On Mon, Feb 23, 2015 at 10:26:58AM +0000, Emil Velikov wrote:
>> On 16/02/15 23:05, Mikko Rapeli wrote:
>> > Fixes <drm/drm.h> compilation error:
>> >
>> > drm/drm.h:132:2: error: unknown type name ‘size_t’
>> >
>> Hi Mikko,
>>
>> Can you let us know how you're getting these (series-wise) errors ? I've
>> been meaning to sync the uapi/drm and libdrm headers and would be nice
>> to have an extra step to test things.
>
> This should have everything needed to reproduce these compile errors,
> though some of the errors hide behind other errors and fixes:
>
> https://lkml.org/lkml/2015/2/16/525
>
Thanks for the link Mikko.

Afaict the general consensus seems to be that one should avoid using
stdint's uint8_t, but stick to __u8 and friends. Did you had the
chance to roll out another series that does so ?

That aside I'm not 100% sure that doing the UAPI split, as is, was the
perfect solution. Afaik drm used to live as an out of tree userspace
library(libdrm). Not sure at which point the major restructuring took
part, but one is certain - libdrm remains the only authoritative
sources of the headers. It's possible that some buggy programs pull
the UAPI headers while linking against the library, but I'd say that
won't end up well in the long term. Additionally since the UAPI split
the `make update-headers' target used to sync libdrm's headers have
been broken leading people to copy misc. hunks and/or files. Leading
to greater chance of things going sour.

All that said, I will need to gather some opinions for drm developers
and maintainers if the idea of part revering 718dcedd7e8(UAPI:
(Scripted) Disintegrate include/drm) will be the way forward.

Thanks
Emil

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

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
@ 2015-03-21 12:17           ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-21 12:17 UTC (permalink / raw)
  To: Emil Velikov
  Cc: David Howells, Daniel Vetter, Dave Airlie,
	Linux-Kernel@Vger. Kernel. Org, ML dri-devel, linux-api

On Fri, Mar 20, 2015 at 08:25:40PM +0000, Emil Velikov wrote:
> On 23 February 2015 at 10:35, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> > On Mon, Feb 23, 2015 at 10:26:58AM +0000, Emil Velikov wrote:
> >> On 16/02/15 23:05, Mikko Rapeli wrote:
> >> > Fixes <drm/drm.h> compilation error:
> >> >
> >> > drm/drm.h:132:2: error: unknown type name ‘size_t’
> >> >
> >> Hi Mikko,
> >>
> >> Can you let us know how you're getting these (series-wise) errors ? I've
> >> been meaning to sync the uapi/drm and libdrm headers and would be nice
> >> to have an extra step to test things.
> >
> > This should have everything needed to reproduce these compile errors,
> > though some of the errors hide behind other errors and fixes:
> >
> > https://lkml.org/lkml/2015/2/16/525
> >
> Thanks for the link Mikko.
> 
> Afaict the general consensus seems to be that one should avoid using
> stdint's uint8_t, but stick to __u8 and friends. Did you had the
> chance to roll out another series that does so ?

Yes, new series with these changes is on the way. I'm trying to follow up to
all other review comments as well and get down to 100% compiling uapi
headers; 35 failures to go...

> That aside I'm not 100% sure that doing the UAPI split, as is, was the
> perfect solution. Afaik drm used to live as an out of tree userspace
> library(libdrm). Not sure at which point the major restructuring took
> part, but one is certain - libdrm remains the only authoritative
> sources of the headers. It's possible that some buggy programs pull
> the UAPI headers while linking against the library, but I'd say that
> won't end up well in the long term. Additionally since the UAPI split
> the `make update-headers' target used to sync libdrm's headers have
> been broken leading people to copy misc. hunks and/or files. Leading
> to greater chance of things going sour.
>
> All that said, I will need to gather some opinions for drm developers
> and maintainers if the idea of part revering 718dcedd7e8(UAPI:
> (Scripted) Disintegrate include/drm) will be the way forward.

Ok, I'll follow what is available in Linus' tree (or -next, not shure which
one I should track for these changes).

-Mikko

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

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
@ 2015-03-21 12:17           ` Mikko Rapeli
  0 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-03-21 12:17 UTC (permalink / raw)
  To: Emil Velikov
  Cc: David Howells, Daniel Vetter, Dave Airlie,
	Linux-Kernel@Vger. Kernel. Org, ML dri-devel,
	linux-api-u79uwXL29TY76Z2rM5mHXA

On Fri, Mar 20, 2015 at 08:25:40PM +0000, Emil Velikov wrote:
> On 23 February 2015 at 10:35, Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org> wrote:
> > On Mon, Feb 23, 2015 at 10:26:58AM +0000, Emil Velikov wrote:
> >> On 16/02/15 23:05, Mikko Rapeli wrote:
> >> > Fixes <drm/drm.h> compilation error:
> >> >
> >> > drm/drm.h:132:2: error: unknown type name ‘size_t’
> >> >
> >> Hi Mikko,
> >>
> >> Can you let us know how you're getting these (series-wise) errors ? I've
> >> been meaning to sync the uapi/drm and libdrm headers and would be nice
> >> to have an extra step to test things.
> >
> > This should have everything needed to reproduce these compile errors,
> > though some of the errors hide behind other errors and fixes:
> >
> > https://lkml.org/lkml/2015/2/16/525
> >
> Thanks for the link Mikko.
> 
> Afaict the general consensus seems to be that one should avoid using
> stdint's uint8_t, but stick to __u8 and friends. Did you had the
> chance to roll out another series that does so ?

Yes, new series with these changes is on the way. I'm trying to follow up to
all other review comments as well and get down to 100% compiling uapi
headers; 35 failures to go...

> That aside I'm not 100% sure that doing the UAPI split, as is, was the
> perfect solution. Afaik drm used to live as an out of tree userspace
> library(libdrm). Not sure at which point the major restructuring took
> part, but one is certain - libdrm remains the only authoritative
> sources of the headers. It's possible that some buggy programs pull
> the UAPI headers while linking against the library, but I'd say that
> won't end up well in the long term. Additionally since the UAPI split
> the `make update-headers' target used to sync libdrm's headers have
> been broken leading people to copy misc. hunks and/or files. Leading
> to greater chance of things going sour.
>
> All that said, I will need to gather some opinions for drm developers
> and maintainers if the idea of part revering 718dcedd7e8(UAPI:
> (Scripted) Disintegrate include/drm) will be the way forward.

Ok, I'll follow what is available in Linus' tree (or -next, not shure which
one I should track for these changes).

-Mikko

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

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
  2015-03-21 12:17           ` Mikko Rapeli
@ 2015-04-09 16:00             ` Emil Velikov
  -1 siblings, 0 replies; 143+ messages in thread
From: Emil Velikov @ 2015-04-09 16:00 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: David Howells, Daniel Vetter, Dave Airlie,
	Linux-Kernel@Vger. Kernel. Org, ML dri-devel, linux-api

Hi Mikko

Pardon for the late response,

On 21 March 2015 at 12:17, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> On Fri, Mar 20, 2015 at 08:25:40PM +0000, Emil Velikov wrote:
>> On 23 February 2015 at 10:35, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
>> > On Mon, Feb 23, 2015 at 10:26:58AM +0000, Emil Velikov wrote:
>> >> On 16/02/15 23:05, Mikko Rapeli wrote:
>> >> > Fixes <drm/drm.h> compilation error:
>> >> >
>> >> > drm/drm.h:132:2: error: unknown type name ‘size_t’
>> >> >
>> >> Hi Mikko,
>> >>
>> >> Can you let us know how you're getting these (series-wise) errors ? I've
>> >> been meaning to sync the uapi/drm and libdrm headers and would be nice
>> >> to have an extra step to test things.
>> >
>> > This should have everything needed to reproduce these compile errors,
>> > though some of the errors hide behind other errors and fixes:
>> >
>> > https://lkml.org/lkml/2015/2/16/525
>> >
>> Thanks for the link Mikko.
>>
>> Afaict the general consensus seems to be that one should avoid using
>> stdint's uint8_t, but stick to __u8 and friends. Did you had the
>> chance to roll out another series that does so ?
>
> Yes, new series with these changes is on the way. I'm trying to follow up to
> all other review comments as well and get down to 100% compiling uapi
> headers; 35 failures to go...
>
Glad to hear that it's getting there. Might be a bit slower than
expected but we'll get there :-) Can you please Cc me on the next
iteration ?

>> That aside I'm not 100% sure that doing the UAPI split, as is, was the
>> perfect solution. Afaik drm used to live as an out of tree userspace
>> library(libdrm). Not sure at which point the major restructuring took
>> part, but one is certain - libdrm remains the only authoritative
>> sources of the headers. It's possible that some buggy programs pull
>> the UAPI headers while linking against the library, but I'd say that
>> won't end up well in the long term. Additionally since the UAPI split
>> the `make update-headers' target used to sync libdrm's headers have
>> been broken leading people to copy misc. hunks and/or files. Leading
>> to greater chance of things going sour.
>>
>> All that said, I will need to gather some opinions for drm developers
>> and maintainers if the idea of part revering 718dcedd7e8(UAPI:
>> (Scripted) Disintegrate include/drm) will be the way forward.
>
> Ok, I'll follow what is available in Linus' tree (or -next, not shure which
> one I should track for these changes).
>
After discussing (more like annoying) our DRM maintainer we got to the
conclusion that the headers will stay exposed to userspace. So any and
all of your work will be greatly appreciated.

Thanks
Emil

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

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
@ 2015-04-09 16:00             ` Emil Velikov
  0 siblings, 0 replies; 143+ messages in thread
From: Emil Velikov @ 2015-04-09 16:00 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: linux-api, Linux-Kernel@Vger. Kernel. Org, ML dri-devel, David Howells

Hi Mikko

Pardon for the late response,

On 21 March 2015 at 12:17, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> On Fri, Mar 20, 2015 at 08:25:40PM +0000, Emil Velikov wrote:
>> On 23 February 2015 at 10:35, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
>> > On Mon, Feb 23, 2015 at 10:26:58AM +0000, Emil Velikov wrote:
>> >> On 16/02/15 23:05, Mikko Rapeli wrote:
>> >> > Fixes <drm/drm.h> compilation error:
>> >> >
>> >> > drm/drm.h:132:2: error: unknown type name ‘size_t’
>> >> >
>> >> Hi Mikko,
>> >>
>> >> Can you let us know how you're getting these (series-wise) errors ? I've
>> >> been meaning to sync the uapi/drm and libdrm headers and would be nice
>> >> to have an extra step to test things.
>> >
>> > This should have everything needed to reproduce these compile errors,
>> > though some of the errors hide behind other errors and fixes:
>> >
>> > https://lkml.org/lkml/2015/2/16/525
>> >
>> Thanks for the link Mikko.
>>
>> Afaict the general consensus seems to be that one should avoid using
>> stdint's uint8_t, but stick to __u8 and friends. Did you had the
>> chance to roll out another series that does so ?
>
> Yes, new series with these changes is on the way. I'm trying to follow up to
> all other review comments as well and get down to 100% compiling uapi
> headers; 35 failures to go...
>
Glad to hear that it's getting there. Might be a bit slower than
expected but we'll get there :-) Can you please Cc me on the next
iteration ?

>> That aside I'm not 100% sure that doing the UAPI split, as is, was the
>> perfect solution. Afaik drm used to live as an out of tree userspace
>> library(libdrm). Not sure at which point the major restructuring took
>> part, but one is certain - libdrm remains the only authoritative
>> sources of the headers. It's possible that some buggy programs pull
>> the UAPI headers while linking against the library, but I'd say that
>> won't end up well in the long term. Additionally since the UAPI split
>> the `make update-headers' target used to sync libdrm's headers have
>> been broken leading people to copy misc. hunks and/or files. Leading
>> to greater chance of things going sour.
>>
>> All that said, I will need to gather some opinions for drm developers
>> and maintainers if the idea of part revering 718dcedd7e8(UAPI:
>> (Scripted) Disintegrate include/drm) will be the way forward.
>
> Ok, I'll follow what is available in Linus' tree (or -next, not shure which
> one I should track for these changes).
>
After discussing (more like annoying) our DRM maintainer we got to the
conclusion that the headers will stay exposed to userspace. So any and
all of your work will be greatly appreciated.

Thanks
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
  2015-04-09 16:00             ` Emil Velikov
  (?)
@ 2015-04-09 16:09             ` Mikko Rapeli
  -1 siblings, 0 replies; 143+ messages in thread
From: Mikko Rapeli @ 2015-04-09 16:09 UTC (permalink / raw)
  To: Emil Velikov
  Cc: David Howells, Daniel Vetter, Dave Airlie,
	Linux-Kernel@Vger. Kernel. Org, ML dri-devel, linux-api

On Thu, Apr 09, 2015 at 05:00:48PM +0100, Emil Velikov wrote:
> Hi Mikko
> 
> Pardon for the late response,
> 
> On 21 March 2015 at 12:17, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> > On Fri, Mar 20, 2015 at 08:25:40PM +0000, Emil Velikov wrote:
> >> On 23 February 2015 at 10:35, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> >> > On Mon, Feb 23, 2015 at 10:26:58AM +0000, Emil Velikov wrote:
> >> >> On 16/02/15 23:05, Mikko Rapeli wrote:
> >> >> > Fixes <drm/drm.h> compilation error:
> >> >> >
> >> >> > drm/drm.h:132:2: error: unknown type name ‘size_t’
> >> >> >
> >> >> Hi Mikko,
> >> >>
> >> >> Can you let us know how you're getting these (series-wise) errors ? I've
> >> >> been meaning to sync the uapi/drm and libdrm headers and would be nice
> >> >> to have an extra step to test things.
> >> >
> >> > This should have everything needed to reproduce these compile errors,
> >> > though some of the errors hide behind other errors and fixes:
> >> >
> >> > https://lkml.org/lkml/2015/2/16/525
> >> >
> >> Thanks for the link Mikko.
> >>
> >> Afaict the general consensus seems to be that one should avoid using
> >> stdint's uint8_t, but stick to __u8 and friends. Did you had the
> >> chance to roll out another series that does so ?
> >
> > Yes, new series with these changes is on the way. I'm trying to follow up to
> > all other review comments as well and get down to 100% compiling uapi
> > headers; 35 failures to go...
> >
> Glad to hear that it's getting there. Might be a bit slower than
> expected but we'll get there :-) Can you please Cc me on the next
> iteration ?

Yes will Cc you too, and sorry life is getting on the way of this work. Draft
version is visible at

https://github.com/torvalds/linux/compare/master...mcfrisk:headers_test_v03

-Mikko

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

end of thread, other threads:[~2015-04-09 16:09 UTC | newest]

Thread overview: 143+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-16 23:05 [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli
2015-02-16 23:05 ` [PATCH 01/45] Makefile: propagate verbose options Mikko Rapeli
2015-02-17  7:18   ` Masahiro Yamada
2015-03-10 22:36     ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 02/45] scripts/headers.sh: add verbose option to make calls if defined Mikko Rapeli
2015-02-17  7:18   ` Masahiro Yamada
2015-03-10 22:37     ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 03/45] headers_install.sh: enhance error handling Mikko Rapeli
2015-02-17 13:17   ` Michal Marek
2015-03-10 22:44     ` Mikko Rapeli
2015-03-11 10:16       ` Michal Marek
2015-03-11 10:24         ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 04/45] scripts/headers_compile_test.sh: compile test script for exported headers Mikko Rapeli
2015-02-16 23:05 ` [PATCH 05/45] drm.h: include stdlib.h in userspace Mikko Rapeli
2015-02-23 10:26   ` Emil Velikov
2015-02-23 10:26     ` Emil Velikov
2015-02-23 10:35     ` Mikko Rapeli
2015-02-23 10:35       ` Mikko Rapeli
2015-03-20 20:25       ` Emil Velikov
2015-03-20 20:25         ` Emil Velikov
2015-03-21 12:17         ` Mikko Rapeli
2015-03-21 12:17           ` Mikko Rapeli
2015-04-09 16:00           ` Emil Velikov
2015-04-09 16:00             ` Emil Velikov
2015-04-09 16:09             ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 06/45] drm_mode.h: include stdint.h and linux/types.h " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 07/45] exynos_drm.h: include stdint.h " Mikko Rapeli
2015-02-16 23:05   ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 08/45] nouveau_drm.h: " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 09/45] radeon_drm.h: " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 10/45] r128_drm.h: include drm/drm.h Mikko Rapeli
2015-02-16 23:05 ` [PATCH 11/45] via_drm.h: include linux/types.h instead of non-existing via_drmclient.h Mikko Rapeli
2015-02-16 23:05 ` [PATCH 12/45] via_drm.h: hide struct via_file_private in userspace Mikko Rapeli
2015-02-16 23:05 ` [PATCH 13/45] savage_drm.h: include <drm/drm.h> Mikko Rapeli
2015-02-16 23:05 ` [PATCH 14/45] sis_drm.h: hide sis_file_private in userspace Mikko Rapeli
2015-02-16 23:05 ` [PATCH 15/45] dm-log-userspace.h: include stdint.h " Mikko Rapeli
2015-02-16 23:32   ` Mike Snitzer
2015-02-16 23:48     ` Mikko Rapeli
2015-02-16 23:48       ` Mikko Rapeli
2015-02-17  9:08   ` Arnd Bergmann
2015-02-17  9:08     ` Arnd Bergmann
2015-02-17 13:38     ` Alasdair G Kergon
2015-02-17 13:55       ` Arnd Bergmann
2015-02-17 13:55         ` Arnd Bergmann
2015-03-10 22:48         ` Mikko Rapeli
2015-03-10 22:48           ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 16/45] hsi_char.h: " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 17/45] ebtables.h: " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 18/45] cld.h: " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 19/45] rds.h: " Mikko Rapeli
2015-02-16 23:05   ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 20/45] sctp.h: " Mikko Rapeli
2015-02-16 23:05   ` Mikko Rapeli
2015-02-16 23:05   ` Mikko Rapeli
2015-02-17 13:11   ` Neil Horman
2015-02-17 13:11     ` Neil Horman
2015-02-17 13:11     ` Neil Horman
2015-02-18 15:48   ` Daniel Borkmann
2015-02-18 15:48     ` Daniel Borkmann
2015-02-18 15:48     ` Daniel Borkmann
2015-02-18 16:05     ` Mikko Rapeli
2015-02-18 16:05       ` Mikko Rapeli
2015-02-18 16:05       ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 21/45] scsi_bsg_fc.h: " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 22/45] scsi_netlink.h: " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 23/45] scsi_netlink_fc.h: " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 24/45] hdspm.h: " Mikko Rapeli
2015-02-17  6:46   ` Takashi Iwai
2015-02-17  6:46     ` Takashi Iwai
2015-03-11  0:28     ` Mikko Rapeli
2015-03-11  6:09       ` Takashi Iwai
2015-03-11  6:09         ` Takashi Iwai
2015-02-16 23:05 ` [PATCH 25/45] gntalloc.h: " Mikko Rapeli
2015-02-18 11:53   ` David Vrabel
2015-02-18 11:53   ` [Xen-devel] " David Vrabel
2015-02-18 11:53     ` David Vrabel
2015-03-10 22:48     ` Mikko Rapeli
2015-03-10 22:48     ` [Xen-devel] " Mikko Rapeli
2015-03-10 22:48       ` Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 26/45] gntdev.h: " Mikko Rapeli
2015-02-16 23:05 ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 27/45] include/uapi/linux/sysctl.h: include stdlib.h " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 28/45] include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h Mikko Rapeli
2015-02-16 23:05 ` [PATCH 29/45] include/uapi/asm-generic/msgbuf.h: include asm/ipcbuf.h Mikko Rapeli
2015-02-16 23:05   ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 30/45] include/uapi/asm-generic/shmbuf.h: include fixes Mikko Rapeli
2015-02-16 23:05 ` [PATCH 31/45] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h Mikko Rapeli
2015-02-16 23:05 ` [PATCH 32/45] drm/i810_drm.h: include drm/drm.h Mikko Rapeli
2015-02-16 23:05 ` [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace Mikko Rapeli
2015-02-17  9:44   ` Arnd Bergmann
2015-02-17  9:44     ` Arnd Bergmann
2015-03-10 22:58     ` Mikko Rapeli
2015-03-11 10:02       ` Arnd Bergmann
2015-03-11 10:02         ` Arnd Bergmann
2015-02-16 23:05 ` [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition " Mikko Rapeli
2015-02-17  9:16   ` Arnd Bergmann
2015-02-17  9:16     ` Arnd Bergmann
2015-03-11  0:05     ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 35/45] include/uapi/sound/asound.h: include stdlib.h " Mikko Rapeli
2015-02-17  6:46   ` Takashi Iwai
2015-02-16 23:05 ` [PATCH 36/45] include/uapi/linux/netfilter.h: include in.h and in6.h Mikko Rapeli
2015-02-16 23:05 ` [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace Mikko Rapeli
2015-02-17  9:14   ` Arnd Bergmann
2015-02-17  9:14     ` Arnd Bergmann
2015-03-11  0:38     ` Mikko Rapeli
2015-03-11  0:38       ` Mikko Rapeli
2015-03-11  0:59       ` Mikko Rapeli
2015-03-11  0:59         ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 38/45] include/uapi/linux/agpgart.h: include stdlib.h " Mikko Rapeli
2015-02-16 23:05 ` [PATCH 39/45] include/uapi/sound/asequencer.h: include sound/asound.h Mikko Rapeli
2015-02-16 23:05   ` Mikko Rapeli
2015-02-17  6:46   ` Takashi Iwai
2015-02-16 23:05 ` [PATCH 40/45] include/uapi/sound/emu10k1.h: " Mikko Rapeli
2015-02-17  6:46   ` Takashi Iwai
2015-02-16 23:05 ` [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace Mikko Rapeli
2015-02-17  6:27   ` Takashi Iwai
2015-02-17  6:27     ` Takashi Iwai
2015-03-11  1:22     ` Mikko Rapeli
2015-03-11  1:22       ` Mikko Rapeli
2015-03-11  6:11       ` Takashi Iwai
2015-03-11  6:11         ` Takashi Iwai
2015-03-11  9:46         ` Arnd Bergmann
2015-03-11  9:46           ` Arnd Bergmann
2015-03-12  6:11           ` Takashi Iwai
2015-03-12  6:11             ` Takashi Iwai
2015-03-12  8:45             ` Arnd Bergmann
2015-03-12  8:45               ` Arnd Bergmann
2015-03-12  9:05               ` Takashi Iwai
2015-03-12  9:05                 ` Takashi Iwai
2015-02-16 23:05 ` [PATCH 42/45] include/uapi/linux/rds.h: include linux/socket.h and linux/types.h always Mikko Rapeli
2015-02-16 23:05   ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 43/45] include/uapi/linux/netfilter_bridge.h: include if.h Mikko Rapeli
2015-02-17  0:02   ` Jan Engelhardt
2015-02-17  0:02     ` Jan Engelhardt
2015-03-11  1:49     ` Mikko Rapeli
2015-03-11  1:49       ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 44/45] nf_conntrack_tuple_common.h: include linux/types.h and linux/netfilter.h Mikko Rapeli
2015-02-16 23:05   ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h Mikko Rapeli
2015-02-17  9:10   ` Arnd Bergmann
2015-03-11  1:59     ` Mikko Rapeli
2015-02-18 16:16 ` [PATCH RFC v02 00/45] Compile test and fixes for exported header files Mikko Rapeli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.