Commit 2d6ef4c5 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse alpha: #if abuses

#if where #ifdef should've been
parent d8ef67d9
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
#define TITAN_HAE_ADDRESS (&alpha_mv.hae_cache) #define TITAN_HAE_ADDRESS (&alpha_mv.hae_cache)
#define WILDFIRE_HAE_ADDRESS (&alpha_mv.hae_cache) #define WILDFIRE_HAE_ADDRESS (&alpha_mv.hae_cache)
#if CIA_ONE_HAE_WINDOW #ifdef CIA_ONE_HAE_WINDOW
#define CIA_HAE_ADDRESS (&alpha_mv.hae_cache) #define CIA_HAE_ADDRESS (&alpha_mv.hae_cache)
#endif #endif
#if MCPCIA_ONE_HAE_WINDOW #ifdef MCPCIA_ONE_HAE_WINDOW
#define MCPCIA_HAE_ADDRESS (&alpha_mv.hae_cache) #define MCPCIA_HAE_ADDRESS (&alpha_mv.hae_cache)
#endif #endif
......
...@@ -163,7 +163,7 @@ __up_wakeup(struct semaphore *sem) ...@@ -163,7 +163,7 @@ __up_wakeup(struct semaphore *sem)
void __sched void __sched
down(struct semaphore *sem) down(struct semaphore *sem)
{ {
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
#ifdef CONFIG_DEBUG_SEMAPHORE #ifdef CONFIG_DEBUG_SEMAPHORE
...@@ -177,7 +177,7 @@ down(struct semaphore *sem) ...@@ -177,7 +177,7 @@ down(struct semaphore *sem)
int __sched int __sched
down_interruptible(struct semaphore *sem) down_interruptible(struct semaphore *sem)
{ {
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
#ifdef CONFIG_DEBUG_SEMAPHORE #ifdef CONFIG_DEBUG_SEMAPHORE
...@@ -193,7 +193,7 @@ down_trylock(struct semaphore *sem) ...@@ -193,7 +193,7 @@ down_trylock(struct semaphore *sem)
{ {
int ret; int ret;
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
...@@ -212,7 +212,7 @@ down_trylock(struct semaphore *sem) ...@@ -212,7 +212,7 @@ down_trylock(struct semaphore *sem)
void void
up(struct semaphore *sem) up(struct semaphore *sem)
{ {
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic); CHECK_MAGIC(sem->__magic);
#endif #endif
#ifdef CONFIG_DEBUG_SEMAPHORE #ifdef CONFIG_DEBUG_SEMAPHORE
......
...@@ -779,7 +779,7 @@ handle_ipi(struct pt_regs *regs) ...@@ -779,7 +779,7 @@ handle_ipi(struct pt_regs *regs)
void void
smp_send_reschedule(int cpu) smp_send_reschedule(int cpu)
{ {
#if DEBUG_IPI_MSG #ifdef DEBUG_IPI_MSG
if (cpu == hard_smp_processor_id()) if (cpu == hard_smp_processor_id())
printk(KERN_WARNING printk(KERN_WARNING
"smp_send_reschedule: Sending IPI to self.\n"); "smp_send_reschedule: Sending IPI to self.\n");
...@@ -791,7 +791,7 @@ void ...@@ -791,7 +791,7 @@ void
smp_send_stop(void) smp_send_stop(void)
{ {
unsigned long to_whom = cpu_present_mask & ~(1UL << smp_processor_id()); unsigned long to_whom = cpu_present_mask & ~(1UL << smp_processor_id());
#if DEBUG_IPI_MSG #ifdef DEBUG_IPI_MSG
if (hard_smp_processor_id() != boot_cpu_id) if (hard_smp_processor_id() != boot_cpu_id)
printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n"); printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n");
#endif #endif
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
/* Hack! Only words for bus 0. */ /* Hack! Only words for bus 0. */
#if !MCPCIA_ONE_HAE_WINDOW #ifndef MCPCIA_ONE_HAE_WINDOW
#define MCPCIA_HAE_ADDRESS MCPCIA_HAE_MEM(4) #define MCPCIA_HAE_ADDRESS MCPCIA_HAE_MEM(4)
#endif #endif
#define MCPCIA_IACK_SC _MCPCIA_IACK_SC(4) #define MCPCIA_IACK_SC _MCPCIA_IACK_SC(4)
...@@ -351,7 +351,7 @@ __EXTERN_INLINE u8 mcpcia_readb(unsigned long in_addr) ...@@ -351,7 +351,7 @@ __EXTERN_INLINE u8 mcpcia_readb(unsigned long in_addr)
unsigned long hose = in_addr & ~0xffffffffUL; unsigned long hose = in_addr & ~0xffffffffUL;
unsigned long result, work; unsigned long result, work;
#if !MCPCIA_ONE_HAE_WINDOW #ifndef MCPCIA_ONE_HAE_WINDOW
unsigned long msb; unsigned long msb;
msb = addr & ~MCPCIA_MEM_MASK; msb = addr & ~MCPCIA_MEM_MASK;
set_hae(msb); set_hae(msb);
...@@ -370,7 +370,7 @@ __EXTERN_INLINE u16 mcpcia_readw(unsigned long in_addr) ...@@ -370,7 +370,7 @@ __EXTERN_INLINE u16 mcpcia_readw(unsigned long in_addr)
unsigned long hose = in_addr & ~0xffffffffUL; unsigned long hose = in_addr & ~0xffffffffUL;
unsigned long result, work; unsigned long result, work;
#if !MCPCIA_ONE_HAE_WINDOW #ifndef MCPCIA_ONE_HAE_WINDOW
unsigned long msb; unsigned long msb;
msb = addr & ~MCPCIA_MEM_MASK; msb = addr & ~MCPCIA_MEM_MASK;
set_hae(msb); set_hae(msb);
...@@ -389,7 +389,7 @@ __EXTERN_INLINE void mcpcia_writeb(u8 b, unsigned long in_addr) ...@@ -389,7 +389,7 @@ __EXTERN_INLINE void mcpcia_writeb(u8 b, unsigned long in_addr)
unsigned long hose = in_addr & ~0xffffffffUL; unsigned long hose = in_addr & ~0xffffffffUL;
unsigned long w; unsigned long w;
#if !MCPCIA_ONE_HAE_WINDOW #ifndef MCPCIA_ONE_HAE_WINDOW
unsigned long msb; unsigned long msb;
msb = addr & ~MCPCIA_MEM_MASK; msb = addr & ~MCPCIA_MEM_MASK;
set_hae(msb); set_hae(msb);
...@@ -407,7 +407,7 @@ __EXTERN_INLINE void mcpcia_writew(u16 b, unsigned long in_addr) ...@@ -407,7 +407,7 @@ __EXTERN_INLINE void mcpcia_writew(u16 b, unsigned long in_addr)
unsigned long hose = in_addr & ~0xffffffffUL; unsigned long hose = in_addr & ~0xffffffffUL;
unsigned long w; unsigned long w;
#if !MCPCIA_ONE_HAE_WINDOW #ifndef MCPCIA_ONE_HAE_WINDOW
unsigned long msb; unsigned long msb;
msb = addr & ~MCPCIA_MEM_MASK; msb = addr & ~MCPCIA_MEM_MASK;
set_hae(msb); set_hae(msb);
......
...@@ -18,12 +18,12 @@ ...@@ -18,12 +18,12 @@
struct semaphore { struct semaphore {
atomic_t count; atomic_t count;
wait_queue_head_t wait; wait_queue_head_t wait;
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
long __magic; long __magic;
#endif #endif
}; };
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
# define __SEM_DEBUG_INIT(name) , (long)&(name).__magic # define __SEM_DEBUG_INIT(name) , (long)&(name).__magic
#else #else
# define __SEM_DEBUG_INIT(name) # define __SEM_DEBUG_INIT(name)
...@@ -53,7 +53,7 @@ static inline void sema_init(struct semaphore *sem, int val) ...@@ -53,7 +53,7 @@ static inline void sema_init(struct semaphore *sem, int val)
atomic_set(&sem->count, val); atomic_set(&sem->count, val);
init_waitqueue_head(&sem->wait); init_waitqueue_head(&sem->wait);
#if WAITQUEUE_DEBUG #ifdef WAITQUEUE_DEBUG
sem->__magic = (long)&sem->__magic; sem->__magic = (long)&sem->__magic;
#endif #endif
} }
...@@ -142,7 +142,7 @@ static inline void __up(struct semaphore *sem) ...@@ -142,7 +142,7 @@ static inline void __up(struct semaphore *sem)
__up_wakeup(sem); __up_wakeup(sem);
} }
#if !WAITQUEUE_DEBUG && !defined(CONFIG_DEBUG_SEMAPHORE) #if !defined(WAITQUEUE_DEBUG) && !defined(CONFIG_DEBUG_SEMAPHORE)
extern inline void down(struct semaphore *sem) extern inline void down(struct semaphore *sem)
{ {
__down(sem); __down(sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment