aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-10-18 23:40:26 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 11:53:41 -0700
commit0624517d809b1cf53c977335c9bda4c216cbddee (patch)
tree5791430160f4423cab3c6085baed815e10c421f7 /include
parent1977f032722c27ee3730284582fd3991ad9ac81b (diff)
forbid asm/bitops.h direct inclusion
forbid asm/bitops.h direct inclusion Because of compile errors that may occur after bit changes if asm/bitops.h is included directly without e.g. linux/kernel.h which includes linux/bitops.h, forbid direct inclusion of asm/bitops.h. Thanks to Adrian Bunk. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/bitops.h4
-rw-r--r--include/asm-arm/bitops.h4
-rw-r--r--include/asm-avr32/bitops.h4
-rw-r--r--include/asm-blackfin/bitops.h4
-rw-r--r--include/asm-cris/bitops.h4
-rw-r--r--include/asm-frv/bitops.h4
-rw-r--r--include/asm-generic/bitops.h4
-rw-r--r--include/asm-h8300/bitops.h5
-rw-r--r--include/asm-ia64/bitops.h4
-rw-r--r--include/asm-m32r/bitops.h4
-rw-r--r--include/asm-m68k/bitops.h4
-rw-r--r--include/asm-m68knommu/bitops.h4
-rw-r--r--include/asm-mips/bitops.h4
-rw-r--r--include/asm-parisc/bitops.h4
-rw-r--r--include/asm-powerpc/bitops.h4
-rw-r--r--include/asm-s390/bitops.h4
-rw-r--r--include/asm-sh/bitops.h5
-rw-r--r--include/asm-sh64/bitops.h5
-rw-r--r--include/asm-sparc/bitops.h4
-rw-r--r--include/asm-sparc64/bitops.h4
-rw-r--r--include/asm-um/bitops.h4
-rw-r--r--include/asm-v850/bitops.h3
-rw-r--r--include/asm-x86/bitops_32.h4
-rw-r--r--include/asm-x86/bitops_64.h4
-rw-r--r--include/asm-xtensa/bitops.h4
25 files changed, 102 insertions, 0 deletions
diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h
index 381b4f5b4d5..9e19a704d48 100644
--- a/include/asm-alpha/bitops.h
+++ b/include/asm-alpha/bitops.h
@@ -1,6 +1,10 @@
#ifndef _ALPHA_BITOPS_H
#define _ALPHA_BITOPS_H
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <asm/compiler.h>
#include <asm/barrier.h>
diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h
index 52fe05895de..47a6b086eee 100644
--- a/include/asm-arm/bitops.h
+++ b/include/asm-arm/bitops.h
@@ -19,6 +19,10 @@
#ifdef __KERNEL__
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <linux/compiler.h>
#include <asm/system.h>
diff --git a/include/asm-avr32/bitops.h b/include/asm-avr32/bitops.h
index f3faddfd46a..1a50b69b1a1 100644
--- a/include/asm-avr32/bitops.h
+++ b/include/asm-avr32/bitops.h
@@ -8,6 +8,10 @@
#ifndef __ASM_AVR32_BITOPS_H
#define __ASM_AVR32_BITOPS_H
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <asm/byteorder.h>
#include <asm/system.h>
diff --git a/include/asm-blackfin/bitops.h b/include/asm-blackfin/bitops.h
index 03ecedc1f2a..b39a175c79c 100644
--- a/include/asm-blackfin/bitops.h
+++ b/include/asm-blackfin/bitops.h
@@ -11,6 +11,10 @@
#ifdef __KERNEL__
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <asm-generic/bitops/ffs.h>
#include <asm-generic/bitops/__ffs.h>
#include <asm-generic/bitops/sched.h>
diff --git a/include/asm-cris/bitops.h b/include/asm-cris/bitops.h
index 617151b9b72..e2f49c27ed2 100644
--- a/include/asm-cris/bitops.h
+++ b/include/asm-cris/bitops.h
@@ -14,6 +14,10 @@
/* Currently this is unsuitable for consumption outside the kernel. */
#ifdef __KERNEL__
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <asm/arch/bitops.h>
#include <asm/system.h>
#include <asm/atomic.h>
diff --git a/include/asm-frv/bitops.h b/include/asm-frv/bitops.h
index 8dba74b1a25..e29de7131b7 100644
--- a/include/asm-frv/bitops.h
+++ b/include/asm-frv/bitops.h
@@ -21,6 +21,10 @@
#ifdef __KERNEL__
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <asm-generic/bitops/ffz.h>
/*
diff --git a/include/asm-generic/bitops.h b/include/asm-generic/bitops.h
index e022a0f59e6..15e6f253dda 100644
--- a/include/asm-generic/bitops.h
+++ b/include/asm-generic/bitops.h
@@ -19,6 +19,10 @@
#ifdef __KERNEL__
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <asm-generic/bitops/sched.h>
#include <asm-generic/bitops/ffs.h>
#include <asm-generic/bitops/hweight.h>
diff --git a/include/asm-h8300/bitops.h b/include/asm-h8300/bitops.h
index e64ad315656..cb18e3b0aa9 100644
--- a/include/asm-h8300/bitops.h
+++ b/include/asm-h8300/bitops.h
@@ -10,6 +10,11 @@
#include <asm/system.h>
#ifdef __KERNEL__
+
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
/*
* Function prototypes to keep gcc -Wall happy
*/
diff --git a/include/asm-ia64/bitops.h b/include/asm-ia64/bitops.h
index 2144f1a8ed6..a977affaebe 100644
--- a/include/asm-ia64/bitops.h
+++ b/include/asm-ia64/bitops.h
@@ -9,6 +9,10 @@
* O(1) scheduler patch
*/
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <linux/compiler.h>
#include <linux/types.h>
#include <asm/intrinsics.h>
diff --git a/include/asm-m32r/bitops.h b/include/asm-m32r/bitops.h
index 313a02c4a88..6dc9b81bf9f 100644
--- a/include/asm-m32r/bitops.h
+++ b/include/asm-m32r/bitops.h
@@ -11,6 +11,10 @@
* Copyright (C) 2004 Hirokazu Takata <takata at linux-m32r.org>
*/
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <linux/compiler.h>
#include <asm/assembler.h>
#include <asm/system.h>
diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h
index da151f70cdc..2976b5d68e9 100644
--- a/include/asm-m68k/bitops.h
+++ b/include/asm-m68k/bitops.h
@@ -8,6 +8,10 @@
* for more details.
*/
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <linux/compiler.h>
/*
diff --git a/include/asm-m68knommu/bitops.h b/include/asm-m68knommu/bitops.h
index b8b2770d687..f8dfb7ba2e2 100644
--- a/include/asm-m68knommu/bitops.h
+++ b/include/asm-m68knommu/bitops.h
@@ -10,6 +10,10 @@
#ifdef __KERNEL__
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <asm-generic/bitops/ffs.h>
#include <asm-generic/bitops/__ffs.h>
#include <asm-generic/bitops/sched.h>
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h
index 77ed0c79830..ec75ce4cdb8 100644
--- a/include/asm-mips/bitops.h
+++ b/include/asm-mips/bitops.h
@@ -9,6 +9,10 @@
#ifndef _ASM_BITOPS_H
#define _ASM_BITOPS_H
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <linux/compiler.h>
#include <linux/irqflags.h>
#include <linux/types.h>
diff --git a/include/asm-parisc/bitops.h b/include/asm-parisc/bitops.h
index 03ae287baf8..f8eebcbad01 100644
--- a/include/asm-parisc/bitops.h
+++ b/include/asm-parisc/bitops.h
@@ -1,6 +1,10 @@
#ifndef _PARISC_BITOPS_H
#define _PARISC_BITOPS_H
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <linux/compiler.h>
#include <asm/types.h> /* for BITS_PER_LONG/SHIFT_PER_LONG */
#include <asm/byteorder.h>
diff --git a/include/asm-powerpc/bitops.h b/include/asm-powerpc/bitops.h
index e85c3e078ba..733b4af7f4f 100644
--- a/include/asm-powerpc/bitops.h
+++ b/include/asm-powerpc/bitops.h
@@ -38,6 +38,10 @@
#ifdef __KERNEL__
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <linux/compiler.h>
#include <asm/asm-compat.h>
#include <asm/synch.h>
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h
index d756b34d25f..34d9a6357c3 100644
--- a/include/asm-s390/bitops.h
+++ b/include/asm-s390/bitops.h
@@ -15,6 +15,10 @@
#ifdef __KERNEL__
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <linux/compiler.h>
/*
diff --git a/include/asm-sh/bitops.h b/include/asm-sh/bitops.h
index 9d7021723a2..df805f20b26 100644
--- a/include/asm-sh/bitops.h
+++ b/include/asm-sh/bitops.h
@@ -2,6 +2,11 @@
#define __ASM_SH_BITOPS_H
#ifdef __KERNEL__
+
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <asm/system.h>
/* For __swab32 */
#include <asm/byteorder.h>
diff --git a/include/asm-sh64/bitops.h b/include/asm-sh64/bitops.h
index 444d5ea92ce..600c59efb4c 100644
--- a/include/asm-sh64/bitops.h
+++ b/include/asm-sh64/bitops.h
@@ -13,6 +13,11 @@
*/
#ifdef __KERNEL__
+
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <linux/compiler.h>
#include <asm/system.h>
/* For __swab32 */
diff --git a/include/asm-sparc/bitops.h b/include/asm-sparc/bitops.h
index 00bd0a679d7..cb3cefab6e0 100644
--- a/include/asm-sparc/bitops.h
+++ b/include/asm-sparc/bitops.h
@@ -14,6 +14,10 @@
#ifdef __KERNEL__
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
extern unsigned long ___set_bit(unsigned long *addr, unsigned long mask);
extern unsigned long ___clear_bit(unsigned long *addr, unsigned long mask);
extern unsigned long ___change_bit(unsigned long *addr, unsigned long mask);
diff --git a/include/asm-sparc64/bitops.h b/include/asm-sparc64/bitops.h
index dd4bfe993b6..982ce8992b9 100644
--- a/include/asm-sparc64/bitops.h
+++ b/include/asm-sparc64/bitops.h
@@ -7,6 +7,10 @@
#ifndef _SPARC64_BITOPS_H
#define _SPARC64_BITOPS_H
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <linux/compiler.h>
#include <asm/byteorder.h>
diff --git a/include/asm-um/bitops.h b/include/asm-um/bitops.h
index 46d781953d3..e4d38d437b9 100644
--- a/include/asm-um/bitops.h
+++ b/include/asm-um/bitops.h
@@ -1,6 +1,10 @@
#ifndef __UM_BITOPS_H
#define __UM_BITOPS_H
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include "asm/arch/bitops.h"
#endif
diff --git a/include/asm-v850/bitops.h b/include/asm-v850/bitops.h
index 8eafdb1c08b..f82f5b4a56e 100644
--- a/include/asm-v850/bitops.h
+++ b/include/asm-v850/bitops.h
@@ -13,6 +13,9 @@
#ifndef __V850_BITOPS_H__
#define __V850_BITOPS_H__
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
#include <linux/compiler.h> /* unlikely */
#include <asm/byteorder.h> /* swab32 */
diff --git a/include/asm-x86/bitops_32.h b/include/asm-x86/bitops_32.h
index c96641f7502..3268a341cf4 100644
--- a/include/asm-x86/bitops_32.h
+++ b/include/asm-x86/bitops_32.h
@@ -5,6 +5,10 @@
* Copyright 1992, Linus Torvalds.
*/
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <linux/compiler.h>
#include <asm/alternative.h>
diff --git a/include/asm-x86/bitops_64.h b/include/asm-x86/bitops_64.h
index 525edf2ce5c..dacaa5f1feb 100644
--- a/include/asm-x86/bitops_64.h
+++ b/include/asm-x86/bitops_64.h
@@ -5,6 +5,10 @@
* Copyright 1992, Linus Torvalds.
*/
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <asm/alternative.h>
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1)
diff --git a/include/asm-xtensa/bitops.h b/include/asm-xtensa/bitops.h
index 78db04cf6e4..23261e8f2e5 100644
--- a/include/asm-xtensa/bitops.h
+++ b/include/asm-xtensa/bitops.h
@@ -15,6 +15,10 @@
#ifdef __KERNEL__
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
#include <asm/processor.h>
#include <asm/byteorder.h>
#include <asm/system.h>