linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [git pull -tip] headers_check fixes for other architectures
@ 2009-01-31  7:10 Jaswinder Singh Rajput
  2009-01-31 16:44 ` Ingo Molnar
                   ` (2 more replies)
  0 siblings, 3 replies; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-01-31  7:10 UTC (permalink / raw)
  To: Ingo Molnar, Linus Torvalds, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, tony.luck, ralf,
	dhowells, matthew, chris, LKML

These are clean patches, I did not included anything which leads to any
confusion or conflicts. I hope maintainers do not mind if these patches
go to mainstream via Ingo's -tip along with other headers_check fixes.

Ingo please pull:
The following changes since commit 83c21698257b3bbd96926480b26eaffb5a8c3946:
  Ingo Molnar (1):
        Merge branch 'x86/apic'

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git master

Jaswinder Singh Rajput (27):
      headers_check fix: alpha, statfs.h
      headers_check fix: alpha, swab.h
      headers_check fix: arm, a.out.h
      headers_check fix: arm, setup.h
      headers_check fix: arm, swab.h
      headers_check fix: avr32, swab.h
      headers_check fix: blackfin, swab.h
      headers_check fix: frv, swab.h
      headers_check fix: h8300, swab.h
      headers_check fix: ia64, fpu.h
      headers_check fix: ia64, gcc_intrin.h
      headers_check fix: ia64, intrinsics.h
      headers_check fix: ia64, kvm.h
      headers_check fix: ia64, swab.h
      headers_check fix: m32r, swab.h
      headers_check fix: mips, sigcontext.h
      headers_check fix: mips, swab.h
      headers_check fix: mn10300, swab.h
      headers_check fix: parisc, pdc.h
      headers_check fix: parisc, swab.h
      headers_check fix: powerpc, bootx.h
      headers_check fix: powerpc, elf.h
      headers_check fix: powerpc, kvm.h
      headers_check fix: powerpc, ps3fb.h
      headers_check fix: powerpc, spu_info.h
      headers_check fix: powerpc, swab.h
      headers_check fix: xtensa, swab.h

 arch/alpha/include/asm/statfs.h     |    2 ++
 arch/alpha/include/asm/swab.h       |    2 +-
 arch/arm/include/asm/a.out.h        |    2 +-
 arch/arm/include/asm/setup.h        |    2 +-
 arch/arm/include/asm/swab.h         |    2 +-
 arch/avr32/include/asm/swab.h       |    2 +-
 arch/blackfin/include/asm/swab.h    |    2 +-
 arch/h8300/include/asm/swab.h       |    2 +-
 arch/ia64/include/asm/fpu.h         |    2 +-
 arch/ia64/include/asm/gcc_intrin.h  |    1 +
 arch/ia64/include/asm/intrinsics.h  |    1 +
 arch/ia64/include/asm/kvm.h         |    3 +--
 arch/ia64/include/asm/swab.h        |    2 +-
 arch/mips/include/asm/sigcontext.h  |    1 +
 arch/mips/include/asm/swab.h        |    2 +-
 arch/parisc/include/asm/pdc.h       |    3 ++-
 arch/parisc/include/asm/swab.h      |    2 +-
 arch/powerpc/include/asm/bootx.h    |    2 +-
 arch/powerpc/include/asm/elf.h      |    2 +-
 arch/powerpc/include/asm/kvm.h      |    2 +-
 arch/powerpc/include/asm/ps3fb.h    |    1 +
 arch/powerpc/include/asm/spu_info.h |    3 ++-
 arch/powerpc/include/asm/swab.h     |    2 +-
 arch/xtensa/include/asm/swab.h      |    2 +-
 include/asm-frv/swab.h              |    2 +-
 include/asm-m32r/swab.h             |    2 +-
 include/asm-mn10300/swab.h          |    2 +-
 27 files changed, 30 insertions(+), 23 deletions(-)

These patches fixes 41 headers_check warnings:
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-alpha/statfs.h:6: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-alpha/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-alpha/swab.h:10: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/a.out.h:5: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/a.out.h:9: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/setup.h:17: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/setup.h:25: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/swab.h:19: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-arm/swab.h:25: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-avr32/swab.h:7: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-avr32/swab.h:22: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-blackfin/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-blackfin/swab.h:13: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-frv/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-h8300/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/fpu.h:9: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/gcc_intrin.h:63: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/intrinsics.h:57: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/kvm.h:24: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/kvm.h:34: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/swab.h:9: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-ia64/swab.h:13: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-m32r/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-mips/sigcontext.h:57: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-mips/swab.h:12: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-mips/swab.h:18: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-mn10300/swab.h:14: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-mn10300/swab.h:19: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-parisc/pdc.h:420: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-parisc/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-parisc/swab.h:9: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/bootx.h:12: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/bootx.h:57: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/elf.h:5: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/kvm.h:23: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/kvm.h:26: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/ps3fb.h:33: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/spu_info.h:27: found __[us]{8,16,32,64} type without #include <linux/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-powerpc/swab.h:11: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-xtensa/swab.h:14: include of <linux/types.h> is preferred over <asm/types.h>
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/asm-xtensa/swab.h:19: found __[us]{8,16,32,64} type without #include <linux/types.h>

Complete diff:
diff --git a/arch/alpha/include/asm/statfs.h b/arch/alpha/include/asm/statfs.h
index de35cd4..ccd2e18 100644
--- a/arch/alpha/include/asm/statfs.h
+++ b/arch/alpha/include/asm/statfs.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_STATFS_H
 #define _ALPHA_STATFS_H
 
+#include <linux/types.h>
+
 /* Alpha is the only 64-bit platform with 32-bit statfs. And doesn't
    even seem to implement statfs64 */
 #define __statfs_word __u32
diff --git a/arch/alpha/include/asm/swab.h b/arch/alpha/include/asm/swab.h
index 68e7089..4d682b1 100644
--- a/arch/alpha/include/asm/swab.h
+++ b/arch/alpha/include/asm/swab.h
@@ -1,7 +1,7 @@
 #ifndef _ALPHA_SWAB_H
 #define _ALPHA_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 #include <asm/compiler.h>
 
diff --git a/arch/arm/include/asm/a.out.h b/arch/arm/include/asm/a.out.h
index 79489fd..083894b 100644
--- a/arch/arm/include/asm/a.out.h
+++ b/arch/arm/include/asm/a.out.h
@@ -2,7 +2,7 @@
 #define __ARM_A_OUT_H__
 
 #include <linux/personality.h>
