]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'bug-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 Mar 2012 17:08:39 +0000 (10:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 Mar 2012 17:08:39 +0000 (10:08 -0700)
Pull <linux/bug.h> cleanup from Paul Gortmaker:
 "The changes shown here are to unify linux's BUG support under the one
  <linux/bug.h> file.  Due to historical reasons, we have some BUG code
  in bug.h and some in kernel.h -- i.e.  the support for BUILD_BUG in
  linux/kernel.h predates the addition of linux/bug.h, but old code in
  kernel.h wasn't moved to bug.h at that time.  As a band-aid, kernel.h
  was including <asm/bug.h> to pseudo link them.

  This has caused confusion[1] and general yuck/WTF[2] reactions.  Here
  is an example that violates the principle of least surprise:

      CC      lib/string.o
      lib/string.c: In function 'strlcat':
      lib/string.c:225:2: error: implicit declaration of function 'BUILD_BUG_ON'
      make[2]: *** [lib/string.o] Error 1
      $
      $ grep linux/bug.h lib/string.c
      #include <linux/bug.h>
      $

  We've included <linux/bug.h> for the BUG infrastructure and yet we
  still get a compile fail! [We've not kernel.h for BUILD_BUG_ON.] Ugh -
  very confusing for someone who is new to kernel development.

  With the above in mind, the goals of this changeset are:

  1) find and fix any include/*.h files that were relying on the
     implicit presence of BUG code.
  2) find and fix any C files that were consuming kernel.h and hence
     relying on implicitly getting some/all BUG code.
  3) Move the BUG related code living in kernel.h to <linux/bug.h>
  4) remove the asm/bug.h from kernel.h to finally break the chain.

  During development, the order was more like 3-4, build-test, 1-2.  But
  to ensure that git history for bisect doesn't get needless build
  failures introduced, the commits have been reorderd to fix the problem
  areas in advance.

[1]  https://lkml.org/lkml/2012/1/3/90
[2]  https://lkml.org/lkml/2012/1/17/414"

Fix up conflicts (new radeon file, reiserfs header cleanups) as per Paul
and linux-next.

* tag 'bug-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
  kernel.h: doesn't explicitly use bug.h, so don't include it.
  bug: consolidate BUILD_BUG_ON with other bug code
  BUG: headers with BUG/BUG_ON etc. need linux/bug.h
  bug.h: add include of it to various implicit C users
  lib: fix implicit users of kernel.h for TAINT_WARN
  spinlock: macroize assert_spin_locked to avoid bug.h dependency
  x86: relocate get/set debugreg fcns to include/asm/debugreg.

93 files changed:
arch/arm/mach-imx/cpu_op-mx51.c
arch/arm/mach-ux500/board-mop500-pins.c
arch/avr32/include/asm/io.h
arch/m68k/include/asm/system.h
arch/mips/fw/arc/cmdline.c
arch/mips/fw/arc/identify.c
arch/parisc/math-emu/fpudispatch.c
arch/powerpc/kernel/pmc.c
arch/powerpc/xmon/ppc-opc.c
arch/powerpc/xmon/spu-opc.c
arch/sparc/include/asm/vga.h
arch/x86/include/asm/debugreg.h
arch/x86/include/asm/paravirt.h
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/paravirt.c
arch/x86/mm/kmemcheck/selftest.c
drivers/gpu/drm/radeon/cayman_blit_shaders.c
drivers/gpu/drm/radeon/evergreen_blit_shaders.c
drivers/gpu/drm/radeon/r600_blit_shaders.c
drivers/gpu/drm/radeon/si_blit_shaders.c
drivers/staging/wlags49_h2/hcf.c
fs/reiserfs/reiserfs.h
include/asm-generic/dma-mapping-common.h
include/asm-generic/pgtable.h
include/asm-generic/tlbflush.h
include/drm/ttm/ttm_memory.h
include/linux/atmdev.h
include/linux/bio.h
include/linux/bit_spinlock.h
include/linux/bug.h
include/linux/ceph/decode.h
include/linux/ceph/libceph.h
include/linux/ceph/mdsmap.h
include/linux/cpumask.h
include/linux/crypto.h
include/linux/debug_locks.h
include/linux/dmaengine.h
include/linux/elfcore.h
include/linux/ext3_fs.h
include/linux/fs.h
include/linux/fsnotify.h
include/linux/gpio.h
include/linux/highmem.h
include/linux/i2o.h
include/linux/if_vlan.h
include/linux/io-mapping.h
include/linux/kernel.h
include/linux/kprobes.h
include/linux/kvm_host.h
include/linux/memory_hotplug.h
include/linux/mm.h
include/linux/mtd/cfi.h
include/linux/netdevice.h
include/linux/nilfs2_fs.h
include/linux/page-flags.h
include/linux/pid_namespace.h
include/linux/posix_acl.h
include/linux/ptrace.h
include/linux/radix-tree.h
include/linux/rcupdate.h
include/linux/regset.h
include/linux/relay.h
include/linux/scatterlist.h
include/linux/seq_file.h
include/linux/skbuff.h
include/linux/slub_def.h
include/linux/spinlock.h
include/linux/ssb/ssb_driver_gige.h
include/linux/swapops.h
include/linux/syscalls.h
include/linux/transport_class.h
include/linux/virtio_config.h
include/net/cfg80211.h
include/net/dst.h
include/net/ip_vs.h
include/net/mac80211.h
include/net/netns/generic.h
include/net/red.h
include/net/tcp.h
include/net/timewait_sock.h
include/net/udp.h
include/net/wpan-phy.h
include/scsi/osd_ore.h
include/scsi/scsi_transport.h
lib/atomic64_test.c
lib/average.c
lib/bitmap.c
lib/iommu-helper.c
lib/list_debug.c
lib/plist.c
lib/string.c
lib/timerqueue.c

index 9d34c3d4c02498f2f8972447235f485742dbdffb..7b92cd6da6d3f1ae8330f75dcf4b879c7f492ec5 100644 (file)
@@ -11,6 +11,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
+#include <linux/bug.h>
 #include <linux/types.h>
 #include <mach/hardware.h>
 #include <linux/kernel.h>
index 74bfcff2bdf3732810b166b78f1991afdfb751d1..f5413dca532cf61e1d183420ab587020811f344d 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/bug.h>
 
 #include <asm/mach-types.h>
 #include <plat/pincfg.h>
index 22c97ef92201bff82b5a7bc7a6fe139147c014a4..cf60d0a9f1767ca8d8ba8e3e810526539022313f 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __ASM_AVR32_IO_H
 #define __ASM_AVR32_IO_H
 
+#include <linux/bug.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/types.h>
index 47b01f4726bc76d3afd834f9eb840de64c68998c..8dc68178716c320d4ad41a09728a8ed523f880e0 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <linux/linkage.h>
 #include <linux/kernel.h>
+#include <linux/bug.h>
 #include <linux/irqflags.h>
 #include <asm/segment.h>
 #include <asm/entry.h>
index 9fdf07e50f1bf01fbe7794ef639e45ceaf3eb6ab..c0122a1dc58784a6304dbb76aadcff47a4904cfc 100644 (file)
@@ -7,6 +7,7 @@
  *
  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
  */
