linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 05/45] drm.h: include stdlib.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
@ 2015-02-16 23:05 ` Mikko Rapeli
       [not found]   ` <1424127948-22484-6-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  2015-02-16 23:05 ` [PATCH 06/45] drm_mode.h: include stdint.h and linux/types.h " Mikko Rapeli
                   ` (35 subsequent siblings)
  36 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 06/45] drm_mode.h: include stdint.h and linux/types.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
  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 ` [PATCH 07/45] exynos_drm.h: include stdint.h " Mikko Rapeli
                   ` (34 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 07/45] exynos_drm.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
  2015-02-16 23:05 ` [PATCH 05/45] drm.h: include stdlib.h in userspace 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 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 08/45] nouveau_drm.h: " Mikko Rapeli
                   ` (33 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 08/45] nouveau_drm.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (2 preceding siblings ...)
  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 09/45] radeon_drm.h: " Mikko Rapeli
                   ` (32 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 09/45] radeon_drm.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (3 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
                   ` (31 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 10/45] r128_drm.h: include drm/drm.h
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (4 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
                   ` (30 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 11/45] via_drm.h: include linux/types.h instead of non-existing via_drmclient.h
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (5 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
                   ` (29 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 12/45] via_drm.h: hide struct via_file_private in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (6 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
                   ` (28 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 13/45] savage_drm.h: include <drm/drm.h>
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (7 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
                   ` (27 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 14/45] sis_drm.h: hide sis_file_private in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (8 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
                   ` (26 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (9 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
       [not found]   ` <1424127948-22484-16-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  2015-02-16 23:05 ` [PATCH 16/45] hsi_char.h: " Mikko Rapeli
                   ` (25 subsequent siblings)
  36 siblings, 2 replies; 83+ 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] 83+ messages in thread

* [PATCH 16/45] hsi_char.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (10 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
                   ` (24 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 17/45] ebtables.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (11 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
                   ` (23 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 18/45] cld.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (12 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 17/45] ebtables.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
       [not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
                   ` (22 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 19/45] rds.h: include stdint.h in userspace
       [not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-16 23:05   ` Mikko Rapeli
  2015-02-16 23:05   ` [PATCH 20/45] sctp.h: " Mikko Rapeli
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 20/45] sctp.h: include stdint.h in userspace
       [not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  2015-02-16 23:05   ` [PATCH 19/45] rds.h: " Mikko Rapeli
@ 2015-02-16 23:05   ` Mikko Rapeli
       [not found]     ` <1424127948-22484-21-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  2015-02-16 23:05   ` [PATCH 29/45] include/uapi/asm-generic/msgbuf.h: include asm/ipcbuf.h Mikko Rapeli
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 21/45] scsi_bsg_fc.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (14 preceding siblings ...)
       [not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 22/45] scsi_netlink.h: " Mikko Rapeli
                   ` (20 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 22/45] scsi_netlink.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (15 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 21/45] scsi_bsg_fc.h: include stdint.h in userspace Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
  2015-02-16 23:05 ` [PATCH 23/45] scsi_netlink_fc.h: " Mikko Rapeli
                   ` (19 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 23/45] scsi_netlink_fc.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (16 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
                   ` (18 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 24/45] hdspm.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (17 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
                   ` (17 subsequent siblings)
  36 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 25/45] gntalloc.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (18 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 24/45] hdspm.h: " Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
       [not found]   ` <1424127948-22484-26-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  2015-02-16 23:05 ` [PATCH 26/45] gntdev.h: " Mikko Rapeli
                   ` (16 subsequent siblings)
  36 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 26/45] gntdev.h: include stdint.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (19 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 27/45] include/uapi/linux/sysctl.h: include stdlib.h " Mikko Rapeli
                   ` (15 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 27/45] include/uapi/linux/sysctl.h: include stdlib.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (20 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 28/45] include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h Mikko Rapeli
                   ` (14 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 28/45] include/uapi/asm-generic/ipcbuf.h: include linux/posix_types.h
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (21 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 ` [PATCH 30/45] include/uapi/asm-generic/shmbuf.h: include fixes Mikko Rapeli
                   ` (13 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 29/45] include/uapi/asm-generic/msgbuf.h: include asm/ipcbuf.h
       [not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  2015-02-16 23:05   ` [PATCH 19/45] rds.h: " 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   ` [PATCH 39/45] include/uapi/sound/asequencer.h: include sound/asound.h Mikko Rapeli
  2015-02-16 23:05   ` [PATCH 42/45] include/uapi/linux/rds.h: include linux/socket.h and linux/types.h always Mikko Rapeli
  4 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 30/45] include/uapi/asm-generic/shmbuf.h: include fixes
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (22 preceding siblings ...)
  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 ` 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
                   ` (12 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 31/45] asm-generic/sembuf.h: include asm/posix_types.h and asm/ipcbuf.h
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (23 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
                   ` (11 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 32/45] drm/i810_drm.h: include drm/drm.h
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (24 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
                   ` (10 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (25 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
       [not found]   ` <1424127948-22484-34-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  2015-02-16 23:05 ` [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition " Mikko Rapeli
                   ` (9 subsequent siblings)
  36 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (26 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
       [not found]   ` <1424127948-22484-35-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  2015-02-16 23:05 ` [PATCH 35/45] include/uapi/sound/asound.h: include stdlib.h " Mikko Rapeli
                   ` (8 subsequent siblings)
  36 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 35/45] include/uapi/sound/asound.h: include stdlib.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (27 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
                   ` (7 subsequent siblings)
  36 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 36/45] include/uapi/linux/netfilter.h: include in.h and in6.h
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (28 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
                   ` (6 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (29 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
       [not found]   ` <1424127948-22484-38-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  2015-02-16 23:05 ` [PATCH 38/45] include/uapi/linux/agpgart.h: include stdlib.h " Mikko Rapeli
                   ` (5 subsequent siblings)
  36 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 38/45] include/uapi/linux/agpgart.h: include stdlib.h in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (30 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 ` [PATCH 40/45] include/uapi/sound/emu10k1.h: include sound/asound.h Mikko Rapeli
                   ` (4 subsequent siblings)
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 39/45] include/uapi/sound/asequencer.h: include sound/asound.h
       [not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
                     ` (2 preceding siblings ...)
  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-17  6:46     ` 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
  4 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 40/45] include/uapi/sound/emu10k1.h: include sound/asound.h
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (31 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 38/45] include/uapi/linux/agpgart.h: include stdlib.h " 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
                   ` (3 subsequent siblings)
  36 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (32 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 40/45] include/uapi/sound/emu10k1.h: include sound/asound.h Mikko Rapeli
@ 2015-02-16 23:05 ` Mikko Rapeli
       [not found]   ` <1424127948-22484-42-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  2015-02-16 23:05 ` [PATCH 43/45] include/uapi/linux/netfilter_bridge.h: include if.h Mikko Rapeli
                   ` (2 subsequent siblings)
  36 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 42/45] include/uapi/linux/rds.h: include linux/socket.h and linux/types.h always
       [not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
                     ` (3 preceding siblings ...)
  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
  4 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 43/45] include/uapi/linux/netfilter_bridge.h: include if.h
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (33 preceding siblings ...)
  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-16 23:05 ` Mikko Rapeli
  2015-02-17  0:02   ` Jan Engelhardt
  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 ` [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h Mikko Rapeli
  36 siblings, 1 reply; 83+ 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] 83+ messages in thread

* [PATCH 44/45] nf_conntrack_tuple_common.h: include linux/types.h and linux/netfilter.h
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (34 preceding siblings ...)
  2015-02-16 23:05 ` [PATCH 43/45] include/uapi/linux/netfilter_bridge.h: include if.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
  36 siblings, 0 replies; 83+ 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] 83+ messages in thread

* [PATCH 45/45] include/uapi/asm-generic/ucontext.h: include signal.h and sigcontext.h
       [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
                   ` (35 preceding siblings ...)
  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-17  9:10   ` Arnd Bergmann
  36 siblings, 1 reply; 83+ 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] 83+ 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
       [not found]     ` <20150216233254.GA23033-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
       [not found]   ` <1424127948-22484-16-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  1 sibling, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
       [not found]     ` <20150216233254.GA23033-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2015-02-16 23:48       ` Mikko Rapeli
  0 siblings, 0 replies; 83+ 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] 83+ 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
       [not found]     ` <alpine.LSU.2.11.1502170101520.32748-G+YmpvGGOO3H9RFtKMg/Ng@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
       [not found]   ` <1424127948-22484-42-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-17  6:27     ` Takashi Iwai
       [not found]       ` <s5h4mqlqch1.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ 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
  2015-03-11  0:28     ` Mikko Rapeli
  0 siblings, 1 reply; 83+ 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] 83+ 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; 83+ 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] 83+ messages in thread

* Re: [PATCH 39/45] include/uapi/sound/asequencer.h: include sound/asound.h
  2015-02-16 23:05   ` [PATCH 39/45] include/uapi/sound/asequencer.h: include sound/asound.h Mikko Rapeli
@ 2015-02-17  6:46     ` Takashi Iwai
  0 siblings, 0 replies; 83+ 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] 83+ 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: include sound/asound.h Mikko Rapeli
@ 2015-02-17  6:46   ` Takashi Iwai
  0 siblings, 0 replies; 83+ 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] 83+ messages in thread

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
       [not found]   ` <1424127948-22484-16-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-17  9:08     ` Arnd Bergmann
  2015-02-17 13:38       ` Alasdair G Kergon
  0 siblings, 1 reply; 83+ 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] 83+ 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; 83+ 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] 83+ messages in thread

* Re: [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace
       [not found]   ` <1424127948-22484-38-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-17  9:14     ` Arnd Bergmann
  2015-03-11  0:38       ` Mikko Rapeli
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 34/45] include/uapi/asm-generic/signal.h: hide sigset_t definition in userspace
       [not found]   ` <1424127948-22484-35-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-17  9:16     ` Arnd Bergmann
  2015-03-11  0:05       ` Mikko Rapeli
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
       [not found]   ` <1424127948-22484-34-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-17  9:44     ` Arnd Bergmann
  2015-03-10 22:58       ` Mikko Rapeli
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
       [not found]     ` <1424127948-22484-21-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-17 13:11       ` Neil Horman
  2015-02-18 15:48       ` Daniel Borkmann
  1 sibling, 0 replies; 83+ 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] 83+ 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
       [not found]         ` <20150217133806.GA5220-FDJ95KluN3Z0klwcnFlA1dvLeJWuRmrY@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 15/45] dm-log-userspace.h: include stdint.h in userspace
       [not found]         ` <20150217133806.GA5220-FDJ95KluN3Z0klwcnFlA1dvLeJWuRmrY@public.gmane.org>
@ 2015-02-17 13:55           ` Arnd Bergmann
  2015-03-10 22:48             ` Mikko Rapeli
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [Xen-devel] [PATCH 25/45] gntalloc.h: include stdint.h in userspace
       [not found]   ` <1424127948-22484-26-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-18 11:53     ` David Vrabel
       [not found]       ` <54E47D32.9040208-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
       [not found]     ` <1424127948-22484-21-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
  2015-02-17 13:11       ` Neil Horman
