forbid asm/bitops.h direct inclusion
authorJiri Slaby <jirislaby@gmail.com>
Fri, 19 Oct 2007 06:40:26 +0000 (23:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 19 Oct 2007 18:53:41 +0000 (11:53 -0700)
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>
25 files changed:
include/asm-alpha/bitops.h
include/asm-arm/bitops.h
include/asm-avr32/bitops.h
include/asm-blackfin/bitops.h
include/asm-cris/bitops.h
include/asm-frv/bitops.h
include/asm-generic/bitops.h
include/asm-h8300/bitops.h
include/asm-ia64/bitops.h
include/asm-m32r/bitops.h
include/asm-m68k/bitops.h
include/asm-m68knommu/bitops.h
include/asm-mips/bitops.h
include/asm-parisc/bitops.h
include/asm-powerpc/bitops.h
include/asm-s390/bitops.h
include/asm-sh/bitops.h
include/asm-sh64/bitops.h
include/asm-sparc/bitops.h
include/asm-sparc64/bitops.h
include/asm-um/bitops.h
include/asm-v850/bitops.h
include/asm-x86/bitops_32.h
include/asm-x86/bitops_64.h
include/asm-xtensa/bitops.h

index 381b4f5b4d5dfb9c25a5ce84ca43d651710da9f2..9e19a704d4840693a31bd88413060024e3623266 100644 (file)
@@ -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>
 
index 52fe05895debb77159a13f1eb68f05f907799aee..47a6b086eee27fd3ef5dc9a9a04a09db8c5488ee 100644 (file)
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 #include <asm/system.h>
 
index f3faddfd46a8b924bd40ef7eb544797fc56bd229..1a50b69b1a192de23bd6bdf88881a5181082faeb 100644 (file)
@@ -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>
 
index 03ecedc1f2a74089838768efc21ba495b62f2a67..b39a175c79c1bcaba34f4decfefc337166992698 100644 (file)
 
 #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>
index 617151b9b72bb52cde9433c825ac0829b879ba7b..e2f49c27ed297ab40dc7187de1639809fa1c9640 100644 (file)
 /* 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>
index 8dba74b1a2549e10a520ae9766151f4e613c77a6..e29de7131b79dcca7250aad73b3d603fb1f53458 100644 (file)
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <asm-generic/bitops/ffz.h>
 
 /*
index e022a0f59e6bb8707268466922adcb849e9e284e..15e6f253dda4090622d93c0d688e4350da4411ad 100644 (file)
 
 #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>
index e64ad315656dfea57dbe90bfb14eb775b25657a2..cb18e3b0aa948520b8f7321e6ead3d00eb1d5cf2 100644 (file)
 #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
  */
index 2144f1a8ed6f7f89793858c9cab1d4f73b37be95..a977affaebeca34b02b1e9bb991f4ad83cd35281 100644 (file)
@@ -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>
index 313a02c4a88923cbd1003833835df45ee980993d..6dc9b81bf9f36544eeacfee071866629f220ce5c 100644 (file)
  *    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>
index da151f70cdc6389a245590245863029129e12075..2976b5d68e96cbb5189cb1a348312939a699dab8 100644 (file)
@@ -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>
 
 /*
index b8b2770d6870965de40edcf112b405aadd2f881e..f8dfb7ba2e2573566a58cf97d01942adc48d4785 100644 (file)
 
 #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>
index 77ed0c79830b6335dbb1c86fb4244091d63e7608..ec75ce4cdb8c3e90307e51350c2d7dc4b950a4d5 100644 (file)
@@ -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>
index 03ae287baf89ccd6bd81d10692d14616f9e18ca5..f8eebcbad01f81d57e0a222d4573d9044f114e96 100644 (file)
@@ -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>
index e85c3e078ba29be59f7d4f0425844de39d24461a..733b4af7f4f1e7e49269b17856bbf7e47924d7b6 100644 (file)
 
 #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>
index d756b34d25f309555d91631d1aead2a0a3e13578..34d9a6357c38941c70d7b638b2d2f19045291872 100644 (file)
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 
 /*
index 9d7021723a25363c0828f4b3422ef9fc1b52d145..df805f20b26786a3d74478a0c2fd6e10bf1777e5 100644 (file)
@@ -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>
index 444d5ea92ce9452c8f70abc46539330c8c9f2fd1..600c59efb4c29a6df194d7bcd574ed4537dc9b07 100644 (file)
  */
 
 #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 */
index 00bd0a679d702f0a07737cd66f766442cb70f09d..cb3cefab6e098e56dc1c1835fdb2a44212fea376 100644 (file)
 
 #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);
index dd4bfe993b619160ba8e7e9629cacc6342a8930b..982ce8992b91fcae6a2d9e790235b718d7cfa1b1 100644 (file)
@@ -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>
 
index 46d781953d3ad7c5fa42e92f3c0489bf5eeccf64..e4d38d437b97c4baefc2d1dc47bf34d61fc9ccf1 100644 (file)
@@ -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
index 8eafdb1c08ba96b3939b30fdd2b38b250c3584ff..f82f5b4a56e0d0526d3d2e53023e90ab65aeaab0 100644 (file)
@@ -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 */
index c96641f7502298fca9aa60c5f511c9e8df50dfb3..3268a341cf495177de5653c066dacfc81b7b52da 100644 (file)
@@ -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>
 
index 525edf2ce5c263454158fb8a724f9b75083f63f5..dacaa5f1febcb713d38cbe6114759ff61127dc11 100644 (file)
@@ -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)
index 78db04cf6e4859bf24d57ea6ed854760a7aa1201..23261e8f2e5ac4c15cf36a23921f3cd9cb654b5f 100644 (file)
 
 #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>