Commit de54add3 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: arch/* NULL noise removal

parent 407323e6
......@@ -214,7 +214,7 @@ static struct cpu_model models[] =
BANIAS(1500),
BANIAS(1600),
BANIAS(1700),
{ 0, }
{ NULL, }
};
#undef _BANIAS
#undef BANIAS
......
......@@ -725,7 +725,7 @@ _sparc_find_resource(struct resource *root, unsigned long hit)
void register_proc_sparc_ioport(void)
{
#ifdef CONFIG_PROC_FS
create_proc_read_entry("io_map",0,0,_sparc_io_get_info,&sparc_iomap);
create_proc_read_entry("dvma_map",0,0,_sparc_io_get_info,&_sparc_dvma);
create_proc_read_entry("io_map",0,NULL,_sparc_io_get_info,&sparc_iomap);
create_proc_read_entry("dvma_map",0,NULL,_sparc_io_get_info,&_sparc_dvma);
#endif
}
......@@ -336,7 +336,7 @@ void handler_irq(int irq, struct pt_regs * regs)
kstat_cpu(cpu).irqs[irq]++;
do {
if (!action || !action->handler)
unexpected_irq(irq, 0, regs);
unexpected_irq(irq, NULL, regs);
action->handler(irq, action->dev_id, regs);
action = action->next;
} while (action);
......
......@@ -628,7 +628,7 @@ int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
&current->thread.fpqueue[0], &current->thread.fpqdepth);
if (regs != NULL) {
regs->psr &= ~(PSR_EF);
last_task_used_math = 0;
last_task_used_math = NULL;
}
}
#endif
......
......@@ -198,7 +198,7 @@ restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)
regs->psr &= ~PSR_EF;
#else
if (current == last_task_used_math) {
last_task_used_math = 0;
last_task_used_math = NULL;
regs->psr &= ~PSR_EF;
}
#endif
......@@ -570,7 +570,7 @@ save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)
put_psr(get_psr() | PSR_EF);
fpsave(&current->thread.float_regs[0], &current->thread.fsr,
&current->thread.fpqueue[0], &current->thread.fpqdepth);
last_task_used_math = 0;
last_task_used_math = NULL;
regs->psr &= ~(PSR_EF);
}
#endif
......
......@@ -50,7 +50,7 @@ static struct resource sun4c_intr_eb = { "sun4c_intr" };
*
* so don't go making it static, like I tried. sigh.
*/
unsigned char *interrupt_enable = 0;
unsigned char *interrupt_enable = NULL;
static int sun4c_pil_map[] = { 0, 1, 2, 3, 5, 7, 8, 9 };
......
......@@ -216,7 +216,7 @@ void sun4d_handler_irq(int irq, struct pt_regs * regs)
if (!sbusl) {
action = *(irq + irq_action);
if (!action)
unexpected_irq(irq, 0, regs);
unexpected_irq(irq, NULL, regs);
do {
action->handler(irq, action->dev_id, regs);
action = action->next;
......@@ -243,7 +243,7 @@ void sun4d_handler_irq(int irq, struct pt_regs * regs)
action = actionp->action;
if (!action)
unexpected_irq(irq, 0, regs);
unexpected_irq(irq, NULL, regs);
do {
action->handler(irq, action->dev_id, regs);
action = action->next;
......
......@@ -97,7 +97,7 @@ asmlinkage unsigned long sunos_mmap(unsigned long addr, unsigned long len,
iminor(file->f_dentry->d_inode) == 5) {
flags |= MAP_ANONYMOUS;
fput(file);
file = 0;
file = NULL;
}
}
ret_type = flags & _MAP_NEW;
......@@ -755,7 +755,7 @@ sunos_mount(char __user *type, char __user *dir, int flags, void __user *data)
{
int linux_flags = 0;
int ret = -EINVAL;
char *dev_fname = 0;
char *dev_fname = NULL;
char *dir_page, *type_page;
if (!capable (CAP_SYS_ADMIN))
......
......@@ -54,7 +54,7 @@ spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
enum sparc_clock_type sp_clock_typ;
spinlock_t mostek_lock = SPIN_LOCK_UNLOCKED;
unsigned long mstk48t02_regs = 0UL;
static struct mostek48t08 *mstk48t08_regs = 0;
static struct mostek48t08 *mstk48t08_regs = NULL;
static int set_rtc_mmss(unsigned long);
static int sbus_do_settimeofday(struct timespec *tv);
......@@ -251,9 +251,9 @@ static __inline__ void sun4_clock_probe(void)
sp_clock_typ = MSTK48T02;
r.start = sun4_clock_physaddr;
mstk48t02_regs = sbus_ioremap(&r, 0,
sizeof(struct mostek48t02), 0);
mstk48t08_regs = 0; /* To catch weirdness */
intersil_clock = 0; /* just in case */
sizeof(struct mostek48t02), NULL);
mstk48t08_regs = NULL; /* To catch weirdness */
intersil_clock = NULL; /* just in case */
/* Kick start the clock if it is completely stopped. */
if (mostek_read(mstk48t02_regs + MOSTEK_SEC) & MSTK_STOP)
......@@ -266,7 +266,7 @@ static __inline__ void sun4_clock_probe(void)
intersil_clock = (struct intersil *)
sbus_ioremap(&r, 0, sizeof(*intersil_clock), "intersil");
mstk48t02_regs = 0; /* just be sure */
mstk48t08_regs = 0; /* ditto */
mstk48t08_regs = NULL; /* ditto */
/* initialise the clock */
intersil_intr(intersil_clock,INTERSIL_INT_100HZ);
......@@ -340,7 +340,7 @@ static __inline__ void clock_probe(void)
r.start = clk_reg[0].phys_addr;
mstk48t02_regs = sbus_ioremap(&r, 0,
sizeof(struct mostek48t02), "mk48t02");
mstk48t08_regs = 0; /* To catch weirdness */
mstk48t08_regs = NULL; /* To catch weirdness */
} else if (strcmp(model, "mk48t08") == 0) {
sp_clock_typ = MSTK48T08;
if(prom_getproperty(node, "reg", (char *) clk_reg,
......
......@@ -100,7 +100,7 @@ void __init sparc_context_init(int numctx)
clist = (ctx_list_pool + ctx);
clist->ctx_number = ctx;
clist->ctx_mm = 0;
clist->ctx_mm = NULL;
}
ctx_free.next = ctx_free.prev = &ctx_free;
ctx_used.next = ctx_used.prev = &ctx_used;
......
......@@ -497,7 +497,7 @@ static void __init sun4c_probe_mmu(void)
patch_kernel_fault_handler();
}
volatile unsigned long *sun4c_memerr_reg = 0;
volatile unsigned long *sun4c_memerr_reg = NULL;
void __init sun4c_probe_memerr_reg(void)
{
......@@ -599,13 +599,13 @@ static void __init sun4c_init_mmu_entry_pool(void)
for (i=0; i < SUN4C_MAX_SEGMAPS; i++) {
mmu_entry_pool[i].pseg = i;
mmu_entry_pool[i].next = 0;
mmu_entry_pool[i].prev = 0;
mmu_entry_pool[i].next = NULL;
mmu_entry_pool[i].prev = NULL;
mmu_entry_pool[i].vaddr = 0;
mmu_entry_pool[i].locked = 0;
mmu_entry_pool[i].ctx = 0;
mmu_entry_pool[i].lru_next = 0;
mmu_entry_pool[i].lru_prev = 0;
mmu_entry_pool[i].lru_next = NULL;
mmu_entry_pool[i].lru_prev = NULL;
}
mmu_entry_pool[invalid_segment].locked = 1;
}
......@@ -1170,7 +1170,7 @@ static char *sun4c_lockarea(char *vaddr, unsigned long size)
local_irq_restore(flags);
printk("DMA vaddr=0x%p size=%08lx\n", vaddr, size);
panic("Out of iobuffer table");
return 0;
return NULL;
}
static void sun4c_unlockarea(char *vaddr, unsigned long size)
......
......@@ -113,7 +113,7 @@ void auxio_set_lte(int on)
void __init auxio_probe(void)
{
struct sbus_bus *sbus;
struct sbus_dev *sdev = 0;
struct sbus_dev *sdev = NULL;
for_each_sbus(sbus) {
for_each_sbusdev(sdev, sbus) {
......@@ -131,7 +131,7 @@ void __init auxio_probe(void)
#ifdef CONFIG_PCI
else {
struct linux_ebus *ebus;
struct linux_ebus_device *edev = 0;
struct linux_ebus_device *edev = NULL;
for_each_ebus(ebus) {
for_each_ebusdev(edev, ebus) {
......
......@@ -267,7 +267,7 @@ void ebus_dma_enable(struct ebus_dma_info *p, int on)
}
EXPORT_SYMBOL(ebus_dma_enable);
struct linux_ebus *ebus_chain = 0;
struct linux_ebus *ebus_chain = NULL;
#ifdef CONFIG_SUN_AUXIO
extern void auxio_probe(void);
......@@ -503,7 +503,7 @@ void __init fill_ebus_device(int node, struct linux_ebus_device *dev)
dev->children = ebus_alloc(sizeof(struct linux_ebus_child));
child = dev->children;
child->next = 0;
child->next = NULL;
child->parent = dev;
child->bus = dev->bus;
fill_ebus_child(node, &regs[0],
......@@ -513,7 +513,7 @@ void __init fill_ebus_device(int node, struct linux_ebus_device *dev)
child->next = ebus_alloc(sizeof(struct linux_ebus_child));
child = child->next;
child->next = 0;
child->next = NULL;
child->parent = dev;
child->bus = dev->bus;
fill_ebus_child(node, &regs[0],
......@@ -563,7 +563,7 @@ void __init ebus_init(void)
ebusnd = cookie->prom_node;
ebus_chain = ebus = ebus_alloc(sizeof(struct linux_ebus));
ebus->next = 0;
ebus->next = NULL;
ebus->is_rio = is_rio;
while (ebusnd) {
......@@ -606,8 +606,8 @@ void __init ebus_init(void)
ebus->devices = ebus_alloc(sizeof(struct linux_ebus_device));
dev = ebus->devices;
dev->next = 0;
dev->children = 0;
dev->next = NULL;
dev->children = NULL;
dev->bus = ebus;
fill_ebus_device(nd, dev);
......@@ -615,8 +615,8 @@ void __init ebus_init(void)
dev->next = ebus_alloc(sizeof(struct linux_ebus_device));
dev = dev->next;
dev->next = 0;
dev->children = 0;
dev->next = NULL;
dev->children = NULL;
dev->bus = ebus;
fill_ebus_device(nd, dev);
}
......@@ -633,7 +633,7 @@ void __init ebus_init(void)
ebus->next = ebus_alloc(sizeof(struct linux_ebus));
ebus = ebus->next;
ebus->next = 0;
ebus->next = NULL;
ebus->is_rio = is_rio;
++num_ebus;
}
......
......@@ -1256,6 +1256,6 @@ static void register_irq_proc (unsigned int irq)
void init_irq_proc (void)
{
/* create /proc/irq */
root_irq_dir = proc_mkdir("irq", 0);
root_irq_dir = proc_mkdir("irq", NULL);
}
......@@ -134,7 +134,7 @@ void __init power_init(void)
printk("power: Control reg at %016lx ... ", power_reg);
poweroff_method = machine_halt; /* able to use the standard halt */
if (has_button_interrupt(edev)) {
if (kernel_thread(powerd, 0, CLONE_FS) < 0) {
if (kernel_thread(powerd, NULL, CLONE_FS) < 0) {
printk("Failed to start power daemon.\n");
return;
}
......
......@@ -402,7 +402,7 @@ void __init init_ISA_irqs (void)
for (i = 0; i < NR_IRQS; i++) {
irq_desc[i].status = IRQ_DISABLED;
irq_desc[i].action = 0;
irq_desc[i].action = NULL;
irq_desc[i].depth = 1;
if (i < 16) {
......
......@@ -930,7 +930,7 @@ void init_irq_proc (void)
int i;
/* create /proc/irq */
root_irq_dir = proc_mkdir("irq", 0);
root_irq_dir = proc_mkdir("irq", NULL);
/* create /proc/irq/prof_cpu_mask */
entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
......
......@@ -66,7 +66,7 @@ static int alloc_ldt(mm_context_t *pc, unsigned mincount, int reload)
mask = cpumask_of_cpu(smp_processor_id());
load_LDT(pc);
if (!cpus_equal(current->mm->cpu_vm_mask, mask))
smp_call_function(flush_ldt, 0, 1, 1);
smp_call_function(flush_ldt, NULL, 1, 1);
preempt_enable();
#else
load_LDT(pc);
......
......@@ -255,7 +255,7 @@ void pci_free_consistent(struct pci_dev *hwdev, size_t size,
#define SET_LEAK(x) if (iommu_leak_tab) \
iommu_leak_tab[x] = __builtin_return_address(0);
#define CLEAR_LEAK(x) if (iommu_leak_tab) \
iommu_leak_tab[x] = 0;
iommu_leak_tab[x] = NULL;
/* Debugging aid for drivers that don't free their IOMMU tables */
static void **iommu_leak_tab;
......
......@@ -343,7 +343,7 @@ static void do_flush_tlb_all(void* info)
void flush_tlb_all(void)
{
on_each_cpu(do_flush_tlb_all, 0, 1, 1);
on_each_cpu(do_flush_tlb_all, NULL, 1, 1);
}
void smp_kdb_stop(void)
......
......@@ -115,7 +115,7 @@ unsigned long *in_exception_stack(int cpu, unsigned long stack)
if (stack >= init_tss[cpu].ist[k] && stack <= end)
return (unsigned long *)end;
}
return 0;
return NULL;
}
/*
......
......@@ -76,20 +76,8 @@ struct thread_struct {
#define SPARC_FLAG_UNALIGNED 0x2 /* is allowed to do unaligned accesses */
#define INIT_THREAD { \
/* kregs, _pad1, */ \
0, 0, \
/* fork_kpsr, fork_kwim */ \
0, 0, \
/* FPU regs */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, \
/* FPU status, FPU qdepth, FPU queue */ \
0, 0, { { 0, 0, }, }, \
/* flags, current_ds, */ \
SPARC_FLAG_KTHREAD, KERNEL_DS, \
/* core_exec */ \
{ 0, }, \
/* new_signal */ \
0, \
.flags = SPARC_FLAG_KTHREAD, \
.current_ds = KERNEL_DS, \
}
/* Return saved PC of a blocked thread. */
......
......@@ -196,7 +196,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr)
pte_t *pte = pte_alloc_one_kernel(mm, addr);
if (pte)
return virt_to_page(pte);
return 0;
return NULL;
}
static __inline__ pte_t *pte_alloc_one_fast(struct mm_struct *mm, unsigned long address)
......
......@@ -378,7 +378,7 @@ sun4u_get_pte (unsigned long addr)
if (addr >= PAGE_OFFSET)
return addr & _PAGE_PADDR;
if ((addr >= LOW_OBP_ADDRESS) && (addr < HI_OBP_ADDRESS))
return prom_virt_to_phys(addr, 0);
return prom_virt_to_phys(addr, NULL);
pgdp = pgd_offset_k(addr);
pmdp = pmd_offset(pgdp, addr);
ptep = pte_offset_kernel(pmdp, addr);
......
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