summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSteven Cole <elenstev@mesatop.com>2003-05-12 05:56:54 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-05-12 05:56:54 -0700
commit1bdbda8c33e76c91d2f19e7c8c11f4df1b28d9cc (patch)
treee41c7eccdd6cb28e73e1533724ef79c510d9a1f2 /include
parent3f26cc016374d9d7d5b83456b218c02c33233328 (diff)
[PATCH] Use '#ifdef' to test for CONFIG_xxx variables
Don't depend on undefined preprocessor symbols evaluating to zero.
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/hardirq.h2
-rw-r--r--include/asm-alpha/kmap_types.h2
-rw-r--r--include/asm-alpha/spinlock.h8
-rw-r--r--include/asm-h8300/hardirq.h4
-rw-r--r--include/asm-ia64/hardirq.h2
-rw-r--r--include/asm-ia64/kmap_types.h2
-rw-r--r--include/asm-ia64/sn/addrs.h2
-rw-r--r--include/asm-m68k/hardirq.h2
-rw-r--r--include/asm-m68knommu/hardirq.h4
-rw-r--r--include/asm-parisc/hardirq.h2
-rw-r--r--include/asm-parisc/kmap_types.h2
-rw-r--r--include/asm-ppc/hardirq.h2
-rw-r--r--include/asm-ppc/spinlock.h4
-rw-r--r--include/asm-s390/hardirq.h2
-rw-r--r--include/asm-sparc/hardirq.h4
-rw-r--r--include/asm-sparc64/hardirq.h2
-rw-r--r--include/asm-um/pgtable.h2
-rw-r--r--include/asm-v850/hardirq.h2
-rw-r--r--include/asm-x86_64/hardirq.h2
-rw-r--r--include/linux/blkdev.h2
20 files changed, 27 insertions, 27 deletions
diff --git a/include/asm-alpha/hardirq.h b/include/asm-alpha/hardirq.h
index 6329743f61fb..e188ed9cf870 100644
--- a/include/asm-alpha/hardirq.h
+++ b/include/asm-alpha/hardirq.h
@@ -79,7 +79,7 @@ typedef struct {
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
#define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
diff --git a/include/asm-alpha/kmap_types.h b/include/asm-alpha/kmap_types.h
index e7e1f7c8d148..3d10cd3ea75f 100644
--- a/include/asm-alpha/kmap_types.h
+++ b/include/asm-alpha/kmap_types.h
@@ -5,7 +5,7 @@
#include <linux/config.h>
-#if CONFIG_DEBUG_HIGHMEM
+#ifdef CONFIG_DEBUG_HIGHMEM
# define D(n) __KM_FENCE_##n ,
#else
# define D(n)
diff --git a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h
index 6bcb25bf29b0..bab905918612 100644
--- a/include/asm-alpha/spinlock.h
+++ b/include/asm-alpha/spinlock.h
@@ -16,7 +16,7 @@
typedef struct {
volatile unsigned int lock /*__attribute__((aligned(32))) */;
-#if CONFIG_DEBUG_SPINLOCK
+#ifdef CONFIG_DEBUG_SPINLOCK
int on_cpu;
int line_no;
void *previous;
@@ -25,7 +25,7 @@ typedef struct {
#endif
} spinlock_t;
-#if CONFIG_DEBUG_SPINLOCK
+#ifdef CONFIG_DEBUG_SPINLOCK
#define SPIN_LOCK_UNLOCKED (spinlock_t) {0, -1, 0, 0, 0, 0}
#define spin_lock_init(x) \
((x)->lock = 0, (x)->on_cpu = -1, (x)->previous = 0, (x)->task = 0)
@@ -37,7 +37,7 @@ typedef struct {
#define spin_is_locked(x) ((x)->lock != 0)
#define spin_unlock_wait(x) ({ do { barrier(); } while ((x)->lock); })
-#if CONFIG_DEBUG_SPINLOCK
+#ifdef CONFIG_DEBUG_SPINLOCK
extern void _raw_spin_unlock(spinlock_t * lock);
extern void debug_spin_lock(spinlock_t * lock, const char *, int);
extern int debug_spin_trylock(spinlock_t * lock, const char *, int);
@@ -102,7 +102,7 @@ typedef struct {
#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
#define rwlock_is_locked(x) (*(volatile int *)(x) != 0)
-#if CONFIG_DEBUG_RWLOCK
+#ifdef CONFIG_DEBUG_RWLOCK
extern void _raw_write_lock(rwlock_t * lock);
extern void _raw_read_lock(rwlock_t * lock);
#else
diff --git a/include/asm-h8300/hardirq.h b/include/asm-h8300/hardirq.h
index 964e681be733..20f3571cc299 100644
--- a/include/asm-h8300/hardirq.h
+++ b/include/asm-h8300/hardirq.h
@@ -74,13 +74,13 @@ typedef struct {
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
diff --git a/include/asm-ia64/hardirq.h b/include/asm-ia64/hardirq.h
index 54be084906ee..b22a6fed7c05 100644
--- a/include/asm-ia64/hardirq.h
+++ b/include/asm-ia64/hardirq.h
@@ -85,7 +85,7 @@
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
diff --git a/include/asm-ia64/kmap_types.h b/include/asm-ia64/kmap_types.h
index d54e19055e6c..bc777525fa12 100644
--- a/include/asm-ia64/kmap_types.h
+++ b/include/asm-ia64/kmap_types.h
@@ -3,7 +3,7 @@
#include <linux/config.h>
-#if CONFIG_DEBUG_HIGHMEM
+#ifdef CONFIG_DEBUG_HIGHMEM
# define D(n) __KM_FENCE_##n ,
#else
# define D(n)
diff --git a/include/asm-ia64/sn/addrs.h b/include/asm-ia64/sn/addrs.h
index fa31d2fff5ff..e77dd4b29bf6 100644
--- a/include/asm-ia64/sn/addrs.h
+++ b/include/asm-ia64/sn/addrs.h
@@ -215,7 +215,7 @@
#define REMOTE_HUB_ADDR(_n, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \
0x800000 + (_x)))
#endif
-#if CONFIG_IA64_SGI_SN1
+#ifdef CONFIG_IA64_SGI_SN1
#define REMOTE_HUB_PI_ADDR(_n, _sn, _x) (HUBREG_CAST (NODE_SWIN_BASE(_n, 1) + \
0x800000 + PIREG(_x, _sn)))
#endif
diff --git a/include/asm-m68k/hardirq.h b/include/asm-m68k/hardirq.h
index 5a5db2a7718e..a325c74ba8cc 100644
--- a/include/asm-m68k/hardirq.h
+++ b/include/asm-m68k/hardirq.h
@@ -73,7 +73,7 @@ typedef struct {
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
diff --git a/include/asm-m68knommu/hardirq.h b/include/asm-m68knommu/hardirq.h
index 6e8670859dd9..f8dbdf2de0e7 100644
--- a/include/asm-m68knommu/hardirq.h
+++ b/include/asm-m68knommu/hardirq.h
@@ -72,13 +72,13 @@ typedef struct {
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
diff --git a/include/asm-parisc/hardirq.h b/include/asm-parisc/hardirq.h
index 72c49f434b11..dc9b4b73886b 100644
--- a/include/asm-parisc/hardirq.h
+++ b/include/asm-parisc/hardirq.h
@@ -87,7 +87,7 @@ typedef struct {
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# error CONFIG_PREEMT currently not supported.
# define in_atomic() BUG()
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
diff --git a/include/asm-parisc/kmap_types.h b/include/asm-parisc/kmap_types.h
index bc8bff06d35b..6886a0c3fedf 100644
--- a/include/asm-parisc/kmap_types.h
+++ b/include/asm-parisc/kmap_types.h
@@ -3,7 +3,7 @@
#include <linux/config.h>
-#if CONFIG_DEBUG_HIGHMEM
+#ifdef CONFIG_DEBUG_HIGHMEM
# define D(n) __KM_FENCE_##n ,
#else
# define D(n)
diff --git a/include/asm-ppc/hardirq.h b/include/asm-ppc/hardirq.h
index f83d013093f7..fe936aebf038 100644
--- a/include/asm-ppc/hardirq.h
+++ b/include/asm-ppc/hardirq.h
@@ -82,7 +82,7 @@ typedef struct {
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
diff --git a/include/asm-ppc/spinlock.h b/include/asm-ppc/spinlock.h
index 8c3cabafe674..a754e377086e 100644
--- a/include/asm-ppc/spinlock.h
+++ b/include/asm-ppc/spinlock.h
@@ -17,7 +17,7 @@ typedef struct {
} spinlock_t;
#ifdef __KERNEL__
-#if CONFIG_DEBUG_SPINLOCK
+#ifdef CONFIG_DEBUG_SPINLOCK
#define SPINLOCK_DEBUG_INIT , 0, 0
#else
#define SPINLOCK_DEBUG_INIT /* */
@@ -86,7 +86,7 @@ typedef struct {
#endif
} rwlock_t;
-#if CONFIG_DEBUG_SPINLOCK
+#ifdef CONFIG_DEBUG_SPINLOCK
#define RWLOCK_DEBUG_INIT , 0
#else
#define RWLOCK_DEBUG_INIT /* */
diff --git a/include/asm-s390/hardirq.h b/include/asm-s390/hardirq.h
index 49218029d753..bf4fff61f6e1 100644
--- a/include/asm-s390/hardirq.h
+++ b/include/asm-s390/hardirq.h
@@ -82,7 +82,7 @@ extern void do_call_softirq(void);
#define invoke_softirq() do_call_softirq()
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define in_atomic() (in_interrupt() || preempt_count() == PREEMPT_ACTIVE)
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
diff --git a/include/asm-sparc/hardirq.h b/include/asm-sparc/hardirq.h
index 04644f2f2930..739dffa31747 100644
--- a/include/asm-sparc/hardirq.h
+++ b/include/asm-sparc/hardirq.h
@@ -89,7 +89,7 @@ typedef struct {
#ifndef CONFIG_SMP
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
@@ -115,7 +115,7 @@ do { \
#define irq_exit() br_read_unlock(BR_GLOBALIRQ_LOCK)
#endif
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
#else
# define in_atomic() (preempt_count() != 0)
diff --git a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h
index 9657368f4ad2..44a4e97f4793 100644
--- a/include/asm-sparc64/hardirq.h
+++ b/include/asm-sparc64/hardirq.h
@@ -84,7 +84,7 @@ typedef struct {
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h
index 568a80bc0336..961a6af9b44b 100644
--- a/include/asm-um/pgtable.h
+++ b/include/asm-um/pgtable.h
@@ -71,7 +71,7 @@ extern unsigned long high_physmem;
#define VMALLOC_START (((unsigned long) high_physmem + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#define VMALLOC_VMADDR(x) ((unsigned long)(x))
-#if CONFIG_HIGHMEM
+#ifdef CONFIG_HIGHMEM
# define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE)
#else
# define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE)
diff --git a/include/asm-v850/hardirq.h b/include/asm-v850/hardirq.h
index a093bf233ebd..7bb8bf4f1fdf 100644
--- a/include/asm-v850/hardirq.h
+++ b/include/asm-v850/hardirq.h
@@ -72,7 +72,7 @@ typedef struct {
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
diff --git a/include/asm-x86_64/hardirq.h b/include/asm-x86_64/hardirq.h
index a9c415b00b89..60530fc41be0 100644
--- a/include/asm-x86_64/hardirq.h
+++ b/include/asm-x86_64/hardirq.h
@@ -81,7 +81,7 @@ typedef struct {
#define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET)
-#if CONFIG_PREEMPT
+#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 4c53e7bbcc25..6e0fc430b428 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -304,7 +304,7 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn;
#define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT)
#define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD)
-#if CONFIG_MMU
+#ifdef CONFIG_MMU
extern int init_emergency_isa_pool(void);
extern void blk_queue_bounce(request_queue_t *q, struct bio **bio);
#else