@ 2015-02-18 15:48       ` Daniel Borkmann
       [not found]         ` <54E4B434.3030302-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
  1 sibling, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 20/45] sctp.h: include stdint.h in userspace
       [not found]         ` <54E4B434.3030302-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
@ 2015-02-18 16:05           ` Mikko Rapeli
  0 siblings, 0 replies; 83+ 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] 83+ messages in thread

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
       [not found]   ` <1424127948-22484-6-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
@ 2015-02-23 10:26     ` Emil Velikov
       [not found]       ` <54EB0072.8020909-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
       [not found]       ` <54EB0072.8020909-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-02-23 10:35         ` Mikko Rapeli
       [not found]           ` <20150223103548.GT12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ 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
  0 siblings, 0 replies; 83+ 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] 83+ messages in thread

* Re: [Xen-devel] [PATCH 25/45] gntalloc.h: include stdint.h in userspace
       [not found]       ` <54E47D32.9040208-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
@ 2015-03-10 22:48         ` Mikko Rapeli
  0 siblings, 0 replies; 83+ 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] 83+ 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
       [not found]         ` <20150310225828.GZ12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ 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
  0 siblings, 0 replies; 83+ 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] 83+ 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
       [not found]       ` <20150311002812.GB12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ 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
       [not found]         ` <20150311003815.GC12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 37/45] include/uapi/linux/socket.h: include sys/socket.h in userspace
       [not found]         ` <20150311003815.GC12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
