summaryrefslogtreecommitdiff
path: root/include/asm-alpha
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/asm-alpha
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/asm-alpha')
-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
3 files changed, 6 insertions, 6 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