+#include <linux/bug.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
index 788060a53dce228dc5a097e18481ffef033f4478..54a33c756f612dc3bf87432278cc79385ba37cae 100644 (file)
@@ -11,6 +11,7 @@
  *
  * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
  */
+#include <linux/bug.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
index 6e28f9f4c620fb94fb9d8910c51c6471173c0cee..673b73e8420d0fd5742264ad6c2214c43a78ef9a 100644 (file)
@@ -50,6 +50,7 @@
 #define FPUDEBUG 0
 
 #include "float.h"
+#include <linux/bug.h>
 #include <linux/kernel.h>
 #include <asm/processor.h>
 /* #include <sys/debug.h> */
index a841a9d136a2fb4401b743ac42a2acad039f7e87..58eaa3ddf7b9e857502a189f57734953af2f93cf 100644 (file)
@@ -13,6 +13,7 @@
  */
 
 #include <linux/errno.h>
+#include <linux/bug.h>
 #include <linux/spinlock.h>
 #include <linux/export.h>
 
index af3780e52e7607e11ff9fe573dd79cf84b0f32d2..6845e91ba04a5ef8c48265de04391f6da9adf547 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <linux/stddef.h>
 #include <linux/kernel.h>
+#include <linux/bug.h>
 #include "nonstdio.h"
 #include "ppc.h"
 
index 530df3d6d7b238b047f5832e1787af538b1791c4..7d37597c4bcdd2752f3b443c17158d52120142fc 100644 (file)
@@ -19,6 +19,7 @@
    51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #include <linux/kernel.h>
+#include <linux/bug.h>
 #include "spu.h"
 
 /* This file holds the Spu opcode table */
index c69d5b2ba19a488ea3abf8a75c25383edd13d562..ec0e9967d93d5904eeb9b9c1ab10a1794321c810 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef _LINUX_ASM_VGA_H_
 #define _LINUX_ASM_VGA_H_
 
+#include <linux/bug.h>
 #include <asm/types.h>
 
 #define VT_BUF_HAVE_RW
index b903d5ea394111edc965c351103953a62b5357a6..2d91580bf2288d46076a5a22beb96895ee31836d 100644 (file)
  */
 #ifdef __KERNEL__
 
+#include <linux/bug.h>
+
 DECLARE_PER_CPU(unsigned long, cpu_dr7);
 
+#ifndef CONFIG_PARAVIRT
+/*
+ * These special macros can be used to get or set a debugging register
+ */
+#define get_debugreg(var, register)                            \
+       (var) = native_get_debugreg(register)
+#define set_debugreg(value, register)                          \
+       native_set_debugreg(register, value)
+#endif
+
+static inline unsigned long native_get_debugreg(int regno)
+{
+       unsigned long val = 0;  /* Damn you, gcc! */
+
+       switch (regno) {
+       case 0:
+               asm("mov %%db0, %0" :"=r" (val));
+               break;
+       case 1:
+               asm("mov %%db1, %0" :"=r" (val));
+               break;
+       case 2:
+               asm("mov %%db2, %0" :"=r" (val));
+               break;
+       case 3:
+               asm("mov %%db3, %0" :"=r" (val));
+               break;
+       case 6:
+               asm("mov %%db6, %0" :"=r" (val));
+               break;
+       case 7:
+               asm("mov %%db7, %0" :"=r" (val));
+               break;
+       default:
+               BUG();
+       }
+       return val;
+}
+
+static inline void native_set_debugreg(int regno, unsigned long value)
+{
+       switch (regno) {
+       case 0:
+               asm("mov %0, %%db0"     ::"r" (value));
+               break;
+       case 1:
+               asm("mov %0, %%db1"     ::"r" (value));
+               break;
+       case 2:
+               asm("mov %0, %%db2"     ::"r" (value));
+               break;
+       case 3:
+               asm("mov %0, %%db3"     ::"r" (value));
+               break;
+       case 6:
+               asm("mov %0, %%db6"     ::"r" (value));
+               break;
+       case 7:
+               asm("mov %0, %%db7"     ::"r" (value));
+               break;
+       default:
+               BUG();
+       }
+}
+
 static inline void hw_breakpoint_disable(void)
 {
        /* Zero the control register for HW Breakpoint */
index c0180fd372d263400539296fcb0ed468ac0ea402..aa0f913083676a5b618ad733a36f9471176dcb88 100644 (file)
@@ -10,6 +10,7 @@
 #include <asm/paravirt_types.h>
 
 #ifndef __ASSEMBLY__
+#include <linux/bug.h>
 #include <linux/types.h>
 #include <linux/cpumask.h>
 
index 95da14f7ee85ad2ca592be523607d7b5231ace3c..5533b30cac0719f77f674926d85f055ca59dc943 100644 (file)
@@ -475,61 +475,6 @@ struct thread_struct {
        unsigned                io_bitmap_max;
 };
 
-static inline unsigned long native_get_debugreg(int regno)
-{
-       unsigned long val = 0;  /* Damn you, gcc! */
-
-       switch (regno) {
-       case 0:
-               asm("mov %%db0, %0" :"=r" (val));
-               break;
-       case 1:
-               asm("mov %%db1, %0" :"=r" (val));
-               break;
-       case 2:
-               asm("mov %%db2, %0" :"=r" (val));
-               break;
-       case 3:
-               asm("mov %%db3, %0" :"=r" (val));
-               break;
-       case 6:
-               asm("mov %%db6, %0" :"=r" (val));
-               break;
-       case 7:
-               asm("mov %%db7, %0" :"=r" (val));
-               break;
-       default:
-               BUG();
-       }
-       return val;
-}
-
-static inline void native_set_debugreg(int regno, unsigned long value)
-{
-       switch (regno) {
-       case 0:
-               asm("mov %0, %%db0"     ::"r" (value));
-               break;
-       case 1:
-               asm("mov %0, %%db1"     ::"r" (value));
-               break;
-       case 2:
-               asm("mov %0, %%db2"     ::"r" (value));
-               break;
-       case 3:
-               asm("mov %0, %%db3"     ::"r" (value));
-               break;
-       case 6:
-               asm("mov %0, %%db6"     ::"r" (value));
-               break;
-       case 7:
-               asm("mov %0, %%db7"     ::"r" (value));
-               break;
-       default:
-               BUG();
-       }
-}
-
 /*
  * Set IOPL bits in EFLAGS from given mask
  */
@@ -575,14 +520,6 @@ static inline void native_swapgs(void)
 #define __cpuid                        native_cpuid
 #define paravirt_enabled()     0
 
-/*
- * These special macros can be used to get or set a debugging register
- */
-#define get_debugreg(var, register)                            \
-       (var) = native_get_debugreg(register)
-#define set_debugreg(value, register)                          \
-       native_set_debugreg(register, value)
-
 static inline void load_sp0(struct tss_struct *tss,
                            struct thread_struct *thread)
 {
index ade9c794ed9860004f148379996b1fcf07032054..e49477444fff54ea2d7d0698217962d09f545387 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/archrandom.h>
 #include <asm/hypervisor.h>
 #include <asm/processor.h>
+#include <asm/debugreg.h>
 #include <asm/sections.h>
 #include <linux/topology.h>
 #include <linux/cpumask.h>
index ada2f99388dd15fb23586b55c0785b7f4df3747a..9c57c02e54f6f7ee8216b3a6db0e832780570a8a 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <asm/bug.h>
 #include <asm/paravirt.h>
+#include <asm/debugreg.h>
 #include <asm/desc.h>
 #include <asm/setup.h>
 #include <asm/pgtable.h>
index 036efbea8b2832679136abe34e19cd7ebdff6498..aef7140c00632bacba55162da625dd4d6d8e631d 100644 (file)
@@ -1,3 +1,4 @@
+#include <linux/bug.h>
 #include <linux/kernel.h>
 
 #include "opcode.h"
index 7b4eeb7b4a8c5c3205e1f5c91cd3e51c53658c42..19a0114d2e3b1f70a16a2b9f0e832f165908bdc7 100644 (file)
@@ -24,6 +24,7 @@
  *     Alex Deucher <alexander.deucher@amd.com>
  */
 
+#include <linux/bug.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 
index 3a10399e0066ab1d7fecc41b0c5fb02d0aeda755..f85c0af115b5e4411a2767847a54c181d89e4edc 100644 (file)
@@ -24,6 +24,7 @@
  *     Alex Deucher <alexander.deucher@amd.com>
  */
 
+#include <linux/bug.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 
index 73e2c7c6edbc63c02e35a198a684e40708c65c8f..34c8b2340f33384950960919aef01ffb82fd5fd3 100644 (file)
@@ -24,6 +24,7 @@
  *     Alex Deucher <alexander.deucher@amd.com>
  */
 
+#include <linux/bug.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 
index a7124b483adf178aa936b5b38141b69f6d01f008..ec415e7dfa4b1aab1fbffcaeb226538fd1076617 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include <linux/types.h>
+#include <linux/bug.h>
 #include <linux/kernel.h>
 
 const u32 si_default_state[] =
index b008773323b32f3e64bad92f65a8f838f4e1cb51..5957c3a439ace7fec16e7845923793cd5f101039 100644 (file)
@@ -91,6 +91,7 @@
 #include "hcf.h"                // HCF and MSF common include file
 #include "hcfdef.h"             // HCF specific include file
 #include "mmd.h"                // MoreModularDriver common include file
+#include <linux/bug.h>
 #include <linux/kernel.h>
 
 #if ! defined offsetof
index 445d768eea44dfed9269c9c28918612d1ae3b6f6..a59d27126338e43939f8fc04942acf13c956f1e4 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/sched.h>
+#include <linux/bug.h>
 #include <linux/workqueue.h>
 #include <asm/unaligned.h>
 #include <linux/bitops.h>
index 9fa3f96e38cf291a298232e6051c6af651a205c0..2e248d8924dc34c38fa0ed91fdaa619060c9a603 100644 (file)
@@ -2,6 +2,7 @@
 #define _ASM_GENERIC_DMA_MAPPING_H
 
 #include <linux/kmemcheck.h>
+#include <linux/bug.h>
 #include <linux/scatterlist.h>
 #include <linux/dma-debug.h>
 #include <linux/dma-attrs.h>
index a03c098b0cce94e06c87e022fb33f9e19b8f89cb..125c54e985170440a7ccd99f41fc35b922be150c 100644 (file)
@@ -5,6 +5,7 @@
 #ifdef CONFIG_MMU
 
 #include <linux/mm_types.h>
+#include <linux/bug.h>
 
 #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
 extern int ptep_set_access_flags(struct vm_area_struct *vma,
index c7af037024c787bb1c02c95ee6b7f2a2200cc1d7..d6d0a88430fed492e0aed40d5d802d8295165603 100644 (file)
@@ -9,6 +9,8 @@
 #error need to implement an architecture specific asm/tlbflush.h
 #endif
 
+#include <linux/bug.h>
+
 static inline void flush_tlb_mm(struct mm_struct *mm)
 {
        BUG();
index 26c1f78d136f49ca375035f65139da7328c51552..d6d1da468c9729404b17fc324dec192266da1417 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <linux/workqueue.h>
 #include <linux/spinlock.h>
+#include <linux/bug.h>
 #include <linux/wait.h>
 #include <linux/errno.h>
 #include <linux/kobject.h>
index f4ff882cb2daa864d5e0e0c318783229ebf5d9f5..42c471afc52af8be4b5af53e202eeca07274f186 100644 (file)
@@ -217,6 +217,7 @@ struct atm_cirange {
 #include <linux/wait.h> /* wait_queue_head_t */
 #include <linux/time.h> /* struct timeval */
 #include <linux/net.h>
+#include <linux/bug.h>
 #include <linux/skbuff.h> /* struct sk_buff */
 #include <linux/uio.h>
 #include <net/sock.h>
index de5422a57511c5f59af76071318a5aec547baf4a..4d94eb8bcbccc224bd0206cb435b1f052ddaaebf 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/highmem.h>
 #include <linux/mempool.h>
 #include <linux/ioprio.h>
+#include <linux/bug.h>
 
 #ifdef CONFIG_BLOCK
 
index ac4d9f8b52e9f7c23e7f8e2d8093e896ec451768..3b5bafce433763a4e7c6bb0302fa373dec7364fb 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/kernel.h>
 #include <linux/preempt.h>
 #include <linux/atomic.h>
+#include <linux/bug.h>
 
 /*
  *  bit-based spin_lock()
index d276b5510c83498bbd4815367ef05cf398beee3b..72961c39576a4af5eb68a45f6bebc18e88935d2e 100644 (file)
@@ -11,6 +11,67 @@ enum bug_trap_type {
 
 struct pt_regs;
 
+#ifdef __CHECKER__
+#define BUILD_BUG_ON_NOT_POWER_OF_2(n)
+#define BUILD_BUG_ON_ZERO(e) (0)
+#define BUILD_BUG_ON_NULL(e) ((void*)0)
+#define BUILD_BUG_ON(condition)
+#define BUILD_BUG() (0)
+#else /* __CHECKER__ */
+
+/* Force a compilation error if a constant expression is not a power of 2 */
+#define BUILD_BUG_ON_NOT_POWER_OF_2(n)                 \
+       BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0))
+
+/* Force a compilation error if condition is true, but also produce a
+   result (of value 0 and type size_t), so the expression can be used
+   e.g. in a structure initializer (or where-ever else comma expressions
+   aren't permitted). */
+#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
+#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
+
+/**
+ * BUILD_BUG_ON - break compile if a condition is true.
+ * @condition: the condition which the compiler should know is false.
+ *
+ * If you have some code which relies on certain constants being equal, or
+ * other compile-time-evaluated condition, you should use BUILD_BUG_ON to
+ * detect if someone changes it.
+ *
+ * The implementation uses gcc's reluctance to create a negative array, but
+ * gcc (as of 4.4) only emits that error for obvious cases (eg. not arguments
+ * to inline functions).  So as a fallback we use the optimizer; if it can't
+ * prove the condition is false, it will cause a link error on the undefined
+ * "__build_bug_on_failed".  This error message can be harder to track down
+ * though, hence the two different methods.
+ */
+#ifndef __OPTIMIZE__
+#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
+#else
+extern int __build_bug_on_failed;
+#define BUILD_BUG_ON(condition)                                        \
+       do {                                                    \
+               ((void)sizeof(char[1 - 2*!!(condition)]));      \
+               if (condition) __build_bug_on_failed = 1;       \
+       } while(0)
+#endif
+
+/**
+ * BUILD_BUG - break compile if used.
+ *
+ * If you have some code that you expect the compiler to eliminate at
+ * build time, you should use BUILD_BUG to detect if it is
+ * unexpectedly used.
+ */
+#define BUILD_BUG()                                            \
+       do {                                                    \
+               extern void __build_bug_failed(void)            \
+                       __linktime_error("BUILD_BUG failed");   \
+               __build_bug_failed();                           \
+       } while (0)
+
+#endif /* __CHECKER__ */
+
 #ifdef CONFIG_GENERIC_BUG
 #include <asm-generic/bug.h>
 
index c5b6939fb32af578501a280f73f2aa7b4276ac37..220ae21e819b1fb2623d19d8cf4f619862f11c42 100644 (file)
@@ -1,8 +1,9 @@
 #ifndef __CEPH_DECODE_H
 #define __CEPH_DECODE_H
 
-#include <asm/unaligned.h>
+#include <linux/bug.h>
 #include <linux/time.h>
+#include <asm/unaligned.h>
 
 #include "types.h"
 
index 95bd8502e715e48f8222345e1274761fee030662..e8cf0ccd1a8dd180c0a21c8dca40c139bbf041b6 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/backing-dev.h>
 #include <linux/completion.h>
 #include <linux/exportfs.h>
+#include <linux/bug.h>
 #include <linux/fs.h>
 #include <linux/mempool.h>
 #include <linux/pagemap.h>
index 4c5cb0880bba099d6bf4cdbb51d1f1bd8cbcb01c..9935fac8c1078f0ca061a46d1d30e73185f6272f 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _FS_CEPH_MDSMAP_H
 #define _FS_CEPH_MDSMAP_H
 
+#include <linux/bug.h>
 #include "types.h"
 
 /*
index 4f7a632374713c73fe096bb81f0f9daf122571c9..7b9b75a529be04fef475c57b30bf351e19695e7b 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/kernel.h>
 #include <linux/threads.h>
 #include <linux/bitmap.h>
+#include <linux/bug.h>
 
 typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
 
index 48ce5479386c60fbc954b972636b53cc1dc9d9fb..b92eadf92d72a06bcfebc64b345d3590977e5a40 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/atomic.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
+#include <linux/bug.h>
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/uaccess.h>
index 5033fb88c107f6ec5189cea9b642a3d00eb1e93a..94f20c1488a19cff3b21e9da5e58d3114c23ffcf 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <linux/kernel.h>
 #include <linux/atomic.h>
+#include <linux/bug.h>
 #include <asm/system.h>
 
 struct task_struct;
index 679b349d9b66695f65bb3597b2a530e3e9709600..a5966f691ef836954ae1bbee69697c81e98590bd 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <linux/device.h>
 #include <linux/uio.h>
+#include <linux/bug.h>
 #include <linux/scatterlist.h>
 #include <linux/bitmap.h>
 #include <asm/page.h>
index 394a3e0e4a6be1f566d5346dd586cf7fd06ba19d..0698c79fbcb2c19453d73e15ad4d903e8b610cc3 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/time.h>
 #ifdef __KERNEL__
 #include <linux/user.h>
+#include <linux/bug.h>
 #endif
 #include <linux/ptrace.h>
 #include <linux/elf.h>
index f957085d40ed33a0bfacf002543d477aa6cc9d4c..f5a84eef6ed22a121fae3e373c827e7b645095a0 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <linux/types.h>
 #include <linux/magic.h>
+#include <linux/bug.h>
 
 /*
  * The second extended filesystem constants/structures
index 9bbe1a9ac432d12f78960da276cb4ea197ecd3ae..fa63f1b46103eceba8a380851c30500f30978c65 100644 (file)
@@ -389,6 +389,7 @@ struct inodes_stat_t {
 #include <linux/prio_tree.h>
 #include <linux/init.h>
 #include <linux/pid.h>
+#include <linux/bug.h>
 #include <linux/mutex.h>
 #include <linux/capability.h>
 #include <linux/semaphore.h>
index 2a53f10712b36097b648e4a61cb6323e5a42de84..a6dfe6944564018d070529e5e42642b8aca31de4 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/fsnotify_backend.h>
 #include <linux/audit.h>
 #include <linux/slab.h>
+#include <linux/bug.h>
 
 /*
  * fsnotify_d_instantiate - instantiate a dentry for inode
index 38ac48b7d3a8db90bf0ff7630df25c2d8880ecb9..ed5a46707ad0d0cd229e36920aa510b4d79fb279 100644 (file)
@@ -34,6 +34,7 @@ struct gpio {
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/errno.h>
+#include <linux/bug.h>
 
 struct device;
 struct gpio_chip;
index 6549ed75e0a72f9364f9fc3dce94cb6c07405c5e..d3999b4e26ccfa49090f2a99927af235eedca6aa 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <linux/fs.h>
 #include <linux/kernel.h>
+#include <linux/bug.h>
 #include <linux/mm.h>
 #include <linux/uaccess.h>
 #include <linux/hardirq.h>
index a6deef4f4f67abd63f39d5b8ab96fdf91e9f98c8..d23c3c20b2014e665ba4754b8168018e4b7862cc 100644 (file)
@@ -24,6 +24,7 @@
 #define I2O_MAX_DRIVERS                8
 
 #include <linux/pci.h>
+#include <linux/bug.h>
 #include <linux/dma-mapping.h>
 #include <linux/string.h>
 #include <linux/slab.h>
index 33a6e1951d4df57bc2d9bad947e71713fa5aa7c7..a810987cb80e47cd2a344dd1e3d289a6d3b46371 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/rtnetlink.h>
+#include <linux/bug.h>
 
 #define VLAN_HLEN      4               /* The additional bytes required by VLAN
                                         * (in addition to the Ethernet header)
index e44e84f0156c06a8ba512b11aa38081ef323f703..657fab4efab351070a9aaf7a625759159a786580 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <linux/types.h>
 #include <linux/slab.h>
+#include <linux/bug.h>
 #include <asm/io.h>
 #include <asm/page.h>
 
index 3e140add5360c54553cb0c473dd8f0aa8e433fd5..5db52d0ff1d44ab240de7f0892e241c0c3b0922f 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/printk.h>
 #include <linux/dynamic_debug.h>
 #include <asm/byteorder.h>
-#include <asm/bug.h>
 
 #define USHRT_MAX      ((u16)(~0U))
 #define SHRT_MAX       ((s16)(USHRT_MAX>>1))
@@ -677,67 +676,6 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { }
        const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
        (type *)( (char *)__mptr - offsetof(type,member) );})
 
-#ifdef __CHECKER__
-#define BUILD_BUG_ON_NOT_POWER_OF_2(n)
-#define BUILD_BUG_ON_ZERO(e) (0)
-#define BUILD_BUG_ON_NULL(e) ((void*)0)
-#define BUILD_BUG_ON(condition)
-#define BUILD_BUG() (0)
-#else /* __CHECKER__ */
-
-/* Force a compilation error if a constant expression is not a power of 2 */
-#define BUILD_BUG_ON_NOT_POWER_OF_2(n)                 \
-       BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0))
-
-/* Force a compilation error if condition is true, but also produce a
-   result (of value 0 and type size_t), so the expression can be used
-   e.g. in a structure initializer (or where-ever else comma expressions
-   aren't permitted). */
-#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
-#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
-
-/**
- * BUILD_BUG_ON - break compile if a condition is true.
- * @condition: the condition which the compiler should know is false.
- *
- * If you have some code which relies on certain constants being equal, or
- * other compile-time-evaluated condition, you should use BUILD_BUG_ON to
- * detect if someone changes it.
- *
- * The implementation uses gcc's reluctance to create a negative array, but
- * gcc (as of 4.4) only emits that error for obvious cases (eg. not arguments
- * to inline functions).  So as a fallback we use the optimizer; if it can't
- * prove the condition is false, it will cause a link error on the undefined
- * "__build_bug_on_failed".  This error message can be harder to track down
- * though, hence the two different methods.
- */
-#ifndef __OPTIMIZE__
-#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
-#else
-extern int __build_bug_on_failed;
-#define BUILD_BUG_ON(condition)                                        \
-       do {                                                    \
-               ((void)sizeof(char[1 - 2*!!(condition)]));      \
-               if (condition) __build_bug_on_failed = 1;       \
-       } while(0)
-#endif
-
-/**
- * BUILD_BUG - break compile if used.
- *
- * If you have some code that you expect the compiler to eliminate at
- * build time, you should use BUILD_BUG to detect if it is
- * unexpectedly used.
- */
-#define BUILD_BUG()                                            \
-       do {                                                    \
-               extern void __build_bug_failed(void)            \
-                       __linktime_error("BUILD_BUG failed");   \
-               __build_bug_failed();                           \
-       } while (0)
-
-#endif /* __CHECKER__ */
-
 /* Trap pasters of __FUNCTION__ at compile-time */
 #define __FUNCTION__ (__func__)
 
index dce6e4dbeda7639bc87eca49e9102a41c0f01c89..b6e1f8c00577151bf937a1f2dc5807b53decf64b 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/list.h>
 #include <linux/notifier.h>
 #include <linux/smp.h>
+#include <linux/bug.h>
 #include <linux/percpu.h>
 #include <linux/spinlock.h>
 #include <linux/rcupdate.h>
index 900c76337e8f387b1dcf183260e43c1625536500..ca1b153585d3e6e2196f5d5c147d965c6bd84f14 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/spinlock.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
+#include <linux/bug.h>
 #include <linux/mm.h>
 #include <linux/mmu_notifier.h>
 #include <linux/preempt.h>
index 0b8e2a742600eb92cb874c6056dac76177dc7c30..910550f3b70e485a58d07f542b610f15d88e5d44 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/mmzone.h>
 #include <linux/spinlock.h>
 #include <linux/notifier.h>
+#include <linux/bug.h>
 
 struct page;
 struct zone;
index a6fabdfd34c56700205a16b31aa9982cbbad68af..cf7982336103ffe86d78faedb61e1ce62529ac35 100644 (file)
@@ -6,6 +6,7 @@
 #ifdef __KERNEL__
 
 #include <linux/gfp.h>
+#include <linux/bug.h>
 #include <linux/list.h>
 #include <linux/mmzone.h>
 #include <linux/rbtree.h>
index d5d2ec6494bbefc3c662352d57a7fe794955ab36..37ef6b19408966438d24b39a8e80f0d55a578ecc 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <linux/delay.h>
 #include <linux/types.h>
+#include <linux/bug.h>
 #include <linux/interrupt.h>
 #include <linux/mtd/flashchip.h>
 #include <linux/mtd/map.h>
index 8debe299676def907931e6580f15886cf80402f3..33b4f66374bd59cb5c024cd0889dc313fc926a54 100644 (file)
@@ -33,6 +33,7 @@
 #ifdef __KERNEL__
 #include <linux/pm_qos.h>
 #include <linux/timer.h>
+#include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/atomic.h>
 #include <asm/cache.h>
index 7454ad7451b49f1d9423254f8e877dda51ea4f4c..89bd4a4dcfb44e379176a11e5fe6d9516025ecaf 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/types.h>
 #include <linux/ioctl.h>
 #include <linux/magic.h>
+#include <linux/bug.h>
 
 
 #define NILFS_INODE_BMAP_SIZE  7
index 6b25758e028e06fc1e3d4db30a6cd88c175f3039..c88d2a9451af811bff67e3ee9c8d37c8ef691ef3 100644 (file)
@@ -6,6 +6,7 @@
 #define PAGE_FLAGS_H
 
 #include <linux/types.h>
+#include <linux/bug.h>
 #ifndef __GENERATING_BOUNDS_H
 #include <linux/mm_types.h>
 #include <generated/bounds.h>
index e7cf6669ac3482e606c04e90470af6a37d4adcf4..f5bd679be46b50a93903b768754b7a363507c767 100644 (file)
@@ -2,6 +2,7 @@
 #define _LINUX_PID_NS_H
 
 #include <linux/sched.h>
+#include <linux/bug.h>
 #include <linux/mm.h>
 #include <linux/threads.h>
 #include <linux/nsproxy.h>
index b7681102a4b9a306409d261f04db33b482378e4c..11bad91c443391d82521cfa1a48153d81e0a7034 100644 (file)
@@ -8,6 +8,7 @@
 #ifndef __LINUX_POSIX_ACL_H
 #define __LINUX_POSIX_ACL_H
 
+#include <linux/bug.h>
 #include <linux/slab.h>
 #include <linux/rcupdate.h>
 
index 407c678d2e30ff1ff5515c1f8eead04647e61e95..5c719627c2aa7bc58431ba5aa66195f9f89113ee 100644 (file)
 #include <linux/compiler.h>            /* For unlikely.  */
 #include <linux/sched.h>               /* For struct task_struct.  */
 #include <linux/err.h>                 /* for IS_ERR_VALUE */
+#include <linux/bug.h>                 /* For BUG_ON.  */
 
 
 extern long arch_ptrace(struct task_struct *child, long request,
index 07e360b1b282b61b92c08fad6ebba553bc0bcb4d..e9a48234e69396650a7169ec0ba65e5f73e492ec 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <linux/preempt.h>
 #include <linux/types.h>
+#include <linux/bug.h>
 #include <linux/kernel.h>
 #include <linux/rcupdate.h>
 
index 2c62594b67ddd65fd6602b1534f3f62019cc7619..20fb776a1d4a50824323d33fd0c9bcd84bd16883 100644 (file)
@@ -42,6 +42,7 @@
 #include <linux/lockdep.h>
 #include <linux/completion.h>
 #include <linux/debugobjects.h>
+#include <linux/bug.h>
 #include <linux/compiler.h>
 
 #ifdef CONFIG_RCU_TORTURE_TEST
index 686f37327a4949f50ad3d02b888f8f445f291ece..8e0c9febf495f5c9dd9f397a91f1d4307dd4aaf9 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <linux/compiler.h>
 #include <linux/types.h>
+#include <linux/bug.h>
 #include <linux/uaccess.h>
 struct task_struct;
 struct user_regset;
index a822fd71fd64efcceec896709dbe7b86c500ced0..91cacc34c159192ab5a7fa712982ea5a8d268b59 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/timer.h>
 #include <linux/wait.h>
 #include <linux/list.h>
+#include <linux/bug.h>
 #include <linux/fs.h>
 #include <linux/poll.h>
 #include <linux/kref.h>
index 9aaf5bfdad1afcb5e85b39482ea0458a0ea6b83c..ac9586dadfa58bdbade8fbb8391ea023d6d491aa 100644 (file)
@@ -1,10 +1,12 @@
 #ifndef _LINUX_SCATTERLIST_H
 #define _LINUX_SCATTERLIST_H
 
+#include <linux/string.h>
+#include <linux/bug.h>
+#include <linux/mm.h>
+
 #include <asm/types.h>
 #include <asm/scatterlist.h>
-#include <linux/mm.h>
-#include <linux/string.h>
 #include <asm/io.h>
 
 struct sg_table {
index 54e5ae7f8adc11df121a015c08baa0dcfaeda98c..fc61854f62247b9cbaf7bf490d8580f99d54b34e 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <linux/types.h>
 #include <linux/string.h>
+#include <linux/bug.h>
 #include <linux/mutex.h>
 #include <linux/cpumask.h>
 #include <linux/nodemask.h>
index a2b9953b582d9a3f69a97fe31b084a43a2a6a3bd..3fcb204a261229167587ab1bce52224e085ca620 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/kmemcheck.h>
 #include <linux/compiler.h>
 #include <linux/time.h>
+#include <linux/bug.h>
 #include <linux/cache.h>
 
 #include <linux/atomic.h>
index a32bcfdc783499d1f44f30f01b53468f75be8d56..ca122b36aec1220b2cf7762704306cb99c6ae635 100644 (file)
@@ -8,6 +8,7 @@
  */
 #include <linux/types.h>
 #include <linux/gfp.h>
+#include <linux/bug.h>
 #include <linux/workqueue.h>
 #include <linux/kobject.h>
 
index 7df6c17b0281867241ffa64de8429f6ff84d5d17..363239087263a0fbb60d7bc1dc25c1ee59846817 100644 (file)
@@ -375,10 +375,7 @@ static inline int spin_can_lock(spinlock_t *lock)
        return raw_spin_can_lock(&lock->rlock);
 }
 
-static inline void assert_spin_locked(spinlock_t *lock)
-{
-       assert_raw_spin_locked(&lock->rlock);
-}
+#define assert_spin_locked(lock)       assert_raw_spin_locked(&(lock)->rlock)
 
 /*
  * Pull the atomic_t declaration:
index eba52a100533349461c1965f996074c187eaab08..6b05dcd927ff564dba51d6f4b4e7bc19fb1cb366 100644 (file)
@@ -2,6 +2,7 @@
 #define LINUX_SSB_DRIVER_GIGE_H_
 
 #include <linux/ssb/ssb.h>
+#include <linux/bug.h>
 #include <linux/pci.h>
 #include <linux/spinlock.h>
 
index 2189d3ffc85dc1adf60a775023077e8b9f395ada..792d16d9cbc74ff903c9d89e21726e1b5e3f54f7 100644 (file)
@@ -2,6 +2,7 @@
 #define _LINUX_SWAPOPS_H
 
 #include <linux/radix-tree.h>
+#include <linux/bug.h>
 
 /*
  * swapcache pages are stored in the swapper_space radix tree.  We want to
index 8ec1153ff57b9c3c4d4b6c7360fd01bbdaebbc2c..3de3acb84a952ead111b90391756873efc15ebcb 100644 (file)
@@ -68,6 +68,7 @@ struct file_handle;
 #include <linux/aio_abi.h>
 #include <linux/capability.h>
 #include <linux/list.h>
+#include <linux/bug.h>
 #include <linux/sem.h>
 #include <asm/siginfo.h>
 #include <asm/signal.h>
index 9ae8da3e6407bf5c71bff5c26a337d2e59411e30..11087cdd4ad3e2856659d13a00117bd909c07711 100644 (file)
@@ -10,6 +10,7 @@
 #define _TRANSPORT_CLASS_H_
 
 #include <linux/device.h>
+#include <linux/bug.h>
 #include <linux/attribute_container.h>
 
 struct transport_container;
index 5206d6541da5726bde95c96e2ab8fa4e63be2ceb..7323a33902069b276885884eca614a9d0a0aeb17 100644 (file)
@@ -53,6 +53,7 @@
 
 #ifdef __KERNEL__
 #include <linux/err.h>
+#include <linux/bug.h>
 #include <linux/virtio.h>
 
 /**
index 69b7ad3a9925d37055b7ca0f4174066121f39ac7..248fb05feb639aef5ae8d099a3e651d129ea2d14 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/netdevice.h>
 #include <linux/debugfs.h>
 #include <linux/list.h>
+#include <linux/bug.h>
 #include <linux/netlink.h>
 #include <linux/skbuff.h>
 #include <linux/nl80211.h>
index 344c8dd028745857bdbe43efd85f386c0a64eade..59c5d18cc3857da85690627b085e1065eeeb78ad 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/netdevice.h>
 #include <linux/rtnetlink.h>
 #include <linux/rcupdate.h>
+#include <linux/bug.h>
 #include <linux/jiffies.h>
 #include <net/neighbour.h>
 #include <asm/processor.h>
index ebe517f2da9fb31a7e26322d69944480d51a6b31..2bdee51ba30d29f1ccd296fdbdcd06a709a5b4c4 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/atomic.h>                 /* for struct atomic_t */
 #include <linux/compiler.h>
 #include <linux/timer.h>
+#include <linux/bug.h>
 
 #include <net/checksum.h>
 #include <linux/netfilter.h>           /* for union nf_inet_addr */
index 9a012be615ffba4f145aa1846906eed9ce8e5b82..774cd3e0dcb685dd058f695a4bd93f5ba41dd1d8 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef MAC80211_H
 #define MAC80211_H
 
+#include <linux/bug.h>
 #include <linux/kernel.h>
 #include <linux/if_ether.h>
 #include <linux/skbuff.h>
index d55f4344333514f43f26d4da76d53574b6a9bd48..0931618c0f7ff6d41f72db1103b2aa0dc474e21f 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef __NET_GENERIC_H__
 #define __NET_GENERIC_H__
 
+#include <linux/bug.h>
 #include <linux/rcupdate.h>
 
 /*
index 28068ec614b24da11b9cb3e9a390abb7aea5f47a..77d4c3745cb5be169f87507a34349cd853e8da10 100644 (file)
@@ -2,6 +2,7 @@
 #define __NET_SCHED_RED_H
 
 #include <linux/types.h>
+#include <linux/bug.h>
 #include <net/pkt_sched.h>
 #include <net/inet_ecn.h>
 #include <net/dsfield.h>
index 8607e6aad42ba214b1718208da3ab799d5f19b88..f75a04d752cb394d02586f4d4a8632a63d01cd13 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <linux/list.h>
 #include <linux/tcp.h>
+#include <linux/bug.h>
 #include <linux/slab.h>
 #include <linux/cache.h>
 #include <linux/percpu.h>
index 053b3cf2c66a05b510b597070152ba26942cd35d..8d6689cb2c6606821f4a6e0fcd8c2b07358fc561 100644 (file)
@@ -12,6 +12,7 @@
 #define _TIMEWAIT_SOCK_H
 
 #include <linux/slab.h>
+#include <linux/bug.h>
 #include <net/sock.h>
 
 struct timewait_sock_ops {
index e39592f682c3fb55c42ea2f04d027bdbbde78fc5..5d606d9da9e56b30927e29228046742b23ed8d8b 100644 (file)
@@ -23,6 +23,7 @@
 #define _UDP_H
 
 #include <linux/list.h>
+#include <linux/bug.h>
 #include <net/inet_sock.h>
 #include <net/sock.h>
 #include <net/snmp.h>
index d86fffd3c03cc768189a67e775042173b508d05e..ff27f1b078d119173bd86b663df5fe770b4da7c7 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <linux/netdevice.h>
 #include <linux/mutex.h>
+#include <linux/bug.h>
 
 struct wpan_phy {
        struct mutex pib_lock;
index f05fa826f89ec4664099a05d92a4ae6abbea6b62..a5f9b960dfc8f0ca329c1fc510956f379e817fdd 100644 (file)
@@ -26,6 +26,7 @@
 #include <scsi/osd_attributes.h>
 #include <scsi/osd_sec.h>
 #include <linux/pnfs_osd_xdr.h>
+#include <linux/bug.h>
 
 struct ore_comp {
        struct osd_obj_id       obj;
index 0de32cd4e8a7c21d3a931c8d81381577b9853bb4..af244f4bba53cdfd4447535a14255c8f81e117ad 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <linux/transport_class.h>
 #include <linux/blkdev.h>
+#include <linux/bug.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_device.h>
 
index 0c33cde2a1e625e93b269351c9c2e957c95e366a..cb99b91c3a1d3af01b012fc421d69c8935733556 100644 (file)
@@ -9,6 +9,7 @@
  * (at your option) any later version.
  */
 #include <linux/init.h>
+#include <linux/bug.h>
 #include <linux/kernel.h>
 #include <linux/atomic.h>
 
index 5576c28414968a1d384913885bfa8c3e5cd2b1c9..57c38c6e39cd71228296260c4c05a0531dd8f046 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <linux/module.h>
 #include <linux/average.h>
+#include <linux/kernel.h>
 #include <linux/bug.h>
 #include <linux/log2.h>
 
index 0d4a127dd9b3d478091a471df6386b7f85b25bbc..90a683b34075a1d6c901630ffe0bf75c017f3d68 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/errno.h>
 #include <linux/bitmap.h>
 #include <linux/bitops.h>
+#include <linux/bug.h>
 #include <asm/uaccess.h>
 
 /*
index da053313ee5c089e099d02c9a368eb4f4aacaf56..8b1ab6222562ee9d973e51595c4bd9be9835c196 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <linux/module.h>
 #include <linux/bitmap.h>
+#include <linux/bug.h>
 
 int iommu_is_span_boundary(unsigned int index, unsigned int nr,
                           unsigned long shift,
index b8029a5583ff669f09d3debf27ef442412d8211c..1bf2fe36f8135277c0976e5a3630cd50c087b8e7 100644 (file)
@@ -8,6 +8,8 @@
 
 #include <linux/module.h>
 #include <linux/list.h>
+#include <linux/bug.h>
+#include <linux/kernel.h>
 
 /*
  * Insert a new entry between two known consecutive entries.
index a0a4da489c22598748d7cea6da7e444d3b95f579..6ab0e521c48b93593c141a999e16b93937a993c0 100644 (file)
@@ -23,6 +23,7 @@
  * information.
  */
 
+#include <linux/bug.h>
 #include <linux/plist.h>
 #include <linux/spinlock.h>
 
index 3a03782720c8b91c14269548f1debe3ab0191cac..3a15eb16f48aae21c8bf09fe8c673abad401ce58 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
+#include <linux/bug.h>
 #include <linux/module.h>
 
 #ifndef __HAVE_ARCH_STRNICMP
index 191176a43e9a2523d37aa4381d08b3421c3bcfa7..14c640355eb1245a757fd37cba8d8ee9c9661d8e 100644 (file)
@@ -22,6 +22,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <linux/bug.h>
 #include <linux/timerqueue.h>
 #include <linux/rbtree.h>
 #include <linux/module.h>