@ 2015-03-11  0:59           ` Mikko Rapeli
  0 siblings, 0 replies; 83+ 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] 83+ messages in thread

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
       [not found]       ` <s5h4mqlqch1.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
@ 2015-03-11  1:22         ` Mikko Rapeli
       [not found]           ` <20150311012204.GE12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 43/45] include/uapi/linux/netfilter_bridge.h: include if.h
       [not found]     ` <alpine.LSU.2.11.1502170101520.32748-G+YmpvGGOO3H9RFtKMg/Ng@public.gmane.org>
@ 2015-03-11  1:49       ` Mikko Rapeli
  0 siblings, 0 replies; 83+ 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] 83+ 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; 83+ 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] 83+ messages in thread

* Re: [PATCH 24/45] hdspm.h: include stdint.h in userspace
       [not found]       ` <20150311002812.GB12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
@ 2015-03-11  6:09         ` Takashi Iwai
  0 siblings, 0 replies; 83+ 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] 83+ messages in thread

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
       [not found]           ` <20150311012204.GE12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
@ 2015-03-11  6:11             ` Takashi Iwai
       [not found]               ` <s5h4mpsnjw9.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
       [not found]               ` <s5h4mpsnjw9.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
@ 2015-03-11  9:46                 ` Arnd Bergmann
  2015-03-12  6:11                   ` Takashi Iwai
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 33/45] include/uapi/asm-generic/signal.h: include stdlib.h in userspace
       [not found]         ` <20150310225828.GZ12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
@ 2015-03-11 10:02           ` Arnd Bergmann
  0 siblings, 0 replies; 83+ 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] 83+ 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
       [not found]                     ` <s5hr3sun3rv.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace
       [not found]                     ` <s5hr3sun3rv.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
@ 2015-03-12  8:45                       ` Arnd Bergmann
  2015-03-12  9:05                         ` Takashi Iwai
  0 siblings, 1 reply; 83+ 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] 83+ 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
  0 siblings, 0 replies; 83+ 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] 83+ messages in thread

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
       [not found]           ` <20150223103548.GT12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
@ 2015-03-20 20:25             ` Emil Velikov
       [not found]               ` <CACvgo50PA5nb27EcxQqXY49C5hmvDDxi3WOqB=op-wx_WEGd+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 83+ 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] 83+ messages in thread

* Re: [PATCH 05/45] drm.h: include stdlib.h in userspace
       [not found]               ` <CACvgo50PA5nb27EcxQqXY49C5hmvDDxi3WOqB=op-wx_WEGd+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-03-21 12:17                 ` Mikko Rapeli
  2015-04-09 16:00                   ` Emil Velikov
  0 siblings, 1 reply; 83+ 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] 83+ 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
  2015-04-09 16:09                     ` Mikko Rapeli
  0 siblings, 1 reply; 83+ 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] 83+ 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
  0 siblings, 0 replies; 83+ 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] 83+ messages in thread

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

Thread overview: 83+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi>
2015-02-16 23:05 ` [PATCH 05/45] drm.h: include stdlib.h in userspace Mikko Rapeli
     [not found]   ` <1424127948-22484-6-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-23 10:26     ` Emil Velikov
     [not found]       ` <54EB0072.8020909-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-23 10:35         ` Mikko Rapeli
     [not found]           ` <20150223103548.GT12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
2015-03-20 20:25             ` Emil Velikov
     [not found]               ` <CACvgo50PA5nb27EcxQqXY49C5hmvDDxi3WOqB=op-wx_WEGd+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-21 12:17                 ` Mikko Rapeli
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 ` [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
     [not found]     ` <20150216233254.GA23033-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-02-16 23:48       ` Mikko Rapeli
     [not found]   ` <1424127948-22484-16-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-17  9:08     ` Arnd Bergmann
2015-02-17 13:38       ` Alasdair G Kergon
     [not found]         ` <20150217133806.GA5220-FDJ95KluN3Z0klwcnFlA1dvLeJWuRmrY@public.gmane.org>
2015-02-17 13:55           ` Arnd Bergmann
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
     [not found] ` <1424127948-22484-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-16 23:05   ` [PATCH 19/45] rds.h: " Mikko Rapeli
2015-02-16 23:05   ` [PATCH 20/45] sctp.h: " Mikko Rapeli
     [not found]     ` <1424127948-22484-21-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-17 13:11       ` Neil Horman
2015-02-18 15:48       ` Daniel Borkmann
     [not found]         ` <54E4B434.3030302-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
2015-02-18 16:05           ` 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   ` [PATCH 39/45] include/uapi/sound/asequencer.h: include sound/asound.h Mikko Rapeli
2015-02-17  6:46     ` 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 ` [PATCH 21/45] scsi_bsg_fc.h: include stdint.h in userspace 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-03-11  0:28     ` Mikko Rapeli
     [not found]       ` <20150311002812.GB12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
2015-03-11  6:09         ` Takashi Iwai
2015-02-16 23:05 ` [PATCH 25/45] gntalloc.h: " Mikko Rapeli
     [not found]   ` <1424127948-22484-26-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-18 11:53     ` [Xen-devel] " David Vrabel
     [not found]       ` <54E47D32.9040208-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
2015-03-10 22:48         ` Mikko Rapeli
2015-02-16 23:05 ` [PATCH 26/45] gntdev.h: " 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 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
     [not found]   ` <1424127948-22484-34-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-17  9:44     ` Arnd Bergmann
2015-03-10 22:58       ` Mikko Rapeli
     [not found]         ` <20150310225828.GZ12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
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
     [not found]   ` <1424127948-22484-35-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
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
     [not found]   ` <1424127948-22484-38-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-17  9:14     ` Arnd Bergmann
2015-03-11  0:38       ` Mikko Rapeli
     [not found]         ` <20150311003815.GC12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
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 40/45] include/uapi/sound/emu10k1.h: include sound/asound.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
     [not found]   ` <1424127948-22484-42-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-02-17  6:27     ` Takashi Iwai
     [not found]       ` <s5h4mqlqch1.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2015-03-11  1:22         ` Mikko Rapeli
     [not found]           ` <20150311012204.GE12550-dqH1CgrzRhOk/eJAJmRu5A@public.gmane.org>
2015-03-11  6:11             ` Takashi Iwai
     [not found]               ` <s5h4mpsnjw9.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2015-03-11  9:46                 ` Arnd Bergmann
2015-03-12  6:11                   ` Takashi Iwai
     [not found]                     ` <s5hr3sun3rv.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2015-03-12  8:45                       ` Arnd Bergmann
2015-03-12  9:05                         ` Takashi Iwai
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
     [not found]     ` <alpine.LSU.2.11.1502170101520.32748-G+YmpvGGOO3H9RFtKMg/Ng@public.gmane.org>
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 ` [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

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