-#include <asm/types.h>
+#include <linux/types.h>
 
 struct exec
 {
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index f2cd18a..ee1304f 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -14,7 +14,7 @@
 #ifndef __ASMARM_SETUP_H
 #define __ASMARM_SETUP_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #define COMMAND_LINE_SIZE 1024
 
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h
index 27a689b..ca2bf2f 100644
--- a/arch/arm/include/asm/swab.h
+++ b/arch/arm/include/asm/swab.h
@@ -16,7 +16,7 @@
 #define __ASM_ARM_SWAB_H
 
 #include <linux/compiler.h>
-#include <asm/types.h>
+#include <linux/types.h>
 
 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
 #  define __SWAB_64_THRU_32__
diff --git a/arch/avr32/include/asm/swab.h b/arch/avr32/include/asm/swab.h
index a14aa5b..14cc737 100644
--- a/arch/avr32/include/asm/swab.h
+++ b/arch/avr32/include/asm/swab.h
@@ -4,7 +4,7 @@
 #ifndef __ASM_AVR32_SWAB_H
 #define __ASM_AVR32_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 #define __SWAB_64_THRU_32__
diff --git a/arch/blackfin/include/asm/swab.h b/arch/blackfin/include/asm/swab.h
index 69a051b..6403ad2 100644
--- a/arch/blackfin/include/asm/swab.h
+++ b/arch/blackfin/include/asm/swab.h
@@ -1,7 +1,7 @@
 #ifndef _BLACKFIN_SWAB_H
 #define _BLACKFIN_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
diff --git a/arch/h8300/include/asm/swab.h b/arch/h8300/include/asm/swab.h
index c108f39..39abbf5 100644
--- a/arch/h8300/include/asm/swab.h
+++ b/arch/h8300/include/asm/swab.h
@@ -1,7 +1,7 @@
 #ifndef _H8300_SWAB_H
 #define _H8300_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
 #  define __SWAB_64_THRU_32__
diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
index 3859558..b6395ad 100644
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,7 +6,7 @@
  *	David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 /* floating point status register: */
 #define FPSR_TRAP_VD	(1 << 0)	/* invalid op trap disabled */
diff --git a/arch/ia64/include/asm/gcc_intrin.h b/arch/ia64/include/asm/gcc_intrin.h
index 0f5b559..c2c5fd8 100644
--- a/arch/ia64/include/asm/gcc_intrin.h
+++ b/arch/ia64/include/asm/gcc_intrin.h
@@ -6,6 +6,7 @@
  * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com>
  */
 
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 /* define this macro to get some asm stmts included in 'c' files */
diff --git a/arch/ia64/include/asm/intrinsics.h b/arch/ia64/include/asm/intrinsics.h
index a3e44a5..c47830e 100644
--- a/arch/ia64/include/asm/intrinsics.h
+++ b/arch/ia64/include/asm/intrinsics.h
@@ -10,6 +10,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/types.h>
 /* include compiler specific intrinsics */
 #include <asm/ia64regs.h>
 #ifdef __INTEL_COMPILER
diff --git a/arch/ia64/include/asm/kvm.h b/arch/ia64/include/asm/kvm.h
index 68aa6da..116761c 100644
--- a/arch/ia64/include/asm/kvm.h
+++ b/arch/ia64/include/asm/kvm.h
@@ -21,8 +21,7 @@
  *
  */
 
-#include <asm/types.h>
-
+#include <linux/types.h>
 #include <linux/ioctl.h>
 
 /* Architectural interrupt line count. */
diff --git a/arch/ia64/include/asm/swab.h b/arch/ia64/include/asm/swab.h
index 6aa58b6..c89a8cb 100644
--- a/arch/ia64/include/asm/swab.h
+++ b/arch/ia64/include/asm/swab.h
@@ -6,7 +6,7 @@
  *	David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co.
  */
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <asm/intrinsics.h>
 #include <linux/compiler.h>
 
diff --git a/arch/mips/include/asm/sigcontext.h b/arch/mips/include/asm/sigcontext.h
index 9ce0607..9e89cf9 100644
--- a/arch/mips/include/asm/sigcontext.h
+++ b/arch/mips/include/asm/sigcontext.h
@@ -9,6 +9,7 @@
 #ifndef _ASM_SIGCONTEXT_H
 #define _ASM_SIGCONTEXT_H
 
+#include <linux/types.h>
 #include <asm/sgidefs.h>
 
 #if _MIPS_SIM == _MIPS_SIM_ABI32
diff --git a/arch/mips/include/asm/swab.h b/arch/mips/include/asm/swab.h
index 88f1f7d..99993c0 100644
--- a/arch/mips/include/asm/swab.h
+++ b/arch/mips/include/asm/swab.h
@@ -9,7 +9,7 @@
 #define _ASM_SWAB_H
 
 #include <linux/compiler.h>
-#include <asm/types.h>
+#include <linux/types.h>
 
 #define __SWAB_64_THRU_32__
 
diff --git a/arch/parisc/include/asm/pdc.h b/arch/parisc/include/asm/pdc.h
index c584b00..430f1ae 100644
--- a/arch/parisc/include/asm/pdc.h
+++ b/arch/parisc/include/asm/pdc.h
@@ -336,10 +336,11 @@
 #define NUM_PDC_RESULT	32
 
 #if !defined(__ASSEMBLY__)
-#ifdef __KERNEL__
 
 #include <linux/types.h>
 
+#ifdef __KERNEL__
+
 extern int pdc_type;
 
 /* Values for pdc_type */
diff --git a/arch/parisc/include/asm/swab.h b/arch/parisc/include/asm/swab.h
index 3ff16c5..e78403b 100644
--- a/arch/parisc/include/asm/swab.h
+++ b/arch/parisc/include/asm/swab.h
@@ -1,7 +1,7 @@
 #ifndef _PARISC_SWAB_H
 #define _PARISC_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 #define __SWAB_64_THRU_32__
diff --git a/arch/powerpc/include/asm/bootx.h b/arch/powerpc/include/asm/bootx.h
index 57b82e3..60a3c9e 100644
--- a/arch/powerpc/include/asm/bootx.h
+++ b/arch/powerpc/include/asm/bootx.h
@@ -9,7 +9,7 @@
 #ifndef __ASM_BOOTX_H__
 #define __ASM_BOOTX_H__
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #ifdef macintosh
 #include <Types.h>
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index cd46f02..b5600ce 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -7,7 +7,7 @@
 #include <asm/string.h>
 #endif
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <asm/ptrace.h>
 #include <asm/cputable.h>
 #include <asm/auxvec.h>
diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h
index f993e41..4e0cf65 100644
--- a/arch/powerpc/include/asm/kvm.h
+++ b/arch/powerpc/include/asm/kvm.h
@@ -20,7 +20,7 @@
 #ifndef __LINUX_KVM_POWERPC_H
 #define __LINUX_KVM_POWERPC_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 struct kvm_regs {
 	__u64 pc;
diff --git a/arch/powerpc/include/asm/ps3fb.h b/arch/powerpc/include/asm/ps3fb.h
index 3f121fe..e7233a8 100644
--- a/arch/powerpc/include/asm/ps3fb.h
+++ b/arch/powerpc/include/asm/ps3fb.h
@@ -19,6 +19,7 @@
 #ifndef _ASM_POWERPC_PS3FB_H_
 #define _ASM_POWERPC_PS3FB_H_
 
+#include <linux/types.h>
 #include <linux/ioctl.h>
 
 /* ioctl */
diff --git a/arch/powerpc/include/asm/spu_info.h b/arch/powerpc/include/asm/spu_info.h
index 3545efb..1286c82 100644
--- a/arch/powerpc/include/asm/spu_info.h
+++ b/arch/powerpc/include/asm/spu_info.h
@@ -23,9 +23,10 @@
 #ifndef _SPU_INFO_H
 #define _SPU_INFO_H
 
+#include <linux/types.h>
+
 #ifdef __KERNEL__
 #include <asm/spu.h>
-#include <linux/types.h>
 #else
 struct mfc_cq_sr {
 	__u64 mfc_cq_data0_RW;
diff --git a/arch/powerpc/include/asm/swab.h b/arch/powerpc/include/asm/swab.h
index ef824ae..c581e3e 100644
--- a/arch/powerpc/include/asm/swab.h
+++ b/arch/powerpc/include/asm/swab.h
@@ -8,7 +8,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 #ifdef __GNUC__
diff --git a/arch/xtensa/include/asm/swab.h b/arch/xtensa/include/asm/swab.h
index f50b697..226a391 100644
--- a/arch/xtensa/include/asm/swab.h
+++ b/arch/xtensa/include/asm/swab.h
@@ -11,7 +11,7 @@
 #ifndef _XTENSA_SWAB_H
 #define _XTENSA_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 #define __SWAB_64_THRU_32__
diff --git a/include/asm-frv/swab.h b/include/asm-frv/swab.h
index afb3396..f305834 100644
--- a/include/asm-frv/swab.h
+++ b/include/asm-frv/swab.h
@@ -1,7 +1,7 @@
 #ifndef _ASM_SWAB_H
 #define _ASM_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
 #  define __SWAB_64_THRU_32__
diff --git a/include/asm-m32r/swab.h b/include/asm-m32r/swab.h
index 97973e1..54dab00 100644
--- a/include/asm-m32r/swab.h
+++ b/include/asm-m32r/swab.h
@@ -1,7 +1,7 @@
 #ifndef _ASM_M32R_SWAB_H
 #define _ASM_M32R_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
 #  define __SWAB_64_THRU_32__
diff --git a/include/asm-mn10300/swab.h b/include/asm-mn10300/swab.h
index 4504d1b..bd818a8 100644
--- a/include/asm-mn10300/swab.h
+++ b/include/asm-mn10300/swab.h
@@ -11,7 +11,7 @@
 #ifndef _ASM_SWAB_H
 #define _ASM_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #ifdef __GNUC__
 



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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-01-31  7:10 [git pull -tip] headers_check fixes for other architectures Jaswinder Singh Rajput
@ 2009-01-31 16:44 ` Ingo Molnar
  2009-02-01  6:30   ` Jaswinder Singh Rajput
  2009-02-05 17:55 ` Tony Luck
  2009-02-06  8:19 ` [linux-next][PATCH] revert headers_check fix: ia64, fpu.h KOSAKI Motohiro
  2 siblings, 1 reply; 56+ messages in thread
From: Ingo Molnar @ 2009-01-31 16:44 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Linus Torvalds, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, tony.luck, ralf,
	dhowells, matthew, chris, LKML


* Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:

> These are clean patches, I did not included anything which leads to any
> confusion or conflicts. I hope maintainers do not mind if these patches
> go to mainstream via Ingo's -tip along with other headers_check fixes.
> 
> Ingo please pull:
> The following changes since commit 83c21698257b3bbd96926480b26eaffb5a8c3946:
>   Ingo Molnar (1):
>         Merge branch 'x86/apic'
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git master

looks good, but could you please do this like you did the previous one: 
i.e. against your previous tree which was against Linus's tree?

The tree you did above includes a ton of other in-work trees that are in 
-tip, which orders your fixes to after those trees - i.e. to somewhere in 
the late 2.6.30 merge cycle.

So it's better to keep these separate. You can do this by basing your tree 
on tip:core/header-fixes:

   git checkout -b my-new-tree tip/core/header-fixes

That will give you a base of your previous tree (in a Git friendly way), 
plus Sam's fix.

Then you can git-cherry-pick all your new commits into that new tree, and 
send a pull request if you are happy with it. Likewise, you can probably 
achieve the same (with a lot less work) by doing this in your master 
branch above:

   git rebase --onto tip/core/header-fixes tip/master

(this assumes you have -tip set up as a remote repository.)

	Ingo

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-01-31 16:44 ` Ingo Molnar
@ 2009-02-01  6:30   ` Jaswinder Singh Rajput
  2009-02-01 10:39     ` Ingo Molnar
  0 siblings, 1 reply; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-01  6:30 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, tony.luck, ralf,
	dhowells, matthew, chris, LKML

On Sat, 2009-01-31 at 17:44 +0100, Ingo Molnar wrote:

> Then you can git-cherry-pick all your new commits into that new tree, and 
> send a pull request if you are happy with it. Likewise, you can probably 
> achieve the same (with a lot less work) by doing this in your master 
> branch above:

The following changes since commit 7e3fa56141175026136b392fd026d5d07c49720e:
  Sam Ravnborg (1):
        kbuild: drop check for CONFIG_ in headers_check

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes

Jaswinder Singh Rajput (27):
      headers_check fix: alpha, statfs.h
      headers_check fix: alpha, swab.h
      headers_check fix: arm, a.out.h
      headers_check fix: arm, setup.h
      headers_check fix: arm, swab.h
      headers_check fix: avr32, swab.h
      headers_check fix: blackfin, swab.h
      headers_check fix: frv, swab.h
      headers_check fix: h8300, swab.h
      headers_check fix: ia64, fpu.h
      headers_check fix: ia64, gcc_intrin.h
      headers_check fix: ia64, intrinsics.h
      headers_check fix: ia64, kvm.h
      headers_check fix: ia64, swab.h
      headers_check fix: m32r, swab.h
      headers_check fix: mips, sigcontext.h
      headers_check fix: mips, swab.h
      headers_check fix: mn10300, swab.h
      headers_check fix: parisc, pdc.h
      headers_check fix: parisc, swab.h
      headers_check fix: powerpc, bootx.h
      headers_check fix: powerpc, elf.h
      headers_check fix: powerpc, kvm.h
      headers_check fix: powerpc, ps3fb.h
      headers_check fix: powerpc, spu_info.h
      headers_check fix: powerpc, swab.h
      headers_check fix: xtensa, swab.h

 arch/alpha/include/asm/statfs.h     |    2 ++
 arch/alpha/include/asm/swab.h       |    2 +-
 arch/arm/include/asm/a.out.h        |    2 +-
 arch/arm/include/asm/setup.h        |    2 +-
 arch/arm/include/asm/swab.h         |    2 +-
 arch/avr32/include/asm/swab.h       |    2 +-
 arch/blackfin/include/asm/swab.h    |    2 +-
 arch/h8300/include/asm/swab.h       |    2 +-
 arch/ia64/include/asm/fpu.h         |    2 +-
 arch/ia64/include/asm/gcc_intrin.h  |    1 +
 arch/ia64/include/asm/intrinsics.h  |    1 +
 arch/ia64/include/asm/kvm.h         |    3 +--
 arch/ia64/include/asm/swab.h        |    2 +-
 arch/mips/include/asm/sigcontext.h  |    1 +
 arch/mips/include/asm/swab.h        |    2 +-
 arch/parisc/include/asm/pdc.h       |    3 ++-
 arch/parisc/include/asm/swab.h      |    2 +-
 arch/powerpc/include/asm/bootx.h    |    2 +-
 arch/powerpc/include/asm/elf.h      |    2 +-
 arch/powerpc/include/asm/kvm.h      |    2 +-
 arch/powerpc/include/asm/ps3fb.h    |    1 +
 arch/powerpc/include/asm/spu_info.h |    3 ++-
 arch/powerpc/include/asm/swab.h     |    2 +-
 arch/xtensa/include/asm/swab.h      |    2 +-
 include/asm-frv/swab.h              |    2 +-
 include/asm-m32r/swab.h             |    2 +-
 include/asm-mn10300/swab.h          |    2 +-
 27 files changed, 30 insertions(+), 23 deletions(-)

These patches fixes 41 headers_check warnings as shown in first email.

Complete diff:
diff --git a/arch/alpha/include/asm/statfs.h b/arch/alpha/include/asm/statfs.h
index de35cd4..ccd2e18 100644
--- a/arch/alpha/include/asm/statfs.h
+++ b/arch/alpha/include/asm/statfs.h
@@ -1,6 +1,8 @@
 #ifndef _ALPHA_STATFS_H
 #define _ALPHA_STATFS_H
 
+#include <linux/types.h>
+
 /* Alpha is the only 64-bit platform with 32-bit statfs. And doesn't
    even seem to implement statfs64 */
 #define __statfs_word __u32
diff --git a/arch/alpha/include/asm/swab.h b/arch/alpha/include/asm/swab.h
index 68e7089..4d682b1 100644
--- a/arch/alpha/include/asm/swab.h
+++ b/arch/alpha/include/asm/swab.h
@@ -1,7 +1,7 @@
 #ifndef _ALPHA_SWAB_H
 #define _ALPHA_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 #include <asm/compiler.h>
 
diff --git a/arch/arm/include/asm/a.out.h b/arch/arm/include/asm/a.out.h
index 79489fd..083894b 100644
--- a/arch/arm/include/asm/a.out.h
+++ b/arch/arm/include/asm/a.out.h
@@ -2,7 +2,7 @@
 #define __ARM_A_OUT_H__
 
 #include <linux/personality.h>
-#include <asm/types.h>
+#include <linux/types.h>
 
 struct exec
 {
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index f2cd18a..ee1304f 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -14,7 +14,7 @@
 #ifndef __ASMARM_SETUP_H
 #define __ASMARM_SETUP_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #define COMMAND_LINE_SIZE 1024
 
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h
index 27a689b..ca2bf2f 100644
--- a/arch/arm/include/asm/swab.h
+++ b/arch/arm/include/asm/swab.h
@@ -16,7 +16,7 @@
 #define __ASM_ARM_SWAB_H
 
 #include <linux/compiler.h>
-#include <asm/types.h>
+#include <linux/types.h>
 
 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
 #  define __SWAB_64_THRU_32__
diff --git a/arch/avr32/include/asm/swab.h b/arch/avr32/include/asm/swab.h
index a14aa5b..14cc737 100644
--- a/arch/avr32/include/asm/swab.h
+++ b/arch/avr32/include/asm/swab.h
@@ -4,7 +4,7 @@
 #ifndef __ASM_AVR32_SWAB_H
 #define __ASM_AVR32_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 #define __SWAB_64_THRU_32__
diff --git a/arch/blackfin/include/asm/swab.h b/arch/blackfin/include/asm/swab.h
index 69a051b..6403ad2 100644
--- a/arch/blackfin/include/asm/swab.h
+++ b/arch/blackfin/include/asm/swab.h
@@ -1,7 +1,7 @@
 #ifndef _BLACKFIN_SWAB_H
 #define _BLACKFIN_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
diff --git a/arch/h8300/include/asm/swab.h b/arch/h8300/include/asm/swab.h
index c108f39..39abbf5 100644
--- a/arch/h8300/include/asm/swab.h
+++ b/arch/h8300/include/asm/swab.h
@@ -1,7 +1,7 @@
 #ifndef _H8300_SWAB_H
 #define _H8300_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
 #  define __SWAB_64_THRU_32__
diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
index 3859558..b6395ad 100644
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,7 +6,7 @@
  *	David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 /* floating point status register: */
 #define FPSR_TRAP_VD	(1 << 0)	/* invalid op trap disabled */
diff --git a/arch/ia64/include/asm/gcc_intrin.h b/arch/ia64/include/asm/gcc_intrin.h
index 0f5b559..c2c5fd8 100644
--- a/arch/ia64/include/asm/gcc_intrin.h
+++ b/arch/ia64/include/asm/gcc_intrin.h
@@ -6,6 +6,7 @@
  * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com>
  */
 
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 /* define this macro to get some asm stmts included in 'c' files */
diff --git a/arch/ia64/include/asm/intrinsics.h b/arch/ia64/include/asm/intrinsics.h
index a3e44a5..c47830e 100644
--- a/arch/ia64/include/asm/intrinsics.h
+++ b/arch/ia64/include/asm/intrinsics.h
@@ -10,6 +10,7 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/types.h>
 /* include compiler specific intrinsics */
 #include <asm/ia64regs.h>
 #ifdef __INTEL_COMPILER
diff --git a/arch/ia64/include/asm/kvm.h b/arch/ia64/include/asm/kvm.h
index 68aa6da..116761c 100644
--- a/arch/ia64/include/asm/kvm.h
+++ b/arch/ia64/include/asm/kvm.h
@@ -21,8 +21,7 @@
  *
  */
 
-#include <asm/types.h>
-
+#include <linux/types.h>
 #include <linux/ioctl.h>
 
 /* Architectural interrupt line count. */
diff --git a/arch/ia64/include/asm/swab.h b/arch/ia64/include/asm/swab.h
index 6aa58b6..c89a8cb 100644
--- a/arch/ia64/include/asm/swab.h
+++ b/arch/ia64/include/asm/swab.h
@@ -6,7 +6,7 @@
  *	David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co.
  */
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <asm/intrinsics.h>
 #include <linux/compiler.h>
 
diff --git a/arch/mips/include/asm/sigcontext.h b/arch/mips/include/asm/sigcontext.h
index 9ce0607..9e89cf9 100644
--- a/arch/mips/include/asm/sigcontext.h
+++ b/arch/mips/include/asm/sigcontext.h
@@ -9,6 +9,7 @@
 #ifndef _ASM_SIGCONTEXT_H
 #define _ASM_SIGCONTEXT_H
 
+#include <linux/types.h>
 #include <asm/sgidefs.h>
 
 #if _MIPS_SIM == _MIPS_SIM_ABI32
diff --git a/arch/mips/include/asm/swab.h b/arch/mips/include/asm/swab.h
index 88f1f7d..99993c0 100644
--- a/arch/mips/include/asm/swab.h
+++ b/arch/mips/include/asm/swab.h
@@ -9,7 +9,7 @@
 #define _ASM_SWAB_H
 
 #include <linux/compiler.h>
-#include <asm/types.h>
+#include <linux/types.h>
 
 #define __SWAB_64_THRU_32__
 
diff --git a/arch/parisc/include/asm/pdc.h b/arch/parisc/include/asm/pdc.h
index c584b00..430f1ae 100644
--- a/arch/parisc/include/asm/pdc.h
+++ b/arch/parisc/include/asm/pdc.h
@@ -336,10 +336,11 @@
 #define NUM_PDC_RESULT	32
 
 #if !defined(__ASSEMBLY__)
-#ifdef __KERNEL__
 
 #include <linux/types.h>
 
+#ifdef __KERNEL__
+
 extern int pdc_type;
 
 /* Values for pdc_type */
diff --git a/arch/parisc/include/asm/swab.h b/arch/parisc/include/asm/swab.h
index 3ff16c5..e78403b 100644
--- a/arch/parisc/include/asm/swab.h
+++ b/arch/parisc/include/asm/swab.h
@@ -1,7 +1,7 @@
 #ifndef _PARISC_SWAB_H
 #define _PARISC_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 #define __SWAB_64_THRU_32__
diff --git a/arch/powerpc/include/asm/bootx.h b/arch/powerpc/include/asm/bootx.h
index 57b82e3..60a3c9e 100644
--- a/arch/powerpc/include/asm/bootx.h
+++ b/arch/powerpc/include/asm/bootx.h
@@ -9,7 +9,7 @@
 #ifndef __ASM_BOOTX_H__
 #define __ASM_BOOTX_H__
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #ifdef macintosh
 #include <Types.h>
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index cd46f02..b5600ce 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -7,7 +7,7 @@
 #include <asm/string.h>
 #endif
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <asm/ptrace.h>
 #include <asm/cputable.h>
 #include <asm/auxvec.h>
diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h
index f993e41..4e0cf65 100644
--- a/arch/powerpc/include/asm/kvm.h
+++ b/arch/powerpc/include/asm/kvm.h
@@ -20,7 +20,7 @@
 #ifndef __LINUX_KVM_POWERPC_H
 #define __LINUX_KVM_POWERPC_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 struct kvm_regs {
 	__u64 pc;
diff --git a/arch/powerpc/include/asm/ps3fb.h b/arch/powerpc/include/asm/ps3fb.h
index 3f121fe..e7233a8 100644
--- a/arch/powerpc/include/asm/ps3fb.h
+++ b/arch/powerpc/include/asm/ps3fb.h
@@ -19,6 +19,7 @@
 #ifndef _ASM_POWERPC_PS3FB_H_
 #define _ASM_POWERPC_PS3FB_H_
 
+#include <linux/types.h>
 #include <linux/ioctl.h>
 
 /* ioctl */
diff --git a/arch/powerpc/include/asm/spu_info.h b/arch/powerpc/include/asm/spu_info.h
index 3545efb..1286c82 100644
--- a/arch/powerpc/include/asm/spu_info.h
+++ b/arch/powerpc/include/asm/spu_info.h
@@ -23,9 +23,10 @@
 #ifndef _SPU_INFO_H
 #define _SPU_INFO_H
 
+#include <linux/types.h>
+
 #ifdef __KERNEL__
 #include <asm/spu.h>
-#include <linux/types.h>
 #else
 struct mfc_cq_sr {
 	__u64 mfc_cq_data0_RW;
diff --git a/arch/powerpc/include/asm/swab.h b/arch/powerpc/include/asm/swab.h
index ef824ae..c581e3e 100644
--- a/arch/powerpc/include/asm/swab.h
+++ b/arch/powerpc/include/asm/swab.h
@@ -8,7 +8,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 #ifdef __GNUC__
diff --git a/arch/xtensa/include/asm/swab.h b/arch/xtensa/include/asm/swab.h
index f50b697..226a391 100644
--- a/arch/xtensa/include/asm/swab.h
+++ b/arch/xtensa/include/asm/swab.h
@@ -11,7 +11,7 @@
 #ifndef _XTENSA_SWAB_H
 #define _XTENSA_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 #include <linux/compiler.h>
 
 #define __SWAB_64_THRU_32__
diff --git a/include/asm-frv/swab.h b/include/asm-frv/swab.h
index afb3396..f305834 100644
--- a/include/asm-frv/swab.h
+++ b/include/asm-frv/swab.h
@@ -1,7 +1,7 @@
 #ifndef _ASM_SWAB_H
 #define _ASM_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
 #  define __SWAB_64_THRU_32__
diff --git a/include/asm-m32r/swab.h b/include/asm-m32r/swab.h
index 97973e1..54dab00 100644
--- a/include/asm-m32r/swab.h
+++ b/include/asm-m32r/swab.h
@@ -1,7 +1,7 @@
 #ifndef _ASM_M32R_SWAB_H
 #define _ASM_M32R_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
 #  define __SWAB_64_THRU_32__
diff --git a/include/asm-mn10300/swab.h b/include/asm-mn10300/swab.h
index 4504d1b..bd818a8 100644
--- a/include/asm-mn10300/swab.h
+++ b/include/asm-mn10300/swab.h
@@ -11,7 +11,7 @@
 #ifndef _ASM_SWAB_H
 #define _ASM_SWAB_H
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #ifdef __GNUC__
 



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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-01  6:30   ` Jaswinder Singh Rajput
@ 2009-02-01 10:39     ` Ingo Molnar
  2009-02-01 16:49       ` Ingo Molnar
  0 siblings, 1 reply; 56+ messages in thread
From: Ingo Molnar @ 2009-02-01 10:39 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Linus Torvalds, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, tony.luck, ralf,
	dhowells, matthew, chris, LKML


* Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:

> On Sat, 2009-01-31 at 17:44 +0100, Ingo Molnar wrote:
> 
> > Then you can git-cherry-pick all your new commits into that new tree, and 
> > send a pull request if you are happy with it. Likewise, you can probably 
> > achieve the same (with a lot less work) by doing this in your master 
> > branch above:
> 
> The following changes since commit 7e3fa56141175026136b392fd026d5d07c49720e:
>   Sam Ravnborg (1):
>         kbuild: drop check for CONFIG_ in headers_check
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes
> 
> Jaswinder Singh Rajput (27):
>       headers_check fix: alpha, statfs.h
>       headers_check fix: alpha, swab.h
>       headers_check fix: arm, a.out.h
>       headers_check fix: arm, setup.h
>       headers_check fix: arm, swab.h
>       headers_check fix: avr32, swab.h
>       headers_check fix: blackfin, swab.h
>       headers_check fix: frv, swab.h
>       headers_check fix: h8300, swab.h
>       headers_check fix: ia64, fpu.h
>       headers_check fix: ia64, gcc_intrin.h
>       headers_check fix: ia64, intrinsics.h
>       headers_check fix: ia64, kvm.h
>       headers_check fix: ia64, swab.h
>       headers_check fix: m32r, swab.h
>       headers_check fix: mips, sigcontext.h
>       headers_check fix: mips, swab.h
>       headers_check fix: mn10300, swab.h
>       headers_check fix: parisc, pdc.h
>       headers_check fix: parisc, swab.h
>       headers_check fix: powerpc, bootx.h
>       headers_check fix: powerpc, elf.h
>       headers_check fix: powerpc, kvm.h
>       headers_check fix: powerpc, ps3fb.h
>       headers_check fix: powerpc, spu_info.h
>       headers_check fix: powerpc, swab.h
>       headers_check fix: xtensa, swab.h
> 
>  arch/alpha/include/asm/statfs.h     |    2 ++
>  arch/alpha/include/asm/swab.h       |    2 +-
>  arch/arm/include/asm/a.out.h        |    2 +-
>  arch/arm/include/asm/setup.h        |    2 +-
>  arch/arm/include/asm/swab.h         |    2 +-
>  arch/avr32/include/asm/swab.h       |    2 +-
>  arch/blackfin/include/asm/swab.h    |    2 +-
>  arch/h8300/include/asm/swab.h       |    2 +-
>  arch/ia64/include/asm/fpu.h         |    2 +-
>  arch/ia64/include/asm/gcc_intrin.h  |    1 +
>  arch/ia64/include/asm/intrinsics.h  |    1 +
>  arch/ia64/include/asm/kvm.h         |    3 +--
>  arch/ia64/include/asm/swab.h        |    2 +-
>  arch/mips/include/asm/sigcontext.h  |    1 +
>  arch/mips/include/asm/swab.h        |    2 +-
>  arch/parisc/include/asm/pdc.h       |    3 ++-
>  arch/parisc/include/asm/swab.h      |    2 +-
>  arch/powerpc/include/asm/bootx.h    |    2 +-
>  arch/powerpc/include/asm/elf.h      |    2 +-
>  arch/powerpc/include/asm/kvm.h      |    2 +-
>  arch/powerpc/include/asm/ps3fb.h    |    1 +
>  arch/powerpc/include/asm/spu_info.h |    3 ++-
>  arch/powerpc/include/asm/swab.h     |    2 +-
>  arch/xtensa/include/asm/swab.h      |    2 +-
>  include/asm-frv/swab.h              |    2 +-
>  include/asm-m32r/swab.h             |    2 +-
>  include/asm-mn10300/swab.h          |    2 +-
>  27 files changed, 30 insertions(+), 23 deletions(-)
> 
> These patches fixes 41 headers_check warnings as shown in first email.

Pulled into tip/core/header-fixes, thanks Jaswinder!

	Ingo

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-01 10:39     ` Ingo Molnar
@ 2009-02-01 16:49       ` Ingo Molnar
  2009-02-01 17:06         ` Russell King - ARM Linux
                           ` (3 more replies)
  0 siblings, 4 replies; 56+ messages in thread
From: Ingo Molnar @ 2009-02-01 16:49 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Linus Torvalds, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, tony.luck, ralf,
	dhowells, matthew, chris, LKML


* Ingo Molnar <mingo@elte.hu> wrote:

> > These patches fixes 41 headers_check warnings as shown in first email.
> 
> Pulled into tip/core/header-fixes, thanks Jaswinder!

These are the remaining ones on x86:

     17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h
     12 /dev/shm/tip/usr/include/linux/soundcard.h
      6 /dev/shm/tip/usr/include/asm/setup.h
      3 /dev/shm/tip/usr/include/linux/nubus.h
      2 /dev/shm/tip/usr/include/linux/in6.h
      1 /dev/shm/tip/usr/include/mtd/jffs2-user.h
      1 /dev/shm/tip/usr/include/linux/socket.h
      1 /dev/shm/tip/usr/include/linux/coda_psdev.h
      1 /dev/shm/tip/usr/include/asm/prctl.h

They are all of the "extern's make no sense in userspace" type. What was the 
verdict, are they worth touching, or should we turn off this warning in 
'make headers_check'?

	Ingo

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-01 16:49       ` Ingo Molnar
@ 2009-02-01 17:06         ` Russell King - ARM Linux
  2009-02-01 17:20         ` Russell King - ARM Linux
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-01 17:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, Linus Torvalds, Sam Ravnborg,
	Andrew Morton, hskinnemoen, cooloney, tony.luck, ralf, dhowells,
	matthew, chris, LKML

On Sun, Feb 01, 2009 at 05:49:15PM +0100, Ingo Molnar wrote:
> 
> * Ingo Molnar <mingo@elte.hu> wrote:
> 
> > > These patches fixes 41 headers_check warnings as shown in first email.
> > 
> > Pulled into tip/core/header-fixes, thanks Jaswinder!
> 
> These are the remaining ones on x86:
> 
>      17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h
>      12 /dev/shm/tip/usr/include/linux/soundcard.h
>       6 /dev/shm/tip/usr/include/asm/setup.h
>       3 /dev/shm/tip/usr/include/linux/nubus.h
>       2 /dev/shm/tip/usr/include/linux/in6.h
>       1 /dev/shm/tip/usr/include/mtd/jffs2-user.h
>       1 /dev/shm/tip/usr/include/linux/socket.h
>       1 /dev/shm/tip/usr/include/linux/coda_psdev.h
>       1 /dev/shm/tip/usr/include/asm/prctl.h
> 
> They are all of the "extern's make no sense in userspace" type. What was the 
> verdict, are they worth touching, or should we turn off this warning in 
> 'make headers_check'?

So, what's this all about?

You know, if there's something that is relevant to others and you want to
_add_ them to the CC, at least leave enough of the original message so the
new people who are being CC'd have some clue what the hell the thread is 
about, and more importantly where to get the patches being discussed.

Until then, if this includes any ARM bits, NAK, because I don't know
what those changes are.

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-01 16:49       ` Ingo Molnar
  2009-02-01 17:06         ` Russell King - ARM Linux
@ 2009-02-01 17:20         ` Russell King - ARM Linux
  2009-02-01 17:31           ` Jaswinder Singh Rajput
  2009-02-01 18:33         ` Jaswinder Singh Rajput
  2009-02-02 17:11         ` Mike Frysinger
  3 siblings, 1 reply; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-01 17:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, Linus Torvalds, Sam Ravnborg,
	Andrew Morton, hskinnemoen, cooloney, tony.luck, ralf, dhowells,
	matthew, chris, LKML

On Sun, Feb 01, 2009 at 05:49:15PM +0100, Ingo Molnar wrote:
> 
> * Ingo Molnar <mingo@elte.hu> wrote:
> 
> > > These patches fixes 41 headers_check warnings as shown in first email.
> > 
> > Pulled into tip/core/header-fixes, thanks Jaswinder!
> 
> These are the remaining ones on x86:
> 
>      17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h
>      12 /dev/shm/tip/usr/include/linux/soundcard.h
>       6 /dev/shm/tip/usr/include/asm/setup.h
>       3 /dev/shm/tip/usr/include/linux/nubus.h
>       2 /dev/shm/tip/usr/include/linux/in6.h
>       1 /dev/shm/tip/usr/include/mtd/jffs2-user.h
>       1 /dev/shm/tip/usr/include/linux/socket.h
>       1 /dev/shm/tip/usr/include/linux/coda_psdev.h
>       1 /dev/shm/tip/usr/include/asm/prctl.h
> 
> They are all of the "extern's make no sense in userspace" type. What was the 
> verdict, are they worth touching, or should we turn off this warning in 
> 'make headers_check'?

Ah, not a case of new-cc's added.  A case of the rare event of non-spam
eminating from hera.kernel.org falling foul of my manual local blacklist.

I'd appreciate it if someone could point me at the original patches
being discussed.

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-01 17:20         ` Russell King - ARM Linux
@ 2009-02-01 17:31           ` Jaswinder Singh Rajput
  0 siblings, 0 replies; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-01 17:31 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Ingo Molnar, Jaswinder Singh Rajput, Linus Torvalds,
	Sam Ravnborg, Andrew Morton, hskinnemoen, cooloney, tony.luck,
	ralf, dhowells, matthew, chris, LKML

On Sun, Feb 1, 2009 at 10:50 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Sun, Feb 01, 2009 at 05:49:15PM +0100, Ingo Molnar wrote:
>>
>> * Ingo Molnar <mingo@elte.hu> wrote:
>>
>> > > These patches fixes 41 headers_check warnings as shown in first email.
>> >
>> > Pulled into tip/core/header-fixes, thanks Jaswinder!
>>
>> These are the remaining ones on x86:
>>
>>      17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h
>>      12 /dev/shm/tip/usr/include/linux/soundcard.h
>>       6 /dev/shm/tip/usr/include/asm/setup.h
>>       3 /dev/shm/tip/usr/include/linux/nubus.h
>>       2 /dev/shm/tip/usr/include/linux/in6.h
>>       1 /dev/shm/tip/usr/include/mtd/jffs2-user.h
>>       1 /dev/shm/tip/usr/include/linux/socket.h
>>       1 /dev/shm/tip/usr/include/linux/coda_psdev.h
>>       1 /dev/shm/tip/usr/include/asm/prctl.h
>>
>> They are all of the "extern's make no sense in userspace" type. What was the
>> verdict, are they worth touching, or should we turn off this warning in
>> 'make headers_check'?
>
> Ah, not a case of new-cc's added.  A case of the rare event of non-spam
> eminating from hera.kernel.org falling foul of my manual local blacklist.
>
> I'd appreciate it if someone could point me at the original patches
> being discussed.

I am sorry, if you did not received the email but you was in CC list:

Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Sam Ravnborg <sam@ravnborg.org>,
Andrew Morton <akpm@linux-foundation.org>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
hskinnemoen@atmel.com,
cooloney@kernel.org,
tony.luck@intel.com,
ralf@linux-mips.org,
dhowells@redhat.com,
matthew@wil.cx,
chris@zankel.net,
LKML <linux-kernel@vger.kernel.org>

Arms bits are :

These are clean patches, I did not included anything which leads to any
confusion or conflicts. I hope maintainers do not mind if these patches
go to mainstream via Ingo's -tip along with other headers_check fixes.

Jaswinder Singh Rajput (3):
     headers_check fix: arm, a.out.h
     headers_check fix: arm, setup.h
     headers_check fix: arm, swab.h

diff --git a/arch/arm/include/asm/a.out.h b/arch/arm/include/asm/a.out.h
index 79489fd..083894b 100644
--- a/arch/arm/include/asm/a.out.h
+++ b/arch/arm/include/asm/a.out.h
@@ -2,7 +2,7 @@
 #define __ARM_A_OUT_H__

 #include <linux/personality.h>
-#include <asm/types.h>
+#include <linux/types.h>

 struct exec
 {
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index f2cd18a..ee1304f 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -14,7 +14,7 @@
 #ifndef __ASMARM_SETUP_H
 #define __ASMARM_SETUP_H

-#include <asm/types.h>
+#include <linux/types.h>

 #define COMMAND_LINE_SIZE 1024

diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h
index 27a689b..ca2bf2f 100644
--- a/arch/arm/include/asm/swab.h
+++ b/arch/arm/include/asm/swab.h
@@ -16,7 +16,7 @@
 #define __ASM_ARM_SWAB_H

 #include <linux/compiler.h>
-#include <asm/types.h>
+#include <linux/types.h>

 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
 #  define __SWAB_64_THRU_32__

Thanks,
--
JSR

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-01 16:49       ` Ingo Molnar
  2009-02-01 17:06         ` Russell King - ARM Linux
  2009-02-01 17:20         ` Russell King - ARM Linux
@ 2009-02-01 18:33         ` Jaswinder Singh Rajput
  2009-02-02 17:11         ` Mike Frysinger
  3 siblings, 0 replies; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-01 18:33 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, tony.luck, ralf,
	dhowells, matthew, chris, LKML, Takashi Iwai, David Woodhouse

On Sun, 2009-02-01 at 17:49 +0100, Ingo Molnar wrote:
> * Ingo Molnar <mingo@elte.hu> wrote:
> 
> > > These patches fixes 41 headers_check warnings as shown in first email.
> > 
> > Pulled into tip/core/header-fixes, thanks Jaswinder!
> 
> These are the remaining ones on x86:
> 
>      17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h
>      12 /dev/shm/tip/usr/include/linux/soundcard.h
>       6 /dev/shm/tip/usr/include/asm/setup.h
>       3 /dev/shm/tip/usr/include/linux/nubus.h
>       2 /dev/shm/tip/usr/include/linux/in6.h
>       1 /dev/shm/tip/usr/include/mtd/jffs2-user.h
>       1 /dev/shm/tip/usr/include/linux/socket.h
>       1 /dev/shm/tip/usr/include/linux/coda_psdev.h
>       1 /dev/shm/tip/usr/include/asm/prctl.h
> 
> They are all of the "extern's make no sense in userspace" type. What was the 
> verdict, are they worth touching, or should we turn off this warning in 
> 'make headers_check'?
> 

I have the patches in queue which fixes above warnings except:

 12 /dev/shm/tip/usr/include/linux/soundcard.h
 1 /dev/shm/tip/usr/include/mtd/jffs2-user.h

Because these two files are using userspace functions.

--
JSR




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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-01 16:49       ` Ingo Molnar
                           ` (2 preceding siblings ...)
  2009-02-01 18:33         ` Jaswinder Singh Rajput
@ 2009-02-02 17:11         ` Mike Frysinger
  2009-02-02 18:08           ` Ingo Molnar
  3 siblings, 1 reply; 56+ messages in thread
From: Mike Frysinger @ 2009-02-02 17:11 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, Linus Torvalds, Sam Ravnborg,
	Andrew Morton, Russell King - ARM Linux, hskinnemoen, cooloney,
	tony.luck, ralf, dhowells, matthew, chris, LKML

On Sun, Feb 1, 2009 at 11:49, Ingo Molnar wrote:
> These are the remaining ones on x86:
>
>     17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h
>     12 /dev/shm/tip/usr/include/linux/soundcard.h
>      6 /dev/shm/tip/usr/include/asm/setup.h
>      3 /dev/shm/tip/usr/include/linux/nubus.h
>      2 /dev/shm/tip/usr/include/linux/in6.h
>      1 /dev/shm/tip/usr/include/mtd/jffs2-user.h
>      1 /dev/shm/tip/usr/include/linux/socket.h
>      1 /dev/shm/tip/usr/include/linux/coda_psdev.h
>      1 /dev/shm/tip/usr/include/asm/prctl.h
>
> They are all of the "extern's make no sense in userspace" type. What was the
> verdict, are they worth touching, or should we turn off this warning in
> 'make headers_check'?

the warning wouldnt have been added if it didnt make sense ... like it
says, prototypes for kernel functions make no sense in userspace
headers

as for how it gets solved, we can either patch it manually or
automatically delete the prototypes ... but since prototypes are a big
difficult to match properly with regexes, the former will probably be
saner right now.
-mike

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-02 17:11         ` Mike Frysinger
@ 2009-02-02 18:08           ` Ingo Molnar
  2009-02-02 18:29             ` Mike Frysinger
  0 siblings, 1 reply; 56+ messages in thread
From: Ingo Molnar @ 2009-02-02 18:08 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: Jaswinder Singh Rajput, Linus Torvalds, Sam Ravnborg,
	Andrew Morton, Russell King - ARM Linux, hskinnemoen, cooloney,
	tony.luck, ralf, dhowells, matthew, chris, LKML


* Mike Frysinger <vapier.adi@gmail.com> wrote:

> On Sun, Feb 1, 2009 at 11:49, Ingo Molnar wrote:
> > These are the remaining ones on x86:
> >
> >     17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h
> >     12 /dev/shm/tip/usr/include/linux/soundcard.h
> >      6 /dev/shm/tip/usr/include/asm/setup.h
> >      3 /dev/shm/tip/usr/include/linux/nubus.h
> >      2 /dev/shm/tip/usr/include/linux/in6.h
> >      1 /dev/shm/tip/usr/include/mtd/jffs2-user.h
> >      1 /dev/shm/tip/usr/include/linux/socket.h
> >      1 /dev/shm/tip/usr/include/linux/coda_psdev.h
> >      1 /dev/shm/tip/usr/include/asm/prctl.h
> >
> > They are all of the "extern's make no sense in userspace" type. What was 
> > the verdict, are they worth touching, or should we turn off this warning 
> > in 'make headers_check'?
> 
> the warning wouldnt have been added if it didnt make sense ... like it 
> says, prototypes for kernel functions make no sense in userspace headers

the existence of a warning does not justify it. For example the CONFIG_* 
warnings were deemed largely bogus and were removed.

	Ingo

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-02 18:08           ` Ingo Molnar
@ 2009-02-02 18:29             ` Mike Frysinger
  2009-02-02 18:48               ` Ingo Molnar
  0 siblings, 1 reply; 56+ messages in thread
From: Mike Frysinger @ 2009-02-02 18:29 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, Linus Torvalds, Sam Ravnborg,
	Andrew Morton, Russell King - ARM Linux, hskinnemoen, cooloney,
	tony.luck, ralf, dhowells, matthew, chris, LKML

On Mon, Feb 2, 2009 at 13:08, Ingo Molnar wrote:
> * Mike Frysinger wrote:
>> On Sun, Feb 1, 2009 at 11:49, Ingo Molnar wrote:
>> > These are the remaining ones on x86:
>> >
>> >     17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h
>> >     12 /dev/shm/tip/usr/include/linux/soundcard.h
>> >      6 /dev/shm/tip/usr/include/asm/setup.h
>> >      3 /dev/shm/tip/usr/include/linux/nubus.h
>> >      2 /dev/shm/tip/usr/include/linux/in6.h
>> >      1 /dev/shm/tip/usr/include/mtd/jffs2-user.h
>> >      1 /dev/shm/tip/usr/include/linux/socket.h
>> >      1 /dev/shm/tip/usr/include/linux/coda_psdev.h
>> >      1 /dev/shm/tip/usr/include/asm/prctl.h
>> >
>> > They are all of the "extern's make no sense in userspace" type. What was
>> > the verdict, are they worth touching, or should we turn off this warning
>> > in 'make headers_check'?
>>
>> the warning wouldnt have been added if it didnt make sense ... like it
>> says, prototypes for kernel functions make no sense in userspace headers
>
> the existence of a warning does not justify it. For example the CONFIG_*
> warnings were deemed largely bogus and were removed.

kernel function prototypes make no sense in userspace, especially
considering how much effort goes into avoiding namespace pollution.
-mike

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-02 18:29             ` Mike Frysinger
@ 2009-02-02 18:48               ` Ingo Molnar
  0 siblings, 0 replies; 56+ messages in thread
From: Ingo Molnar @ 2009-02-02 18:48 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: Jaswinder Singh Rajput, Linus Torvalds, Sam Ravnborg,
	Andrew Morton, Russell King - ARM Linux, hskinnemoen, cooloney,
	tony.luck, ralf, dhowells, matthew, chris, LKML


* Mike Frysinger <vapier.adi@gmail.com> wrote:

> On Mon, Feb 2, 2009 at 13:08, Ingo Molnar wrote:
> > * Mike Frysinger wrote:
> >> On Sun, Feb 1, 2009 at 11:49, Ingo Molnar wrote:
> >> > These are the remaining ones on x86:
> >> >
> >> >     17 /dev/shm/tip/usr/include/linux/reiserfs_fs.h
> >> >     12 /dev/shm/tip/usr/include/linux/soundcard.h
> >> >      6 /dev/shm/tip/usr/include/asm/setup.h
> >> >      3 /dev/shm/tip/usr/include/linux/nubus.h
> >> >      2 /dev/shm/tip/usr/include/linux/in6.h
> >> >      1 /dev/shm/tip/usr/include/mtd/jffs2-user.h
> >> >      1 /dev/shm/tip/usr/include/linux/socket.h
> >> >      1 /dev/shm/tip/usr/include/linux/coda_psdev.h
> >> >      1 /dev/shm/tip/usr/include/asm/prctl.h
> >> >
> >> > They are all of the "extern's make no sense in userspace" type. What was
> >> > the verdict, are they worth touching, or should we turn off this warning
> >> > in 'make headers_check'?
> >>
> >> the warning wouldnt have been added if it didnt make sense ... like it
> >> says, prototypes for kernel functions make no sense in userspace headers
> >
> > the existence of a warning does not justify it. For example the CONFIG_*
> > warnings were deemed largely bogus and were removed.
> 
> kernel function prototypes make no sense in userspace, especially
> considering how much effort goes into avoiding namespace pollution.

i agree, i only addressed this rather incorrect statement:

  "the warning wouldnt have been added if it didnt make sense ..."

	Ingo

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-01-31  7:10 [git pull -tip] headers_check fixes for other architectures Jaswinder Singh Rajput
  2009-01-31 16:44 ` Ingo Molnar
@ 2009-02-05 17:55 ` Tony Luck
  2009-02-05 19:06   ` Linus Torvalds
  2009-02-06  8:19 ` [linux-next][PATCH] revert headers_check fix: ia64, fpu.h KOSAKI Motohiro
  2 siblings, 1 reply; 56+ messages in thread
From: Tony Luck @ 2009-02-05 17:55 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, Linus Torvalds, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML

On Fri, Jan 30, 2009 at 11:10 PM, Jaswinder Singh Rajput
<jaswinder@kernel.org> wrote:
> These are clean patches, I did not included anything which leads to any
> confusion or conflicts. I hope maintainers do not mind if these patches
> go to mainstream via Ingo's -tip along with other headers_check fixes.
>      headers_check fix: ia64, fpu.h

> diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
> index 3859558..b6395ad 100644
> --- a/arch/ia64/include/asm/fpu.h
> +++ b/arch/ia64/include/asm/fpu.h
> @@ -6,7 +6,7 @@
>  *     David Mosberger-Tang <davidm@hpl.hp.com>
>  */
>
> -#include <asm/types.h>
> +#include <linux/types.h>
>
>  /* floating point status register: */
>  #define FPSR_TRAP_VD   (1 << 0)        /* invalid op trap disabled */

This one breaks the ia64 build for linux-next (since some assembly files
include <asm/fpu.h> which then goes on to pull in a whole bunch of
"C" include files that don't have __ASSEMBLY__ guards and so the
assembler chokes on "enum" and "typedef" etc.)

Either revert this part ... or wrap the #include like this in fpu.h:

#ifndef __ASSEMBLY__
#include <linux/types.h>
#endif

Thanks

-Tony

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-05 17:55 ` Tony Luck
@ 2009-02-05 19:06   ` Linus Torvalds
  2009-02-05 19:19     ` Ingo Molnar
  0 siblings, 1 reply; 56+ messages in thread
From: Linus Torvalds @ 2009-02-05 19:06 UTC (permalink / raw)
  To: Tony Luck
  Cc: Jaswinder Singh Rajput, Ingo Molnar, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML



On Thu, 5 Feb 2009, Tony Luck wrote:
> 
> Either revert this part ... or wrap the #include like this in fpu.h:
> 
> #ifndef __ASSEMBLY__
> #include <linux/types.h>
> #endif

That loses the

	arch/ia64/include/asm/types.h:# define __IA64_UL(x)             (x)

thing from <asm/types.h>, and makes some of the constants unusable from 
asm. Maybe nobody cares.

But it looks like that core really needs to use <asm/types.h> right now.

		Linus

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-05 19:06   ` Linus Torvalds
@ 2009-02-05 19:19     ` Ingo Molnar
  2009-02-06  2:06       ` Jaswinder Singh Rajput
  0 siblings, 1 reply; 56+ messages in thread
From: Ingo Molnar @ 2009-02-05 19:19 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Tony Luck, Jaswinder Singh Rajput, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Thu, 5 Feb 2009, Tony Luck wrote:
> > 
> > Either revert this part ... or wrap the #include like this in fpu.h:
> > 
> > #ifndef __ASSEMBLY__
> > #include <linux/types.h>
> > #endif
> 
> That loses the
> 
> 	arch/ia64/include/asm/types.h:# define __IA64_UL(x)             (x)
> 
> thing from <asm/types.h>, and makes some of the constants unusable from 
> asm. Maybe nobody cares.
> 
> But it looks like that core really needs to use <asm/types.h> right now.

Note that these bits are not mainline yet, they are still being refined.

Jaswinder, because they can break the build we should proactively drop all 
architecture patches that do asm/types.h conversions.

I did build all the affected architectures via their defconfigs and they 
built just fine - but i cannot do wide coverage testing of them.

So i think we should drop these bits:

 earth4:~/tip> gll --grep='asm/types.h' linus..core/header-fixes
 1ff8f73: headers_check fix: xtensa, swab.h
 4810987: headers_check fix: powerpc, swab.h
 9f2cd96: headers_check fix: powerpc, kvm.h
 785857f: headers_check fix: powerpc, elf.h
 4be2c7f: headers_check fix: powerpc, bootx.h
 726da1e: headers_check fix: parisc, swab.h
 bef53ca: headers_check fix: mn10300, swab.h
 a9f6acc: headers_check fix: mips, swab.h
 d8cbec1: headers_check fix: m32r, swab.h
 040c92b: headers_check fix: ia64, swab.h
 6ce7950: headers_check fix: ia64, kvm.h
 fa9ea6c: headers_check fix: ia64, fpu.h
 295803e: headers_check fix: h8300, swab.h
 dacd762: headers_check fix: frv, swab.h
 350eb8b: headers_check fix: blackfin, swab.h
 1c6ce70: headers_check fix: avr32, swab.h
 e42ec24: headers_check fix: arm, swab.h
 4af3bf6: headers_check fix: arm, setup.h
 f100e6d: headers_check fix: arm, a.out.h
 3fd5906: headers_check fix: alpha, swab.h

and send the rest to Linus if all outstanding observations have been 
addressed. What do you think?

	Ingo

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-05 19:19     ` Ingo Molnar
@ 2009-02-06  2:06       ` Jaswinder Singh Rajput
  2009-02-06  2:14         ` Mike Frysinger
  2009-02-06  2:20         ` Ingo Molnar
  0 siblings, 2 replies; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06  2:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, Tony Luck, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML

On Thu, 2009-02-05 at 20:19 +0100, Ingo Molnar wrote:

> Jaswinder, because they can break the build we should proactively drop all 
> architecture patches that do asm/types.h conversions.
> 
> I did build all the affected architectures via their defconfigs and they 
> built just fine - but i cannot do wide coverage testing of them.
> 
> So i think we should drop these bits:
> 
>  earth4:~/tip> gll --grep='asm/types.h' linus..core/header-fixes
>  1ff8f73: headers_check fix: xtensa, swab.h
>  4810987: headers_check fix: powerpc, swab.h
>  9f2cd96: headers_check fix: powerpc, kvm.h
>  785857f: headers_check fix: powerpc, elf.h
>  4be2c7f: headers_check fix: powerpc, bootx.h
>  726da1e: headers_check fix: parisc, swab.h
>  bef53ca: headers_check fix: mn10300, swab.h
>  a9f6acc: headers_check fix: mips, swab.h
>  d8cbec1: headers_check fix: m32r, swab.h
>  040c92b: headers_check fix: ia64, swab.h
>  6ce7950: headers_check fix: ia64, kvm.h
>  fa9ea6c: headers_check fix: ia64, fpu.h
>  295803e: headers_check fix: h8300, swab.h
>  dacd762: headers_check fix: frv, swab.h
>  350eb8b: headers_check fix: blackfin, swab.h
>  1c6ce70: headers_check fix: avr32, swab.h
>  e42ec24: headers_check fix: arm, swab.h
>  4af3bf6: headers_check fix: arm, setup.h
>  f100e6d: headers_check fix: arm, a.out.h
>  3fd5906: headers_check fix: alpha, swab.h
> 
> and send the rest to Linus if all outstanding observations have been 
> addressed. What do you think?
> 

The problem is if we include linux/types.h in assembly file we will get
error.

We can solve this problem by four options (or may be more):
1. by wrapping #ifndef __ASSEMBLY__ files which are used by assembly
code as suggested by Tony.

2. fix linux/types.h so that assembly file can also use it

3. drop patches which are used by assembly files

4. drop all architecture patches as you suggested.

Please do whatever seems best to you.

--
JSR


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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06  2:06       ` Jaswinder Singh Rajput
@ 2009-02-06  2:14         ` Mike Frysinger
  2009-02-06  2:20         ` Ingo Molnar
  1 sibling, 0 replies; 56+ messages in thread
From: Mike Frysinger @ 2009-02-06  2:14 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, Linus Torvalds, Tony Luck, Sam Ravnborg,
	Andrew Morton, Russell King - ARM Linux, hskinnemoen, cooloney,
	ralf, dhowells, matthew, chris, LKML

On Thu, Feb 5, 2009 at 21:06, Jaswinder Singh Rajput wrote:
> 2. fix linux/types.h so that assembly file can also use it

considering checkpatch.pl also whines about asm/types.h ->
linux/types.h, this sound reasonable.  have the file pull in
asm/types.h and wrap the rest of it in !__ASSEMBLY__ ...
-mike

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06  2:06       ` Jaswinder Singh Rajput
  2009-02-06  2:14         ` Mike Frysinger
@ 2009-02-06  2:20         ` Ingo Molnar
  2009-02-06 14:18           ` Jaswinder Singh Rajput
  1 sibling, 1 reply; 56+ messages in thread
From: Ingo Molnar @ 2009-02-06  2:20 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Linus Torvalds, Tony Luck, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML


* Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:

> On Thu, 2009-02-05 at 20:19 +0100, Ingo Molnar wrote:
> 
> > Jaswinder, because they can break the build we should proactively drop all 
> > architecture patches that do asm/types.h conversions.
> > 
> > I did build all the affected architectures via their defconfigs and they 
> > built just fine - but i cannot do wide coverage testing of them.
> > 
> > So i think we should drop these bits:
> > 
> >  earth4:~/tip> gll --grep='asm/types.h' linus..core/header-fixes
> >  1ff8f73: headers_check fix: xtensa, swab.h
> >  4810987: headers_check fix: powerpc, swab.h
> >  9f2cd96: headers_check fix: powerpc, kvm.h
> >  785857f: headers_check fix: powerpc, elf.h
> >  4be2c7f: headers_check fix: powerpc, bootx.h
> >  726da1e: headers_check fix: parisc, swab.h
> >  bef53ca: headers_check fix: mn10300, swab.h
> >  a9f6acc: headers_check fix: mips, swab.h
> >  d8cbec1: headers_check fix: m32r, swab.h
> >  040c92b: headers_check fix: ia64, swab.h
> >  6ce7950: headers_check fix: ia64, kvm.h
> >  fa9ea6c: headers_check fix: ia64, fpu.h
> >  295803e: headers_check fix: h8300, swab.h
> >  dacd762: headers_check fix: frv, swab.h
> >  350eb8b: headers_check fix: blackfin, swab.h
> >  1c6ce70: headers_check fix: avr32, swab.h
> >  e42ec24: headers_check fix: arm, swab.h
> >  4af3bf6: headers_check fix: arm, setup.h
> >  f100e6d: headers_check fix: arm, a.out.h
> >  3fd5906: headers_check fix: alpha, swab.h
> > 
> > and send the rest to Linus if all outstanding observations have been 
> > addressed. What do you think?
> > 
> 
> The problem is if we include linux/types.h in assembly file we will get
> error.
> 
> We can solve this problem by four options (or may be more):
> 1. by wrapping #ifndef __ASSEMBLY__ files which are used by assembly
> code as suggested by Tony.
> 
> 2. fix linux/types.h so that assembly file can also use it
> 
> 3. drop patches which are used by assembly files
> 
> 4. drop all architecture patches as you suggested.

hm, the highest quality approach seems to be #2, right?

	Ingo

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

* [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-01-31  7:10 [git pull -tip] headers_check fixes for other architectures Jaswinder Singh Rajput
  2009-01-31 16:44 ` Ingo Molnar
  2009-02-05 17:55 ` Tony Luck
@ 2009-02-06  8:19 ` KOSAKI Motohiro
  2009-02-06  8:53   ` Jaswinder Singh Rajput
  2009-02-06 13:42   ` Sam Ravnborg
  2 siblings, 2 replies; 56+ messages in thread
From: KOSAKI Motohiro @ 2009-02-06  8:19 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: kosaki.motohiro, Ingo Molnar, Linus Torvalds, Sam Ravnborg,
	Andrew Morton, Russell King - ARM Linux, hskinnemoen, cooloney,
	tony.luck, ralf, dhowells, matthew, chris, LKML, linux-next,
	linux-ia64, Tony Luck

> diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
> index 3859558..b6395ad 100644
> --- a/arch/ia64/include/asm/fpu.h
> +++ b/arch/ia64/include/asm/fpu.h
> @@ -6,7 +6,7 @@
>   *	David Mosberger-Tang <davidm@hpl.hp.com>
>   */
>  
> -#include <asm/types.h>
> +#include <linux/types.h>

this change break ia64 build perfectly.
this patch seems don't tested at all.

Ingo, I hope you ask patch author how to test posted patch ;-)

==
Subject: [PATCH] revert headers_check fix: ia64, fpu.h

commit fa9ea6c7abd94482ecd84e130676b6a1b3e61c2c break ia64 build perfectly.
it because ia64 has following include file dependency.

entry.S
 -> asm/processor.h
    -> asm/ptrace.h
       -> asm/fpu.h

Then, above commit introduce below dependency.

entry.S
 -> asm/processor.h
    -> asm/ptrace.h
       -> asm/fpu.h
          -> linux/types.h
             -> linux/posix_types.h
                -> linux/stddef.h

Then, assembler can't intepret following statement in stddef.h

enum {
        false   = 0,
        true    = 1
};


Therefore, >100 line tons error was outputed.


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-next <linux-next@vger.kernel.org>
Cc: linux-ia64 <linux-ia64@vger.kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
---
 arch/ia64/include/asm/fpu.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/arch/ia64/include/asm/fpu.h
===================================================================
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,7 +6,7 @@
  *	David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
-#include <linux/types.h>
+#include <asm/types.h>
 
 /* floating point status register: */
 #define FPSR_TRAP_VD	(1 << 0)	/* invalid op trap disabled */



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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06  8:19 ` [linux-next][PATCH] revert headers_check fix: ia64, fpu.h KOSAKI Motohiro
@ 2009-02-06  8:53   ` Jaswinder Singh Rajput
  2009-02-06  9:11     ` KOSAKI Motohiro
  2009-02-06 18:53     ` Luck, Tony
  2009-02-06 13:42   ` Sam Ravnborg
  1 sibling, 2 replies; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06  8:53 UTC (permalink / raw)
  To: KOSAKI Motohiro
  Cc: Jaswinder Singh Rajput, Ingo Molnar, Linus Torvalds,
	Sam Ravnborg, Andrew Morton, Russell King - ARM Linux,
	hskinnemoen, cooloney, tony.luck, ralf, dhowells, matthew, chris,
	LKML, linux-next, linux-ia64

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

On Fri, Feb 6, 2009 at 1:49 PM, KOSAKI Motohiro
<kosaki.motohiro@jp.fujitsu.com> wrote:
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-next <linux-next@vger.kernel.org>
> Cc: linux-ia64 <linux-ia64@vger.kernel.org>
> Cc: Tony Luck <tony.luck@intel.com>
> ---
>  arch/ia64/include/asm/fpu.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: b/arch/ia64/include/asm/fpu.h
> ===================================================================
> --- a/arch/ia64/include/asm/fpu.h
> +++ b/arch/ia64/include/asm/fpu.h
> @@ -6,7 +6,7 @@
>  *     David Mosberger-Tang <davidm@hpl.hp.com>
>  */
>
> -#include <linux/types.h>
> +#include <asm/types.h>
>

No , we do not even need asm/types.h

Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
for arch/ia64/include/asm/fpu.h

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/ia64/include/asm/fpu.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
index b6395ad..0c26157 100644
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,8 +6,6 @@
  *     David Mosberger-Tang <davidm@hpl.hp.com>
  */

-#include <linux/types.h>
-
 /* floating point status register: */
 #define FPSR_TRAP_VD   (1 << 0)        /* invalid op trap disabled */
 #define FPSR_TRAP_DD   (1 << 1)        /* denormal trap disabled */
-- 
1.6.1.1

[-- Attachment #2: 0001-Neither-asm-types.h-nor-linux-types.h-is-not-require.patch --]
[-- Type: text/x-patch, Size: 868 bytes --]

From 64e19dcc60cf9cd1455af5b0a9aaf45e7f00dde8 Mon Sep 17 00:00:00 2001
From: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Date: Fri, 6 Feb 2009 08:43:29 +0000
Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required for arch/ia64/include/asm/fpu.h

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/ia64/include/asm/fpu.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
index b6395ad..0c26157 100644
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,8 +6,6 @@
  *	David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
-#include <linux/types.h>
-
 /* floating point status register: */
 #define FPSR_TRAP_VD	(1 << 0)	/* invalid op trap disabled */
 #define FPSR_TRAP_DD	(1 << 1)	/* denormal trap disabled */
-- 
1.6.1.1


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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06  8:53   ` Jaswinder Singh Rajput
@ 2009-02-06  9:11     ` KOSAKI Motohiro
  2009-02-06 14:55       ` Ingo Molnar
  2009-02-06 18:53     ` Luck, Tony
  1 sibling, 1 reply; 56+ messages in thread
From: KOSAKI Motohiro @ 2009-02-06  9:11 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: kosaki.motohiro, Jaswinder Singh Rajput, Ingo Molnar,
	Linus Torvalds, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, tony.luck, ralf,
	dhowells, matthew, chris, LKML, linux-next, linux-ia64

> > Index: b/arch/ia64/include/asm/fpu.h
> > ===================================================================
> > --- a/arch/ia64/include/asm/fpu.h
> > +++ b/arch/ia64/include/asm/fpu.h
> > @@ -6,7 +6,7 @@
> >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> >  */
> >
> > -#include <linux/types.h>
> > +#include <asm/types.h>
> >
> 
> No , we do not even need asm/types.h
> 
> Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> for arch/ia64/include/asm/fpu.h
> 
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>

ok. I confirmed.
	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

thanks.


> ---
>  arch/ia64/include/asm/fpu.h |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
> index b6395ad..0c26157 100644
> --- a/arch/ia64/include/asm/fpu.h
> +++ b/arch/ia64/include/asm/fpu.h
> @@ -6,8 +6,6 @@
>   *     David Mosberger-Tang <davidm@hpl.hp.com>
>   */
> 
> -#include <linux/types.h>
> -
>  /* floating point status register: */
>  #define FPSR_TRAP_VD   (1 << 0)        /* invalid op trap disabled */
>  #define FPSR_TRAP_DD   (1 << 1)        /* denormal trap disabled */
> -- 
> 1.6.1.1




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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06  8:19 ` [linux-next][PATCH] revert headers_check fix: ia64, fpu.h KOSAKI Motohiro
  2009-02-06  8:53   ` Jaswinder Singh Rajput
@ 2009-02-06 13:42   ` Sam Ravnborg
  1 sibling, 0 replies; 56+ messages in thread
From: Sam Ravnborg @ 2009-02-06 13:42 UTC (permalink / raw)
  To: KOSAKI Motohiro
  Cc: Jaswinder Singh Rajput, Ingo Molnar, Linus Torvalds,
	Andrew Morton, Russell King - ARM Linux, hskinnemoen, cooloney,
	tony.luck, ralf, dhowells, matthew, chris, LKML, linux-next,
	linux-ia64

On Fri, Feb 06, 2009 at 05:19:00PM +0900, KOSAKI Motohiro wrote:
> > diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
> > index 3859558..b6395ad 100644
> > --- a/arch/ia64/include/asm/fpu.h
> > +++ b/arch/ia64/include/asm/fpu.h
> > @@ -6,7 +6,7 @@
> >   *	David Mosberger-Tang <davidm@hpl.hp.com>
> >   */
> >  
> > -#include <asm/types.h>
> > +#include <linux/types.h>
> 
> this change break ia64 build perfectly.
> this patch seems don't tested at all.
> 
> Ingo, I hope you ask patch author how to test posted patch ;-)

Patch author test the patch by adding it to a git tree that hits -next.
And this catched ths bug - so -next served its purpose.

	Sam

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06  2:20         ` Ingo Molnar
@ 2009-02-06 14:18           ` Jaswinder Singh Rajput
  2009-02-06 14:21             ` Russell King - ARM Linux
  2009-02-06 17:24             ` Sam Ravnborg
  0 siblings, 2 replies; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06 14:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Linus Torvalds, Tony Luck, Sam Ravnborg, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML

On Fri, 2009-02-06 at 03:20 +0100, Ingo Molnar wrote:
> * Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
> 
> > On Thu, 2009-02-05 at 20:19 +0100, Ingo Molnar wrote:
> > 
> > > Jaswinder, because they can break the build we should proactively drop all 
> > > architecture patches that do asm/types.h conversions.
> > > 
> > > I did build all the affected architectures via their defconfigs and they 
> > > built just fine - but i cannot do wide coverage testing of them.
> > > 
> > > So i think we should drop these bits:
> > > 
> > >  earth4:~/tip> gll --grep='asm/types.h' linus..core/header-fixes
> > >  1ff8f73: headers_check fix: xtensa, swab.h
> > >  4810987: headers_check fix: powerpc, swab.h
> > >  9f2cd96: headers_check fix: powerpc, kvm.h
> > >  785857f: headers_check fix: powerpc, elf.h
> > >  4be2c7f: headers_check fix: powerpc, bootx.h
> > >  726da1e: headers_check fix: parisc, swab.h
> > >  bef53ca: headers_check fix: mn10300, swab.h
> > >  a9f6acc: headers_check fix: mips, swab.h
> > >  d8cbec1: headers_check fix: m32r, swab.h
> > >  040c92b: headers_check fix: ia64, swab.h
> > >  6ce7950: headers_check fix: ia64, kvm.h
> > >  fa9ea6c: headers_check fix: ia64, fpu.h
> > >  295803e: headers_check fix: h8300, swab.h
> > >  dacd762: headers_check fix: frv, swab.h
> > >  350eb8b: headers_check fix: blackfin, swab.h
> > >  1c6ce70: headers_check fix: avr32, swab.h
> > >  e42ec24: headers_check fix: arm, swab.h
> > >  4af3bf6: headers_check fix: arm, setup.h
> > >  f100e6d: headers_check fix: arm, a.out.h
> > >  3fd5906: headers_check fix: alpha, swab.h
> > > 
> > > and send the rest to Linus if all outstanding observations have been 
> > > addressed. What do you think?
> > > 
> > 
> > The problem is if we include linux/types.h in assembly file we will get
> > error.
> > 
> > We can solve this problem by four options (or may be more):
> > 1. by wrapping #ifndef __ASSEMBLY__ files which are used by assembly
> > code as suggested by Tony.
> > 
> > 2. fix linux/types.h so that assembly file can also use it
> > 
> > 3. drop patches which are used by assembly files
> > 
> > 4. drop all architecture patches as you suggested.
> 
> hm, the highest quality approach seems to be #2, right?
> 

Is this safe OR we can make it more safer:

Subject: [PATCH] make linux/types.h as assembly safe

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 include/linux/types.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/linux/types.h b/include/linux/types.h
index 712ca53..c30973a 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -1,6 +1,7 @@
 #ifndef _LINUX_TYPES_H
 #define _LINUX_TYPES_H
 
+#ifndef __ASSEMBLY__
 #ifdef	__KERNEL__
 
 #define DECLARE_BITMAP(name,bits) \
@@ -212,5 +213,5 @@ struct ustat {
 };
 
 #endif	/* __KERNEL__ */
-
+#endif /*  __ASSEMBLY__ */
 #endif /* _LINUX_TYPES_H */
-- 
1.6.0.6




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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 14:18           ` Jaswinder Singh Rajput
@ 2009-02-06 14:21             ` Russell King - ARM Linux
  2009-02-06 14:34               ` Jaswinder Singh Rajput
  2009-02-06 17:24             ` Sam Ravnborg
  1 sibling, 1 reply; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 14:21 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, Linus Torvalds, Tony Luck, Sam Ravnborg,
	Andrew Morton, hskinnemoen, cooloney, ralf, dhowells, matthew,
	chris, LKML

On Fri, Feb 06, 2009 at 07:48:42PM +0530, Jaswinder Singh Rajput wrote:
> diff --git a/include/linux/types.h b/include/linux/types.h
> index 712ca53..c30973a 100644
> --- a/include/linux/types.h
> +++ b/include/linux/types.h
> @@ -1,6 +1,7 @@
>  #ifndef _LINUX_TYPES_H
>  #define _LINUX_TYPES_H
>  
> +#ifndef __ASSEMBLY__
>  #ifdef	__KERNEL__
>  
>  #define DECLARE_BITMAP(name,bits) \
> @@ -212,5 +213,5 @@ struct ustat {
>  };
>  
>  #endif	/* __KERNEL__ */
> -
> +#endif /*  __ASSEMBLY__ */
>  #endif /* _LINUX_TYPES_H */

So no point including this file in assembly with this patch - the ifndef
disables the entire file.

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 14:21             ` Russell King - ARM Linux
@ 2009-02-06 14:34               ` Jaswinder Singh Rajput
  2009-02-06 14:51                 ` Russell King - ARM Linux
  0 siblings, 1 reply; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06 14:34 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Ingo Molnar, Linus Torvalds, Tony Luck, Sam Ravnborg,
	Andrew Morton, hskinnemoen, cooloney, ralf, dhowells, matthew,
	chris, LKML

On Fri, 2009-02-06 at 14:21 +0000, Russell King - ARM Linux wrote:
> On Fri, Feb 06, 2009 at 07:48:42PM +0530, Jaswinder Singh Rajput wrote:
> > diff --git a/include/linux/types.h b/include/linux/types.h
> > index 712ca53..c30973a 100644
> > --- a/include/linux/types.h
> > +++ b/include/linux/types.h
> > @@ -1,6 +1,7 @@
> >  #ifndef _LINUX_TYPES_H
> >  #define _LINUX_TYPES_H
> >  
> > +#ifndef __ASSEMBLY__
> >  #ifdef	__KERNEL__
> >  
> >  #define DECLARE_BITMAP(name,bits) \
> > @@ -212,5 +213,5 @@ struct ustat {
> >  };
> >  
> >  #endif	/* __KERNEL__ */
> > -
> > +#endif /*  __ASSEMBLY__ */
> >  #endif /* _LINUX_TYPES_H */
> 
> So no point including this file in assembly with this patch - the ifndef
> disables the entire file.

Truth Table of linux/types.h :

If Assembly then N
otherwise Y

what your table says.

--
JSR



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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 14:34               ` Jaswinder Singh Rajput
@ 2009-02-06 14:51                 ` Russell King - ARM Linux
  2009-02-06 14:58                   ` Ingo Molnar
  2009-02-06 15:00                   ` Jaswinder Singh Rajput
  0 siblings, 2 replies; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 14:51 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, Linus Torvalds, Tony Luck, Sam Ravnborg,
	Andrew Morton, hskinnemoen, cooloney, ralf, dhowells, matthew,
	chris, LKML

On Fri, Feb 06, 2009 at 08:04:20PM +0530, Jaswinder Singh Rajput wrote:
> On Fri, 2009-02-06 at 14:21 +0000, Russell King - ARM Linux wrote:
> > On Fri, Feb 06, 2009 at 07:48:42PM +0530, Jaswinder Singh Rajput wrote:
> > > diff --git a/include/linux/types.h b/include/linux/types.h
> > > index 712ca53..c30973a 100644
> > > --- a/include/linux/types.h
> > > +++ b/include/linux/types.h
> > > @@ -1,6 +1,7 @@
> > >  #ifndef _LINUX_TYPES_H
> > >  #define _LINUX_TYPES_H
> > >  
> > > +#ifndef __ASSEMBLY__
> > >  #ifdef	__KERNEL__
> > >  
> > >  #define DECLARE_BITMAP(name,bits) \
> > > @@ -212,5 +213,5 @@ struct ustat {
> > >  };
> > >  
> > >  #endif	/* __KERNEL__ */
> > > -
> > > +#endif /*  __ASSEMBLY__ */
> > >  #endif /* _LINUX_TYPES_H */
> > 
> > So no point including this file in assembly with this patch - the ifndef
> > disables the entire file.
> 
> Truth Table of linux/types.h :
> 
> If Assembly then N
> otherwise Y
> 
> what your table says.

If the entire file is not suitable for assembly, don't include the file
in assembly files.  Nice and simple, and no need to add additional ifdefs.

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06  9:11     ` KOSAKI Motohiro
@ 2009-02-06 14:55       ` Ingo Molnar
  2009-02-06 15:29         ` Jaswinder Singh Rajput
  0 siblings, 1 reply; 56+ messages in thread
From: Ingo Molnar @ 2009-02-06 14:55 UTC (permalink / raw)
  To: KOSAKI Motohiro
  Cc: Jaswinder Singh Rajput, Jaswinder Singh Rajput, Linus Torvalds,
	Sam Ravnborg, Andrew Morton, Russell King - ARM Linux,
	hskinnemoen, cooloney, tony.luck, ralf, dhowells, matthew, chris,
	LKML, linux-next, linux-ia64


* KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:

> > > Index: b/arch/ia64/include/asm/fpu.h
> > > ===================================================================
> > > --- a/arch/ia64/include/asm/fpu.h
> > > +++ b/arch/ia64/include/asm/fpu.h
> > > @@ -6,7 +6,7 @@
> > >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> > >  */
> > >
> > > -#include <linux/types.h>
> > > +#include <asm/types.h>
> > >
> > 
> > No , we do not even need asm/types.h
> > 
> > Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> > for arch/ia64/include/asm/fpu.h
> > 
> > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> 
> ok. I confirmed.
> 	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> 	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

Thanks.

Jaswinder, mind adding these tags to the commit and sending a pull request 
with all fixes?

	Ingo

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 14:51                 ` Russell King - ARM Linux
@ 2009-02-06 14:58                   ` Ingo Molnar
  2009-02-06 15:00                   ` Jaswinder Singh Rajput
  1 sibling, 0 replies; 56+ messages in thread
From: Ingo Molnar @ 2009-02-06 14:58 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, Linus Torvalds, Tony Luck, Sam Ravnborg,
	Andrew Morton, hskinnemoen, cooloney, ralf, dhowells, matthew,
	chris, LKML


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> On Fri, Feb 06, 2009 at 08:04:20PM +0530, Jaswinder Singh Rajput wrote:
> > On Fri, 2009-02-06 at 14:21 +0000, Russell King - ARM Linux wrote:
> > > On Fri, Feb 06, 2009 at 07:48:42PM +0530, Jaswinder Singh Rajput wrote:
> > > > diff --git a/include/linux/types.h b/include/linux/types.h
> > > > index 712ca53..c30973a 100644
> > > > --- a/include/linux/types.h
> > > > +++ b/include/linux/types.h
> > > > @@ -1,6 +1,7 @@
> > > >  #ifndef _LINUX_TYPES_H
> > > >  #define _LINUX_TYPES_H
> > > >  
> > > > +#ifndef __ASSEMBLY__
> > > >  #ifdef	__KERNEL__
> > > >  
> > > >  #define DECLARE_BITMAP(name,bits) \
> > > > @@ -212,5 +213,5 @@ struct ustat {
> > > >  };
> > > >  
> > > >  #endif	/* __KERNEL__ */
> > > > -
> > > > +#endif /*  __ASSEMBLY__ */
> > > >  #endif /* _LINUX_TYPES_H */
> > > 
> > > So no point including this file in assembly with this patch - the ifndef
> > > disables the entire file.
> > 
> > Truth Table of linux/types.h :
> > 
> > If Assembly then N
> > otherwise Y
> > 
> > what your table says.
> 
> If the entire file is not suitable for assembly, don't include the file
> in assembly files.  Nice and simple, and no need to add additional ifdefs.

Well types.h easily gets included in other files though, which might be 
partially suited for assembly - and have !__ASSEMBLY__ portions that rely on 
a types.h include.

So making this file an invariant in .S files does not sound like a bad idea 
to me. Is there any downside?

	Ingo

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 14:51                 ` Russell King - ARM Linux
  2009-02-06 14:58                   ` Ingo Molnar
@ 2009-02-06 15:00                   ` Jaswinder Singh Rajput
  2009-02-06 15:10                     ` Russell King - ARM Linux
  1 sibling, 1 reply; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06 15:00 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Ingo Molnar, Linus Torvalds, Tony Luck, Sam Ravnborg,
	Andrew Morton, hskinnemoen, cooloney, ralf, dhowells, matthew,
	chris, LKML

On Fri, 2009-02-06 at 14:51 +0000, Russell King - ARM Linux wrote:
> > > 
> > > So no point including this file in assembly with this patch - the ifndef
> > > disables the entire file.
> > 
> > Truth Table of linux/types.h :
> > 
> > If Assembly then N
> > otherwise Y
> > 
> > what your table says.
> 
> If the entire file is not suitable for assembly, don't include the file
> in assembly files.  Nice and simple, and no need to add additional ifdefs.

Ahh, so your truth table says:

If Assembly then make different header files
If C then make another header files

Do not you think your truth table is complex and very difficult to
handle and maintain ?

Can we make things simple and easier.

Thanks,
--
JSR



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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 15:00                   ` Jaswinder Singh Rajput
@ 2009-02-06 15:10                     ` Russell King - ARM Linux
  2009-02-06 15:56                       ` Ingo Molnar
  0 siblings, 1 reply; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 15:10 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, Linus Torvalds, Tony Luck, Sam Ravnborg,
	Andrew Morton, hskinnemoen, cooloney, ralf, dhowells, matthew,
	chris, LKML

On Fri, Feb 06, 2009 at 08:30:07PM +0530, Jaswinder Singh Rajput wrote:
> On Fri, 2009-02-06 at 14:51 +0000, Russell King - ARM Linux wrote:
> > > > 
> > > > So no point including this file in assembly with this patch - the ifndef
> > > > disables the entire file.
> > > 
> > > Truth Table of linux/types.h :
> > > 
> > > If Assembly then N
> > > otherwise Y
> > > 
> > > what your table says.
> > 
> > If the entire file is not suitable for assembly, don't include the file
> > in assembly files.  Nice and simple, and no need to add additional ifdefs.
> 
> Ahh, so your truth table says:
> 
> If Assembly then make different header files
> If C then make another header files

No.  My point is exactly as I stated above, please don't twist my
statement into something that it isn't.

Taking this further, if you're including linux/types.h into another
header file, you're including it because you want some C type from
that or an included file.  Use of that type is also not ASM friendly,
so the use is going to have to be excluded by ifndef in that header.

So why not do as we *already* do and ensure that the linux/types.h
inclusion happens within that section.

Why change the rules?

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 14:55       ` Ingo Molnar
@ 2009-02-06 15:29         ` Jaswinder Singh Rajput
  2009-02-06 15:33           ` Russell King - ARM Linux
  0 siblings, 1 reply; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06 15:29 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: KOSAKI Motohiro, Jaswinder Singh Rajput, Linus Torvalds,
	Sam Ravnborg, Andrew Morton, Russell King - ARM Linux,
	hskinnemoen, cooloney, tony.luck, ralf, dhowells, matthew, chris,
	LKML, linux-next, linux-ia64

On Fri, 2009-02-06 at 15:55 +0100, Ingo Molnar wrote:
> * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> 
> > > > Index: b/arch/ia64/include/asm/fpu.h
> > > > ===================================================================
> > > > --- a/arch/ia64/include/asm/fpu.h
> > > > +++ b/arch/ia64/include/asm/fpu.h
> > > > @@ -6,7 +6,7 @@
> > > >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> > > >  */
> > > >
> > > > -#include <linux/types.h>
> > > > +#include <asm/types.h>
> > > >
> > > 
> > > No , we do not even need asm/types.h
> > > 
> > > Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> > > for arch/ia64/include/asm/fpu.h
> > > 
> > > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > 
> > ok. I confirmed.
> > 	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > 	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> 
> Thanks.
> 
> Jaswinder, mind adding these tags to the commit and sending a pull request 
> with all fixes?

The following changes since commit 0b86a4e34d885e734a4c4e46293376f3f1c639eb:
  Ingo Molnar (1):
        Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes

Jaswinder Singh Rajput (2):
      Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
      make linux/types.h as assembly safe

 arch/ia64/include/asm/fpu.h |    2 --
 include/linux/types.h       |    3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)

Complete diff:
diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h
index b6395ad..0c26157 100644
--- a/arch/ia64/include/asm/fpu.h
+++ b/arch/ia64/include/asm/fpu.h
@@ -6,8 +6,6 @@
  *	David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
-#include <linux/types.h>
-
 /* floating point status register: */
 #define FPSR_TRAP_VD	(1 << 0)	/* invalid op trap disabled */
 #define FPSR_TRAP_DD	(1 << 1)	/* denormal trap disabled */
diff --git a/include/linux/types.h b/include/linux/types.h
index 712ca53..c30973a 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -1,6 +1,7 @@
 #ifndef _LINUX_TYPES_H
 #define _LINUX_TYPES_H
 
+#ifndef __ASSEMBLY__
 #ifdef	__KERNEL__
 
 #define DECLARE_BITMAP(name,bits) \
@@ -212,5 +213,5 @@ struct ustat {
 };
 
 #endif	/* __KERNEL__ */
-
+#endif /*  __ASSEMBLY__ */
 #endif /* _LINUX_TYPES_H */



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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:29         ` Jaswinder Singh Rajput
@ 2009-02-06 15:33           ` Russell King - ARM Linux
  2009-02-06 15:45             ` Ingo Molnar
  2009-02-06 15:48             ` Jaswinder Singh Rajput
  0 siblings, 2 replies; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 15:33 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> On Fri, 2009-02-06 at 15:55 +0100, Ingo Molnar wrote:
> > * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > 
> > > > > Index: b/arch/ia64/include/asm/fpu.h
> > > > > ===================================================================
> > > > > --- a/arch/ia64/include/asm/fpu.h
> > > > > +++ b/arch/ia64/include/asm/fpu.h
> > > > > @@ -6,7 +6,7 @@
> > > > >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> > > > >  */
> > > > >
> > > > > -#include <linux/types.h>
> > > > > +#include <asm/types.h>
> > > > >
> > > > 
> > > > No , we do not even need asm/types.h
> > > > 
> > > > Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> > > > for arch/ia64/include/asm/fpu.h
> > > > 
> > > > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > > 
> > > ok. I confirmed.
> > > 	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > > 	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > 
> > Thanks.
> > 
> > Jaswinder, mind adding these tags to the commit and sending a pull request 
> > with all fixes?
> 
> The following changes since commit 0b86a4e34d885e734a4c4e46293376f3f1c639eb:
>   Ingo Molnar (1):
>         Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes
> 
> Jaswinder Singh Rajput (2):
>       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
>       make linux/types.h as assembly safe

I continue to disagree with the need for the second patch.

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:33           ` Russell King - ARM Linux
@ 2009-02-06 15:45             ` Ingo Molnar
  2009-02-06 15:49               ` Russell King - ARM Linux
  2009-02-06 15:48             ` Jaswinder Singh Rajput
  1 sibling, 1 reply; 56+ messages in thread
From: Ingo Molnar @ 2009-02-06 15:45 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > On Fri, 2009-02-06 at 15:55 +0100, Ingo Molnar wrote:
> > > * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > > 
> > > > > > Index: b/arch/ia64/include/asm/fpu.h
> > > > > > ===================================================================
> > > > > > --- a/arch/ia64/include/asm/fpu.h
> > > > > > +++ b/arch/ia64/include/asm/fpu.h
> > > > > > @@ -6,7 +6,7 @@
> > > > > >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> > > > > >  */
> > > > > >
> > > > > > -#include <linux/types.h>
> > > > > > +#include <asm/types.h>
> > > > > >
> > > > > 
> > > > > No , we do not even need asm/types.h
> > > > > 
> > > > > Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> > > > > for arch/ia64/include/asm/fpu.h
> > > > > 
> > > > > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > > > 
> > > > ok. I confirmed.
> > > > 	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > > > 	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > > 
> > > Thanks.
> > > 
> > > Jaswinder, mind adding these tags to the commit and sending a pull request 
> > > with all fixes?
> > 
> > The following changes since commit 0b86a4e34d885e734a4c4e46293376f3f1c639eb:
> >   Ingo Molnar (1):
> >         Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes
> > 
> > Jaswinder Singh Rajput (2):
> >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> >       make linux/types.h as assembly safe
> 
> I continue to disagree with the need for the second patch.

But have not replied to my mail about that so far.

Why is it wrong to make types.h an assembly-invariant? It is positively 
helpful for mixed-mode headers and has no downsides whatsoever.

	Ingo

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:33           ` Russell King - ARM Linux
  2009-02-06 15:45             ` Ingo Molnar
@ 2009-02-06 15:48             ` Jaswinder Singh Rajput
  2009-02-06 15:55               ` Russell King - ARM Linux
  1 sibling, 1 reply; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06 15:48 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Ingo Molnar, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, 2009-02-06 at 15:33 +0000, Russell King - ARM Linux wrote:
> On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > On Fri, 2009-02-06 at 15:55 +0100, Ingo Molnar wrote:
> > > * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > > 
> > > > > > Index: b/arch/ia64/include/asm/fpu.h
> > > > > > ===================================================================
> > > > > > --- a/arch/ia64/include/asm/fpu.h
> > > > > > +++ b/arch/ia64/include/asm/fpu.h
> > > > > > @@ -6,7 +6,7 @@
> > > > > >  *     David Mosberger-Tang <davidm@hpl.hp.com>
> > > > > >  */
> > > > > >
> > > > > > -#include <linux/types.h>
> > > > > > +#include <asm/types.h>
> > > > > >
> > > > > 
> > > > > No , we do not even need asm/types.h
> > > > > 
> > > > > Subject: [PATCH] Neither asm/types.h nor linux/types.h is not required
> > > > > for arch/ia64/include/asm/fpu.h
> > > > > 
> > > > > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > > > 
> > > > ok. I confirmed.
> > > > 	Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > > > 	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > > 
> > > Thanks.
> > > 
> > > Jaswinder, mind adding these tags to the commit and sending a pull request 
> > > with all fixes?
> > 
> > The following changes since commit 0b86a4e34d885e734a4c4e46293376f3f1c639eb:
> >   Ingo Molnar (1):
> >         Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes
> > 
> > Jaswinder Singh Rajput (2):
> >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> >       make linux/types.h as assembly safe
> 
> I continue to disagree with the need for the second patch.

Like Ingo suggested:

On Fri, 2009-02-06 at 15:58 +0100, Ingo Molnar wrote:
>  Well types.h easily gets included in other files though, which might be 
> partially suited for assembly - and have !__ASSEMBLY__ portions that rely on 
> a types.h include.
> 
> So making this file an invariant in .S files does not sound like a bad idea 
> to me. Is there any downside?
> 

We cannot see any downside of this patch.

But we can see upside of this patch is:
1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
files
2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.

Thanks,

--
JSR



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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:45             ` Ingo Molnar
@ 2009-02-06 15:49               ` Russell King - ARM Linux
  2009-02-06 16:01                 ` Ingo Molnar
  0 siblings, 1 reply; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 15:49 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 04:45:39PM +0100, Ingo Molnar wrote:
> 
> * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> 
> > On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > > Jaswinder Singh Rajput (2):
> > >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> > >       make linux/types.h as assembly safe
> > 
> > I continue to disagree with the need for the second patch.
> 
> But have not replied to my mail about that so far.

Sigh.  No I didn't - because I also got a reply from Jaswinder and
covered all points in _that_ reply.

Would you like me to re-send my reply so that you can appear in the To:
header?

Stop making this discussion stupidly obtuse.

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:48             ` Jaswinder Singh Rajput
@ 2009-02-06 15:55               ` Russell King - ARM Linux
  2009-02-06 16:12                 ` Ingo Molnar
  2009-02-06 17:32                 ` Sam Ravnborg
  0 siblings, 2 replies; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 15:55 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 09:18:48PM +0530, Jaswinder Singh Rajput wrote:
> On Fri, 2009-02-06 at 15:33 +0000, Russell King - ARM Linux wrote:
> > On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > > Jaswinder Singh Rajput (2):
> > >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> > >       make linux/types.h as assembly safe
> > 
> > I continue to disagree with the need for the second patch.
> 
> Like Ingo suggested:
> 
> On Fri, 2009-02-06 at 15:58 +0100, Ingo Molnar wrote:
> >  Well types.h easily gets included in other files though, which might be 
> > partially suited for assembly - and have !__ASSEMBLY__ portions that rely on 
> > a types.h include.
> > 
> > So making this file an invariant in .S files does not sound like a bad idea 
> > to me. Is there any downside?
> > 
> 
> We cannot see any downside of this patch.
> 
> But we can see upside of this patch is:
> 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> files
> 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.

The point is:

1. If the parent include needs to include linux/types.h to get at C
   types _and_ the include file needs to also be included by assembly
   code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
   uses from the assembly code.

   In that case, the linux/types.h include should be contained within
   the #ifndef __ASSEMBLY__ .. #endif block along with all C only
   parts of the header file.

2. if it doesn't need C types from linux/types.h, then that header has
   no business including linux/types.h, and the include should be
   eliminated to save the already dirbolically slow compiler from
   having to read and parse that file, and more importantly allowing
   it to eliminate linux/types.h from the build dependencies.

Yes, you can wrap linux/types.h with that ifndef, and yes it will fix
any problems, but I view it as a hack rather than fixing the real problem
which is lazyness by code writers to get their include dependencies right.

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 15:10                     ` Russell King - ARM Linux
@ 2009-02-06 15:56                       ` Ingo Molnar
  2009-02-06 16:02                         ` Russell King - ARM Linux
  0 siblings, 1 reply; 56+ messages in thread
From: Ingo Molnar @ 2009-02-06 15:56 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, Linus Torvalds, Tony Luck, Sam Ravnborg,
	Andrew Morton, hskinnemoen, cooloney, ralf, dhowells, matthew,
	chris, LKML


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> Taking this further, if you're including linux/types.h into another
> header file, you're including it because you want some C type from
> that or an included file.  Use of that type is also not ASM friendly,
> so the use is going to have to be excluded by ifndef in that header.

There's a ton of header files that can be included in assembly code and 
which also contain C declarations and definitions. This is achieved by 
adding a:

 #ifndef __ASSEMBLY__
 #endif

Blocks around the C code. Especially for smallish or single-purpose files 
this is often a cleaner method than splitting the file.

There's more than 40 such headers on x86 alone.

	Ingo

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:49               ` Russell King - ARM Linux
@ 2009-02-06 16:01                 ` Ingo Molnar
  0 siblings, 0 replies; 56+ messages in thread
From: Ingo Molnar @ 2009-02-06 16:01 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> On Fri, Feb 06, 2009 at 04:45:39PM +0100, Ingo Molnar wrote:
> > 
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > 
> > > On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > > > Jaswinder Singh Rajput (2):
> > > >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> > > >       make linux/types.h as assembly safe
> > > 
> > > I continue to disagree with the need for the second patch.
> > 
> > But have not replied to my mail about that so far.
> 
> Sigh.  No I didn't - because I also got a reply from Jaswinder and
> covered all points in _that_ reply.
> 
> Would you like me to re-send my reply so that you can appear in the To:
> header?
> 
> Stop making this discussion stupidly obtuse.

I am not making anything stupidly obtuse, your reply to Jaswinder was in a 
different (but related) portion of the thread, that i have not read yet at 
that point. I have read it now and have replied.

	Ingo

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 15:56                       ` Ingo Molnar
@ 2009-02-06 16:02                         ` Russell King - ARM Linux
  0 siblings, 0 replies; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 16:02 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, Linus Torvalds, Tony Luck, Sam Ravnborg,
	Andrew Morton, hskinnemoen, cooloney, ralf, dhowells, matthew,
	chris, LKML

On Fri, Feb 06, 2009 at 04:56:24PM +0100, Ingo Molnar wrote:
> 
> * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> 
> > Taking this further, if you're including linux/types.h into another
> > header file, you're including it because you want some C type from
> > that or an included file.  Use of that type is also not ASM friendly,
> > so the use is going to have to be excluded by ifndef in that header.
> 
> There's a ton of header files that can be included in assembly code and 
> which also contain C declarations and definitions. This is achieved by 
> adding a:
> 
>  #ifndef __ASSEMBLY__
>  #endif
> 
> Blocks around the C code. Especially for smallish or single-purpose files 
> this is often a cleaner method than splitting the file.

Err, yes, thank you for justifying my point.

And no, I didn't say anything about splitting files.  Not sure why you
brought that up.

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:55               ` Russell King - ARM Linux
@ 2009-02-06 16:12                 ` Ingo Molnar
  2009-02-06 16:23                   ` Russell King - ARM Linux
  2009-02-06 17:32                 ` Sam Ravnborg
  1 sibling, 1 reply; 56+ messages in thread
From: Ingo Molnar @ 2009-02-06 16:12 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> > We cannot see any downside of this patch.
> > 
> > But we can see upside of this patch is:
> > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > files
> > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> 
> The point is:
> 
> 1. If the parent include needs to include linux/types.h to get at C
>    types _and_ the include file needs to also be included by assembly
>    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
>    uses from the assembly code.
> 
>    In that case, the linux/types.h include should be contained within
>    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
>    parts of the header file.

That makes the code much less clean: putting #include's in the middle of a 
header is poor style and leads to people failing to consider dependencies. 
We generally put them to the header portion.

Putting an #include line in the middle of a header file is a receipe for a 
dependency hell (it can easily fall inside #ifdefs, can be overlooked, 
etc.), so it's _strongly_ discouraged (at least on arch/x86).

> 2. if it doesn't need C types from linux/types.h, then that header has
>    no business including linux/types.h, and the include should be
>    eliminated to save the already dirbolically slow compiler from
>    having to read and parse that file, and more importantly allowing
>    it to eliminate linux/types.h from the build dependencies.
> 
> Yes, you can wrap linux/types.h with that ifndef, and yes it will fix any 
> problems, but I view it as a hack rather than fixing the real problem 
> which is lazyness by code writers to get their include dependencies right.

It is not about include dependencies at all - it is about the existing and 
accepted practice which you did not consider in your argument: the use of 
mixed-mode headers. A linux/types.h include there is perfectly clean and 
should not break the build.

Again, i repeat: there is nothing wrong about making a small number of very 
commonly used C header assembly-invariant. It results in better structured 
header files and cleaner code.

The argument is as simple as that, and up until this email you wrote roughly 
10 replies and it's not even that you disagreed with our point on some 
honest basis that we could argue with - the ting is that you failed to even 
_realize_ this argument of us and you tried to force your partial (and 
trivially flawed) world view on us impatiently. In view of that you need to 
be more careful before calling people 'stupidly obtuse' ;-)

	Ingo

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 16:12                 ` Ingo Molnar
@ 2009-02-06 16:23                   ` Russell King - ARM Linux
  2009-02-06 16:33                     ` Ingo Molnar
  0 siblings, 1 reply; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 16:23 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 05:12:29PM +0100, Ingo Molnar wrote:
> 
> * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> 
> > > We cannot see any downside of this patch.
> > > 
> > > But we can see upside of this patch is:
> > > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > > files
> > > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> > 
> > The point is:
> > 
> > 1. If the parent include needs to include linux/types.h to get at C
> >    types _and_ the include file needs to also be included by assembly
> >    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
> >    uses from the assembly code.
> > 
> >    In that case, the linux/types.h include should be contained within
> >    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
> >    parts of the header file.
> 
> That makes the code much less clean: putting #include's in the middle of a 
> header is poor style and leads to people failing to consider dependencies. 
> We generally put them to the header portion.
> 
> Putting an #include line in the middle of a header file is a receipe for a 
> dependency hell (it can easily fall inside #ifdefs, can be overlooked, 
> etc.), so it's _strongly_ discouraged (at least on arch/x86).

Put them at the top then with an additional ifndef.

> > 2. if it doesn't need C types from linux/types.h, then that header has
> >    no business including linux/types.h, and the include should be
> >    eliminated to save the already dirbolically slow compiler from
> >    having to read and parse that file, and more importantly allowing
> >    it to eliminate linux/types.h from the build dependencies.
> > 
> > Yes, you can wrap linux/types.h with that ifndef, and yes it will fix any 
> > problems, but I view it as a hack rather than fixing the real problem 
> > which is lazyness by code writers to get their include dependencies right.
> 
> It is not about include dependencies at all - it is about the existing and 
> accepted practice which you did not consider in your argument: the use of 
> mixed-mode headers. A linux/types.h include there is perfectly clean and 
> should not break the build.

It _is_ about include dependencies.

> Again, i repeat: there is nothing wrong about making a small number of very 
> commonly used C header assembly-invariant. It results in better structured 
> header files and cleaner code.
> 
> The argument is as simple as that, and up until this email you wrote roughly 
> 10 replies and it's not even that you disagreed with our point on some 
> honest basis that we could argue with - the ting is that you failed to even 
> _realize_ this argument of us and you tried to force your partial (and 
> trivially flawed) world view on us impatiently. In view of that you need to 
> be more careful before calling people 'stupidly obtuse' ;-)

If you think that I'm ignoring your argument, then screw you.

I'm making a counter argument which I believe is _equally_ valid and which
I believe is actually far more important - at least it is _to_ _me_.

I don't wish to see my build times extended any more than they already
have been by sloppy and lazy programming in the kernel.  And if I didn't
make that point earlier, what a shame.  I'm making it NOW.

I've been trying over the last six months to (a) reduce the number of
files included in the ARM sub-tree and (b) reduce the namespace pollution
from ARM headers into the generic kernel both with the aim of trying to
improve build time.  That's something you can verify by looking through
the commits in arch/arm/include/asm if you think I'm making this up,
which clearly you will do.

Oh why bring it up after 11 replies.  I guess I'm just useless at
expressing myself clearly.

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 16:23                   ` Russell King - ARM Linux
@ 2009-02-06 16:33                     ` Ingo Molnar
  2009-02-06 16:38                       ` Russell King - ARM Linux
  0 siblings, 1 reply; 56+ messages in thread
From: Ingo Molnar @ 2009-02-06 16:33 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> On Fri, Feb 06, 2009 at 05:12:29PM +0100, Ingo Molnar wrote:
> > 
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > 
> > > > We cannot see any downside of this patch.
> > > > 
> > > > But we can see upside of this patch is:
> > > > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > > > files
> > > > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> > > 
> > > The point is:
> > > 
> > > 1. If the parent include needs to include linux/types.h to get at C
> > >    types _and_ the include file needs to also be included by assembly
> > >    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
> > >    uses from the assembly code.
> > > 
> > >    In that case, the linux/types.h include should be contained within
> > >    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
> > >    parts of the header file.
> > 
> > That makes the code much less clean: putting #include's in the middle of a 
> > header is poor style and leads to people failing to consider dependencies. 
> > We generally put them to the header portion.
> > 
> > Putting an #include line in the middle of a header file is a receipe for a 
> > dependency hell (it can easily fall inside #ifdefs, can be overlooked, 
> > etc.), so it's _strongly_ discouraged (at least on arch/x86).
> 
> Put them at the top then with an additional ifndef.

So you advocate 40 stupid pairs of #ifdefs spread out, instead of a 
_single_, obvious #ifdef in a commonly used header?

Case closed.

	Ingo

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 16:33                     ` Ingo Molnar
@ 2009-02-06 16:38                       ` Russell King - ARM Linux
  2009-02-06 17:14                         ` Ingo Molnar
  0 siblings, 1 reply; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 16:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 05:33:14PM +0100, Ingo Molnar wrote:
> 
> * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> 
> > On Fri, Feb 06, 2009 at 05:12:29PM +0100, Ingo Molnar wrote:
> > > 
> > > * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > > 
> > > > > We cannot see any downside of this patch.
> > > > > 
> > > > > But we can see upside of this patch is:
> > > > > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > > > > files
> > > > > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> > > > 
> > > > The point is:
> > > > 
> > > > 1. If the parent include needs to include linux/types.h to get at C
> > > >    types _and_ the include file needs to also be included by assembly
> > > >    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
> > > >    uses from the assembly code.
> > > > 
> > > >    In that case, the linux/types.h include should be contained within
> > > >    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
> > > >    parts of the header file.
> > > 
> > > That makes the code much less clean: putting #include's in the middle of a 
> > > header is poor style and leads to people failing to consider dependencies. 
> > > We generally put them to the header portion.
> > > 
> > > Putting an #include line in the middle of a header file is a receipe for a 
> > > dependency hell (it can easily fall inside #ifdefs, can be overlooked, 
> > > etc.), so it's _strongly_ discouraged (at least on arch/x86).
> > 
> > Put them at the top then with an additional ifndef.
> 
> So you advocate 40 stupid pairs of #ifdefs spread out, instead of a 
> _single_, obvious #ifdef in a commonly used header?

As I see it, if you want all your style points to be adhered to, then yes.
And I do believe it to be a valid solution.

Personally, I'd put them nearer the C code.

That's precisely what I do with the ARM include files.  Never been a
problem.

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 16:38                       ` Russell King - ARM Linux
@ 2009-02-06 17:14                         ` Ingo Molnar
  2009-02-06 17:22                           ` Russell King - ARM Linux
  0 siblings, 1 reply; 56+ messages in thread
From: Ingo Molnar @ 2009-02-06 17:14 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64


* Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> On Fri, Feb 06, 2009 at 05:33:14PM +0100, Ingo Molnar wrote:
> > 
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > 
> > > On Fri, Feb 06, 2009 at 05:12:29PM +0100, Ingo Molnar wrote:
> > > > 
> > > > * Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > > > 
> > > > > > We cannot see any downside of this patch.
> > > > > > 
> > > > > > But we can see upside of this patch is:
> > > > > > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > > > > > files
> > > > > > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> > > > > 
> > > > > The point is:
> > > > > 
> > > > > 1. If the parent include needs to include linux/types.h to get at C
> > > > >    types _and_ the include file needs to also be included by assembly
> > > > >    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
> > > > >    uses from the assembly code.
> > > > > 
> > > > >    In that case, the linux/types.h include should be contained within
> > > > >    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
> > > > >    parts of the header file.
> > > > 
> > > > That makes the code much less clean: putting #include's in the middle of a 
> > > > header is poor style and leads to people failing to consider dependencies. 
> > > > We generally put them to the header portion.
> > > > 
> > > > Putting an #include line in the middle of a header file is a receipe for a 
> > > > dependency hell (it can easily fall inside #ifdefs, can be overlooked, 
> > > > etc.), so it's _strongly_ discouraged (at least on arch/x86).
> > > 
> > > Put them at the top then with an additional ifndef.
> > 
> > So you advocate 40 stupid pairs of #ifdefs spread out, instead of a 
> > _single_, obvious #ifdef in a commonly used header?
> 
> As I see it, if you want all your style points to be adhered to, then yes.
> And I do believe it to be a valid solution.
> 
> Personally, I'd put them nearer the C code.
> 
> That's precisely what I do with the ARM include files.  Never been a
> problem.

I take this that you kind of agree that that removing ugly #ifdefs spread 
out is an upside. You failed to point out any downsides - you just seem to 
claim that you can live without the upsides. That is fine.

	Ingo

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 17:14                         ` Ingo Molnar
@ 2009-02-06 17:22                           ` Russell King - ARM Linux
  0 siblings, 0 replies; 56+ messages in thread
From: Russell King - ARM Linux @ 2009-02-06 17:22 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Jaswinder Singh Rajput, KOSAKI Motohiro, Jaswinder Singh Rajput,
	Linus Torvalds, Sam Ravnborg, Andrew Morton, hskinnemoen,
	cooloney, tony.luck, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

On Fri, Feb 06, 2009 at 06:14:00PM +0100, Ingo Molnar wrote:
> I take this that you kind of agree that that removing ugly #ifdefs spread 
> out is an upside. You failed to point out any downsides - you just seem to 
> claim that you can live without the upsides. That is fine.

I'm sorry, I thought I pointed them out in my previous emails.  Clearly
you didn't read those emails in spite of replying to them.

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 14:18           ` Jaswinder Singh Rajput
  2009-02-06 14:21             ` Russell King - ARM Linux
@ 2009-02-06 17:24             ` Sam Ravnborg
  2009-02-06 17:40               ` Ingo Molnar
                                 ` (2 more replies)
  1 sibling, 3 replies; 56+ messages in thread
From: Sam Ravnborg @ 2009-02-06 17:24 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, Linus Torvalds, Tony Luck, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML

> 
> Is this safe OR we can make it more safer:
> 
> Subject: [PATCH] make linux/types.h as assembly safe
> 
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> ---
>  include/linux/types.h |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/types.h b/include/linux/types.h
> index 712ca53..c30973a 100644
> --- a/include/linux/types.h
> +++ b/include/linux/types.h
> @@ -1,6 +1,7 @@
>  #ifndef _LINUX_TYPES_H
>  #define _LINUX_TYPES_H
>  
> +#ifndef __ASSEMBLY__
>  #ifdef	__KERNEL__
>  
>  #define DECLARE_BITMAP(name,bits) \
> @@ -212,5 +213,5 @@ struct ustat {
>  };
>  
>  #endif	/* __KERNEL__ */
> -
> +#endif /*  __ASSEMBLY__ */
>  #endif /* _LINUX_TYPES_H */

This is wrong...
We should include the assumed assembly safe asm/types.h
outside the __ASEMBLY__ ifdef.

	Sam

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 15:55               ` Russell King - ARM Linux
  2009-02-06 16:12                 ` Ingo Molnar
@ 2009-02-06 17:32                 ` Sam Ravnborg
  2009-02-06 17:41                   ` Ingo Molnar
  1 sibling, 1 reply; 56+ messages in thread
From: Sam Ravnborg @ 2009-02-06 17:32 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jaswinder Singh Rajput, Ingo Molnar, KOSAKI Motohiro,
	Jaswinder Singh Rajput, Linus Torvalds, Andrew Morton,
	hskinnemoen, cooloney, tony.luck, ralf, dhowells, matthew, chris,
	LKML, linux-next, linux-ia64

On Fri, Feb 06, 2009 at 03:55:12PM +0000, Russell King - ARM Linux wrote:
> On Fri, Feb 06, 2009 at 09:18:48PM +0530, Jaswinder Singh Rajput wrote:
> > On Fri, 2009-02-06 at 15:33 +0000, Russell King - ARM Linux wrote:
> > > On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > > > Jaswinder Singh Rajput (2):
> > > >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> > > >       make linux/types.h as assembly safe
> > > 
> > > I continue to disagree with the need for the second patch.
> > 
> > Like Ingo suggested:
> > 
> > On Fri, 2009-02-06 at 15:58 +0100, Ingo Molnar wrote:
> > >  Well types.h easily gets included in other files though, which might be 
> > > partially suited for assembly - and have !__ASSEMBLY__ portions that rely on 
> > > a types.h include.
> > > 
> > > So making this file an invariant in .S files does not sound like a bad idea 
> > > to me. Is there any downside?
> > > 
> > 
> > We cannot see any downside of this patch.
> > 
> > But we can see upside of this patch is:
> > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > files
> > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> 
> The point is:
> 
> 1. If the parent include needs to include linux/types.h to get at C
>    types _and_ the include file needs to also be included by assembly
>    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
>    uses from the assembly code.
> 
>    In that case, the linux/types.h include should be contained within
>    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
>    parts of the header file.
> 
> 2. if it doesn't need C types from linux/types.h, then that header has
>    no business including linux/types.h, and the include should be
>    eliminated to save the already dirbolically slow compiler from
>    having to read and parse that file, and more importantly allowing
>    it to eliminate linux/types.h from the build dependencies.
> 
> Yes, you can wrap linux/types.h with that ifndef, and yes it will fix
> any problems, but I view it as a hack rather than fixing the real problem
> which is lazyness by code writers to get their include dependencies right.

You guys are getting this wrong.
The patch from Jaswinder needs to be fixed so we unconditionally
include <asm/types.h> from linux/types.h.
And then ll users can safely include linux/types.h and when we one
day realize we can move some stuff used in .S files from
asm/types.h to linux/types.h then we are all safe and no breakage.

the rule of thum is to include the linux/* variant if the same
file exist in both linus/ and asm/ and types.h is in no way different
here

And trying to make it different just becasue it is used in userspace
intensively is just stupid and will be a cause of misunderstandings.

	Sam

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 17:24             ` Sam Ravnborg
@ 2009-02-06 17:40               ` Ingo Molnar
  2009-02-06 18:11               ` Jaswinder Singh Rajput
  2009-02-08  5:50               ` Jaswinder Singh Rajput
  2 siblings, 0 replies; 56+ messages in thread
From: Ingo Molnar @ 2009-02-06 17:40 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Jaswinder Singh Rajput, Linus Torvalds, Tony Luck, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML


* Sam Ravnborg <sam@ravnborg.org> wrote:

> > 
> > Is this safe OR we can make it more safer:
> > 
> > Subject: [PATCH] make linux/types.h as assembly safe
> > 
> > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > ---
> >  include/linux/types.h |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/include/linux/types.h b/include/linux/types.h
> > index 712ca53..c30973a 100644
> > --- a/include/linux/types.h
> > +++ b/include/linux/types.h
> > @@ -1,6 +1,7 @@
> >  #ifndef _LINUX_TYPES_H
> >  #define _LINUX_TYPES_H
> >  
> > +#ifndef __ASSEMBLY__
> >  #ifdef	__KERNEL__
> >  
> >  #define DECLARE_BITMAP(name,bits) \
> > @@ -212,5 +213,5 @@ struct ustat {
> >  };
> >  
> >  #endif	/* __KERNEL__ */
> > -
> > +#endif /*  __ASSEMBLY__ */
> >  #endif /* _LINUX_TYPES_H */
> 
> This is wrong...
> We should include the assumed assembly safe asm/types.h
> outside the __ASEMBLY__ ifdef.

agreed ...

	Ingo

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

* Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06 17:32                 ` Sam Ravnborg
@ 2009-02-06 17:41                   ` Ingo Molnar
  0 siblings, 0 replies; 56+ messages in thread
From: Ingo Molnar @ 2009-02-06 17:41 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Russell King - ARM Linux, Jaswinder Singh Rajput,
	KOSAKI Motohiro, Jaswinder Singh Rajput, Linus Torvalds,
	Andrew Morton, hskinnemoen, cooloney, tony.luck, ralf, dhowells,
	matthew, chris, LKML, linux-next, linux-ia64


* Sam Ravnborg <sam@ravnborg.org> wrote:

> On Fri, Feb 06, 2009 at 03:55:12PM +0000, Russell King - ARM Linux wrote:
> > On Fri, Feb 06, 2009 at 09:18:48PM +0530, Jaswinder Singh Rajput wrote:
> > > On Fri, 2009-02-06 at 15:33 +0000, Russell King - ARM Linux wrote:
> > > > On Fri, Feb 06, 2009 at 08:59:01PM +0530, Jaswinder Singh Rajput wrote:
> > > > > Jaswinder Singh Rajput (2):
> > > > >       Neither asm/types.h nor linux/types.h is required for arch/ia64/include/asm/fpu.h
> > > > >       make linux/types.h as assembly safe
> > > > 
> > > > I continue to disagree with the need for the second patch.
> > > 
> > > Like Ingo suggested:
> > > 
> > > On Fri, 2009-02-06 at 15:58 +0100, Ingo Molnar wrote:
> > > >  Well types.h easily gets included in other files though, which might be 
> > > > partially suited for assembly - and have !__ASSEMBLY__ portions that rely on 
> > > > a types.h include.
> > > > 
> > > > So making this file an invariant in .S files does not sound like a bad idea 
> > > > to me. Is there any downside?
> > > > 
> > > 
> > > We cannot see any downside of this patch.
> > > 
> > > But we can see upside of this patch is:
> > > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > > files
> > > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> > 
> > The point is:
> > 
> > 1. If the parent include needs to include linux/types.h to get at C
> >    types _and_ the include file needs to also be included by assembly
> >    code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
> >    uses from the assembly code.
> > 
> >    In that case, the linux/types.h include should be contained within
> >    the #ifndef __ASSEMBLY__ .. #endif block along with all C only
> >    parts of the header file.
> > 
> > 2. if it doesn't need C types from linux/types.h, then that header has
> >    no business including linux/types.h, and the include should be
> >    eliminated to save the already dirbolically slow compiler from
> >    having to read and parse that file, and more importantly allowing
> >    it to eliminate linux/types.h from the build dependencies.
> > 
> > Yes, you can wrap linux/types.h with that ifndef, and yes it will fix
> > any problems, but I view it as a hack rather than fixing the real problem
> > which is lazyness by code writers to get their include dependencies right.
> 
> You guys are getting this wrong.
> The patch from Jaswinder needs to be fixed so we unconditionally
> include <asm/types.h> from linux/types.h.

Yeah, that's true.

> And then ll users can safely include linux/types.h and when we one
> day realize we can move some stuff used in .S files from
> asm/types.h to linux/types.h then we are all safe and no breakage.

Yeah.

	Ingo

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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 17:24             ` Sam Ravnborg
  2009-02-06 17:40               ` Ingo Molnar
@ 2009-02-06 18:11               ` Jaswinder Singh Rajput
  2009-02-06 18:42                 ` Sam Ravnborg
  2009-02-08  5:50               ` Jaswinder Singh Rajput
  2 siblings, 1 reply; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06 18:11 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Ingo Molnar, Linus Torvalds, Tony Luck, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML

On Fri, 2009-02-06 at 18:24 +0100, Sam Ravnborg wrote:
> > 
> > Is this safe OR we can make it more safer:
> > 
> > Subject: [PATCH] make linux/types.h as assembly safe
> > 
> > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > ---
> >  include/linux/types.h |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/include/linux/types.h b/include/linux/types.h
> > index 712ca53..c30973a 100644
> > --- a/include/linux/types.h
> > +++ b/include/linux/types.h
> > @@ -1,6 +1,7 @@
> >  #ifndef _LINUX_TYPES_H
> >  #define _LINUX_TYPES_H
> >  
> > +#ifndef __ASSEMBLY__
> >  #ifdef	__KERNEL__
> >  
> >  #define DECLARE_BITMAP(name,bits) \
> > @@ -212,5 +213,5 @@ struct ustat {
> >  };
> >  
> >  #endif	/* __KERNEL__ */
> > -
> > +#endif /*  __ASSEMBLY__ */
> >  #endif /* _LINUX_TYPES_H */
> 
> This is wrong...
> We should include the assumed assembly safe asm/types.h
> outside the __ASEMBLY__ ifdef.
> 

Subject: [PATCH] make linux/types.h as assembly safe

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 include/linux/types.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/linux/types.h b/include/linux/types.h
index 712ca53..e1322a7 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -1,6 +1,10 @@
 #ifndef _LINUX_TYPES_H
 #define _LINUX_TYPES_H
 
+#ifdef __ASSEMBLY__
+# include <asm/types.h>
+#else /* __ASSEMBLY__ */
+
 #ifdef	__KERNEL__
 
 #define DECLARE_BITMAP(name,bits) \
@@ -212,5 +216,5 @@ struct ustat {
 };
 
 #endif	/* __KERNEL__ */
-
+#endif /*  __ASSEMBLY__ */
 #endif /* _LINUX_TYPES_H */
-- 
1.6.0.6




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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 18:11               ` Jaswinder Singh Rajput
@ 2009-02-06 18:42                 ` Sam Ravnborg
  2009-02-06 19:31                   ` Jaswinder Singh Rajput
  0 siblings, 1 reply; 56+ messages in thread
From: Sam Ravnborg @ 2009-02-06 18:42 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Ingo Molnar, Linus Torvalds, Tony Luck, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML

> 
> Subject: [PATCH] make linux/types.h as assembly safe
> 
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> ---
>  include/linux/types.h |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/types.h b/include/linux/types.h
> index 712ca53..e1322a7 100644
> --- a/include/linux/types.h
> +++ b/include/linux/types.h
> @@ -1,6 +1,10 @@
>  #ifndef _LINUX_TYPES_H
>  #define _LINUX_TYPES_H
>  
> +#ifdef __ASSEMBLY__
> +# include <asm/types.h>
> +#else /* __ASSEMBLY__ */

Please use:
#ifndef __ASEMBLY__

This is what is used in the most cases.

And I think you need to nuke an include in the file a bit later
so we do not include asm/types.h twice.

	Sam

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

* RE: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
  2009-02-06  8:53   ` Jaswinder Singh Rajput
  2009-02-06  9:11     ` KOSAKI Motohiro
@ 2009-02-06 18:53     ` Luck, Tony
  1 sibling, 0 replies; 56+ messages in thread
From: Luck, Tony @ 2009-02-06 18:53 UTC (permalink / raw)
  To: Jaswinder Singh Rajput, KOSAKI Motohiro
  Cc: Jaswinder Singh Rajput, Ingo Molnar, Linus Torvalds,
	Sam Ravnborg, Andrew Morton, Russell King - ARM Linux,
	hskinnemoen, cooloney, ralf, dhowells, matthew, chris, LKML,
	linux-next, linux-ia64

> > -#include <linux/types.h>
> > +#include <asm/types.h>
> >
>
> No , we do not even need asm/types.h

...

> -#include <linux/types.h>
> -

This works.

Acked-by: Tony Luck <tony.luck@intel.com>




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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 18:42                 ` Sam Ravnborg
@ 2009-02-06 19:31                   ` Jaswinder Singh Rajput
  0 siblings, 0 replies; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-06 19:31 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Ingo Molnar, Linus Torvalds, Tony Luck, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML

On Fri, 2009-02-06 at 19:42 +0100, Sam Ravnborg wrote:
> > 
> > Subject: [PATCH] make linux/types.h as assembly safe
> > 
> > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > ---
> >  include/linux/types.h |    6 +++++-
> >  1 files changed, 5 insertions(+), 1 deletions(-)
> > 
> > diff --git a/include/linux/types.h b/include/linux/types.h
> > index 712ca53..e1322a7 100644
> > --- a/include/linux/types.h
> > +++ b/include/linux/types.h
> > @@ -1,6 +1,10 @@
> >  #ifndef _LINUX_TYPES_H
> >  #define _LINUX_TYPES_H
> >  
> > +#ifdef __ASSEMBLY__
> > +# include <asm/types.h>
> > +#else /* __ASSEMBLY__ */
> 
> Please use:
> #ifndef __ASEMBLY__
> 
> This is what is used in the most cases.
> 
> And I think you need to nuke an include in the file a bit later
> so we do not include asm/types.h twice.
> 

Is this looks OK:

Subject: [PATCH] make linux/types.h as assembly safe

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 include/linux/types.h |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/linux/types.h b/include/linux/types.h
index 712ca53..6f12467 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -1,6 +1,10 @@
 #ifndef _LINUX_TYPES_H
 #define _LINUX_TYPES_H
 
+#include <asm/types.h>
+
+#ifndef __ASSEMBLY__
+
 #ifdef	__KERNEL__
 
 #define DECLARE_BITMAP(name,bits) \
@@ -9,7 +13,6 @@
 #endif
 
 #include <linux/posix_types.h>
-#include <asm/types.h>
 
 #ifndef __KERNEL_STRICT_NAMES
 
@@ -212,5 +215,5 @@ struct ustat {
 };
 
 #endif	/* __KERNEL__ */
-
+#endif /*  __ASSEMBLY__ */
 #endif /* _LINUX_TYPES_H */
-- 
1.6.0.6




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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-06 17:24             ` Sam Ravnborg
  2009-02-06 17:40               ` Ingo Molnar
  2009-02-06 18:11               ` Jaswinder Singh Rajput
@ 2009-02-08  5:50               ` Jaswinder Singh Rajput
  2009-02-09 12:23                 ` Ingo Molnar
  2 siblings, 1 reply; 56+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-08  5:50 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Ingo Molnar, Linus Torvalds, Tony Luck, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML

On Fri, 2009-02-06 at 18:24 +0100, Sam Ravnborg wrote:
> > 
> > Is this safe OR we can make it more safer:
> > 
> > Subject: [PATCH] make linux/types.h as assembly safe
> > 
> > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > ---
> >  include/linux/types.h |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> > diff --git a/include/linux/types.h b/include/linux/types.h
> > index 712ca53..c30973a 100644
> > --- a/include/linux/types.h
> > +++ b/include/linux/types.h
> > @@ -1,6 +1,7 @@
> >  #ifndef _LINUX_TYPES_H
> >  #define _LINUX_TYPES_H
> >  
> > +#ifndef __ASSEMBLY__
> >  #ifdef	__KERNEL__
> >  
> >  #define DECLARE_BITMAP(name,bits) \
> > @@ -212,5 +213,5 @@ struct ustat {
> >  };
> >  
> >  #endif	/* __KERNEL__ */
> > -
> > +#endif /*  __ASSEMBLY__ */
> >  #endif /* _LINUX_TYPES_H */
> 
> This is wrong...
> We should include the assumed assembly safe asm/types.h
> outside the __ASEMBLY__ ifdef.
> 

The following changes since commit f6c727813e03ce0f58d73808da8c9a6bc227249e:
  Ingo Molnar (1):
        Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes

Jaswinder Singh Rajput (1):
      unconditionally include asm/types.h from linux/types.h

 include/linux/types.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Complete diff:
diff --git a/include/linux/types.h b/include/linux/types.h
index c30973a..fca82ed 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -1,6 +1,8 @@
 #ifndef _LINUX_TYPES_H
 #define _LINUX_TYPES_H
 
+#include <asm/types.h>
+
 #ifndef __ASSEMBLY__
 #ifdef	__KERNEL__
 
@@ -10,7 +12,6 @@
 #endif
 
 #include <linux/posix_types.h>
-#include <asm/types.h>
 
 #ifndef __KERNEL_STRICT_NAMES
 



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

* Re: [git pull -tip] headers_check fixes for other architectures
  2009-02-08  5:50               ` Jaswinder Singh Rajput
@ 2009-02-09 12:23                 ` Ingo Molnar
  0 siblings, 0 replies; 56+ messages in thread
From: Ingo Molnar @ 2009-02-09 12:23 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: Sam Ravnborg, Linus Torvalds, Tony Luck, Andrew Morton,
	Russell King - ARM Linux, hskinnemoen, cooloney, ralf, dhowells,
	matthew, chris, LKML


* Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:

> On Fri, 2009-02-06 at 18:24 +0100, Sam Ravnborg wrote:
> > > 
> > > Is this safe OR we can make it more safer:
> > > 
> > > Subject: [PATCH] make linux/types.h as assembly safe
> > > 
> > > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > > ---
> > >  include/linux/types.h |    3 ++-
> > >  1 files changed, 2 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/include/linux/types.h b/include/linux/types.h
> > > index 712ca53..c30973a 100644
> > > --- a/include/linux/types.h
> > > +++ b/include/linux/types.h
> > > @@ -1,6 +1,7 @@
> > >  #ifndef _LINUX_TYPES_H
> > >  #define _LINUX_TYPES_H
> > >  
> > > +#ifndef __ASSEMBLY__
> > >  #ifdef	__KERNEL__
> > >  
> > >  #define DECLARE_BITMAP(name,bits) \
> > > @@ -212,5 +213,5 @@ struct ustat {
> > >  };
> > >  
> > >  #endif	/* __KERNEL__ */
> > > -
> > > +#endif /*  __ASSEMBLY__ */
> > >  #endif /* _LINUX_TYPES_H */
> > 
> > This is wrong...
> > We should include the assumed assembly safe asm/types.h
> > outside the __ASEMBLY__ ifdef.
> > 
> 
> The following changes since commit f6c727813e03ce0f58d73808da8c9a6bc227249e:
>   Ingo Molnar (1):
>         Merge branch 'core/header-fixes' of git://git.kernel.org/.../jaswinder/linux-2.6-tip into core/header-fixes
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip.git core/header-fixes
> 
> Jaswinder Singh Rajput (1):
>       unconditionally include asm/types.h from linux/types.h
> 
>  include/linux/types.h |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Pulled into tip:core/header-fixes, thanks Jaswinder!

	Ingo

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

end of thread, other threads:[~2009-02-09 12:23 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-31  7:10 [git pull -tip] headers_check fixes for other architectures Jaswinder Singh Rajput
2009-01-31 16:44 ` Ingo Molnar
2009-02-01  6:30   ` Jaswinder Singh Rajput
2009-02-01 10:39     ` Ingo Molnar
2009-02-01 16:49       ` Ingo Molnar
2009-02-01 17:06         ` Russell King - ARM Linux
2009-02-01 17:20         ` Russell King - ARM Linux
2009-02-01 17:31           ` Jaswinder Singh Rajput
2009-02-01 18:33         ` Jaswinder Singh Rajput
2009-02-02 17:11         ` Mike Frysinger
2009-02-02 18:08           ` Ingo Molnar
2009-02-02 18:29             ` Mike Frysinger
2009-02-02 18:48               ` Ingo Molnar
2009-02-05 17:55 ` Tony Luck
2009-02-05 19:06   ` Linus Torvalds
2009-02-05 19:19     ` Ingo Molnar
2009-02-06  2:06       ` Jaswinder Singh Rajput
2009-02-06  2:14         ` Mike Frysinger
2009-02-06  2:20         ` Ingo Molnar
2009-02-06 14:18           ` Jaswinder Singh Rajput
2009-02-06 14:21             ` Russell King - ARM Linux
2009-02-06 14:34               ` Jaswinder Singh Rajput
2009-02-06 14:51                 ` Russell King - ARM Linux
2009-02-06 14:58                   ` Ingo Molnar
2009-02-06 15:00                   ` Jaswinder Singh Rajput
2009-02-06 15:10                     ` Russell King - ARM Linux
2009-02-06 15:56                       ` Ingo Molnar
2009-02-06 16:02                         ` Russell King - ARM Linux
2009-02-06 17:24             ` Sam Ravnborg
2009-02-06 17:40               ` Ingo Molnar
2009-02-06 18:11               ` Jaswinder Singh Rajput
2009-02-06 18:42                 ` Sam Ravnborg
2009-02-06 19:31                   ` Jaswinder Singh Rajput
2009-02-08  5:50               ` Jaswinder Singh Rajput
2009-02-09 12:23                 ` Ingo Molnar
2009-02-06  8:19 ` [linux-next][PATCH] revert headers_check fix: ia64, fpu.h KOSAKI Motohiro
2009-02-06  8:53   ` Jaswinder Singh Rajput
2009-02-06  9:11     ` KOSAKI Motohiro
2009-02-06 14:55       ` Ingo Molnar
2009-02-06 15:29         ` Jaswinder Singh Rajput
2009-02-06 15:33           ` Russell King - ARM Linux
2009-02-06 15:45             ` Ingo Molnar
2009-02-06 15:49               ` Russell King - ARM Linux
2009-02-06 16:01                 ` Ingo Molnar
2009-02-06 15:48             ` Jaswinder Singh Rajput
2009-02-06 15:55               ` Russell King - ARM Linux
2009-02-06 16:12                 ` Ingo Molnar
2009-02-06 16:23                   ` Russell King - ARM Linux
2009-02-06 16:33                     ` Ingo Molnar
2009-02-06 16:38                       ` Russell King - ARM Linux
2009-02-06 17:14                         ` Ingo Molnar
2009-02-06 17:22                           ` Russell King - ARM Linux
2009-02-06 17:32                 ` Sam Ravnborg
2009-02-06 17:41                   ` Ingo Molnar
2009-02-06 18:53     ` Luck, Tony
2009-02-06 13:42   ` Sam Ravnborg

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