Commit 9d0f5605 authored by Paul Mackerras's avatar Paul Mackerras

PPC32: Fix various minor problems pointed out by Linus' check program.

parent d1fc7b62
......@@ -99,7 +99,7 @@ EXPORT_SYMBOL(_prep_type);
EXPORT_SYMBOL(ucSystemType);
#endif
#if !__INLINE_BITOPS
#if !defined(__INLINE_BITOPS)
EXPORT_SYMBOL(set_bit);
EXPORT_SYMBOL(clear_bit);
EXPORT_SYMBOL(change_bit);
......
......@@ -205,7 +205,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
struct task_struct *last;
local_irq_save(s);
#if CHECK_STACK
#ifdef CHECK_STACK
check_stack(prev);
check_stack(new);
#endif
......
......@@ -476,7 +476,9 @@ static void __init printlargepacket(PnP_TAG_PACKET * pkt, int size) {
break;
}
}
static void __init printpackets(PnP_TAG_PACKET * pkt, const char * cat) {
static void __init printpackets(PnP_TAG_PACKET * pkt, const char * cat)
{
if (pkt->S1_Pack.Tag== END_TAG) {
printk(" No packets describing %s resources.\n", cat);
return;
......@@ -493,7 +495,7 @@ static void __init printpackets(PnP_TAG_PACKET * pkt, const char * cat) {
size=tag_small_count(pkt->S1_Pack.Tag)+1;
printsmallpacket(pkt, size);
}
(unsigned char *) pkt+=size;
pkt = (PnP_TAG_PACKET *)((unsigned char *) pkt + size);
} while (pkt->S1_Pack.Tag != END_TAG);
}
......
......@@ -464,7 +464,7 @@ relocate_nodes(void)
struct device_node *np;
struct property *pp;
#define ADDBASE(x) (x = (x)? ((typeof (x))((unsigned long)(x) + base)): 0)
#define ADDBASE(x) (x = (typeof (x))((x)? ((unsigned long)(x) + base): 0))
base = (unsigned long) boot_infos + boot_infos->deviceTreeOffset;
allnodes = (struct device_node *)(base + 4);
......
......@@ -12,6 +12,7 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/sysrq.h>
#include <asm/xmon.h>
#include <asm/prom.h>
#include <asm/bootx.h>
#include <asm/machdep.h>
......@@ -397,7 +398,7 @@ static unsigned char scc_inittab[] = {
};
void
xmon_init_scc()
xmon_init_scc(void)
{
if ( _machine == _MACH_chrp )
{
......
......@@ -5,6 +5,7 @@
#include <linux/config.h>
#include <linux/cache.h>
#include <linux/smp_lock.h>
#include <asm/irq.h>
/* The __last_jiffy_stamp field is needed to ensure that no decrementer
* interrupt is lost on SMP machines. Since on most CPUs it is in the same
......
......@@ -57,7 +57,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk,
#define LAST_CONTEXT 15
#define FIRST_CONTEXT 0
#elif CONFIG_4xx
#elif defined(CONFIG_4xx)
#define NO_CONTEXT 256
#define LAST_CONTEXT 255
#define FIRST_CONTEXT 1
......
......@@ -89,7 +89,7 @@ typedef enum _OSAREA_USAGE {
typedef enum _PM_MODE {
Suspend = 0x80, /* Part of state is in memory */
Normal = 0x00 /* No power management in effect */
} PMMode;
} PMMODE;
typedef struct _HEADER {
unsigned short Size; /* NVRAM size in K(1024) */
......
......@@ -691,8 +691,10 @@ struct thread_struct {
unsigned long fpscr_pad; /* fpr ... fpscr must be contiguous */
unsigned long fpscr; /* Floating point status */
#ifdef CONFIG_ALTIVEC
vector128 vr[32]; /* Complete AltiVec set */
vector128 vscr; /* AltiVec status */
/* Complete AltiVec register set */
vector128 vr[32] __attribute((aligned(16)));
/* AltiVec status */
vector128 vscr __attribute((aligned(16)));
unsigned long vrsave;
#endif /* CONFIG_ALTIVEC */
};
......
......@@ -29,12 +29,12 @@ struct semaphore {
*/
atomic_t count;
wait_queue_head_t wait;
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
long __magic;
#endif
};
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
# define __SEM_DEBUG_INIT(name) \
, (long)&(name).__magic
#else
......@@ -59,7 +59,7 @@ static inline void sema_init (struct semaphore *sem, int val)
{
atomic_set(&sem->count, val);
init_waitqueue_head(&sem->wait);
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
sem->__magic = (long)&sem->__magic;
#endif
}
......@@ -80,7 +80,7 @@ extern void __up(struct semaphore * sem);
extern inline void down(struct semaphore * sem)
{
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
might_sleep();
......@@ -97,7 +97,7 @@ extern inline int down_interruptible(struct semaphore * sem)
{
int ret = 0;
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
might_sleep();
......@@ -112,7 +112,7 @@ extern inline int down_trylock(struct semaphore * sem)
{
int ret;
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
......@@ -123,7 +123,7 @@ extern inline int down_trylock(struct semaphore * sem)
extern inline void up(struct semaphore * sem)
{
#if WAITQUEUE_DEBUG
#ifdef WAITQUEUE_DEBUG
CHECK_MAGIC(sem->__magic);
#endif
......
......@@ -19,7 +19,7 @@ typedef unsigned long long __u64;
typedef struct {
__u32 u[4];
} __attribute((aligned(16))) __vector128;
} __vector128;
/*
* XXX allowed outside of __KERNEL__ for now, until glibc gets
......
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