Commit 98189db7 authored by Mika Kukkonen's avatar Mika Kukkonen Committed by Linus Torvalds

[PATCH] sparse: NULL vs 0 - arch/i386/*

parent 8aac9bdd
......@@ -141,7 +141,7 @@ char *__acpi_map_table(unsigned long phys, unsigned long size)
idx = FIX_ACPI_END;
while (mapped_size < size) {
if (--idx < FIX_ACPI_BEGIN)
return 0; /* cannot handle this */
return NULL; /* cannot handle this */
phys += PAGE_SIZE;
set_fixmap(idx, phys);
mapped_size += PAGE_SIZE;
......@@ -560,7 +560,7 @@ extern u32 pmtmr_ioport;
static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
{
struct fadt_descriptor_rev2 *fadt =0;
struct fadt_descriptor_rev2 *fadt = NULL;
fadt = (struct fadt_descriptor_rev2*) __acpi_map_table(phys,size);
if(!fadt) {
......
......@@ -345,7 +345,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) {
......
......@@ -1094,7 +1094,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);
......
......@@ -61,7 +61,7 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
load_LDT(pc);
mask = cpumask_of_cpu(smp_processor_id());
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);
......
......@@ -88,8 +88,8 @@ static struct
unsigned long long * base __attribute__ ((packed));
}
real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, real_mode_gdt_entries },
real_mode_idt = { 0x3ff, 0 },
no_idt = { 0, 0 };
real_mode_idt = { 0x3ff, NULL },
no_idt = { 0, NULL };
/* This is 16-bit protected mode code to disable paging and the cache,
......@@ -266,7 +266,7 @@ void machine_restart(char * __unused)
if (!reboot_thru_bios) {
if (efi_enabled) {
efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, 0);
efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL);
__asm__ __volatile__("lidt %0": :"m" (no_idt));
__asm__ __volatile__("int3");
}
......@@ -280,7 +280,7 @@ void machine_restart(char * __unused)
}
}
if (efi_enabled)
efi.reset_system(EFI_RESET_WARM, EFI_SUCCESS, 0, 0);
efi.reset_system(EFI_RESET_WARM, EFI_SUCCESS, 0, NULL);
machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
}
......@@ -296,7 +296,7 @@ EXPORT_SYMBOL(machine_halt);
void machine_power_off(void)
{
if (efi_enabled)
efi.reset_system(EFI_RESET_SHUTDOWN, EFI_SUCCESS, 0, 0);
efi.reset_system(EFI_RESET_SHUTDOWN, EFI_SUCCESS, 0, NULL);
if (pm_power_off)
pm_power_off();
}
......
......@@ -1204,7 +1204,7 @@ static struct nop {
} noptypes[] = {
{ X86_FEATURE_K8, k8_nops },
{ X86_FEATURE_K7, k7_nops },
{ -1, 0 }
{ -1, NULL }
};
/* Replace instructions with better alternatives for this CPU type.
......
......@@ -463,7 +463,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);
}
/*
......
......@@ -732,8 +732,8 @@ static inline void free_vm86_irq(int irqnumber)
{
unsigned long flags;
free_irq(irqnumber,0);
vm86_irqs[irqnumber].tsk = 0;
free_irq(irqnumber, NULL);
vm86_irqs[irqnumber].tsk = NULL;
spin_lock_irqsave(&irqbits_lock, flags);
irqbits &= ~(1 << irqnumber);
......@@ -783,7 +783,7 @@ static int do_vm86_irq_handling(int subfunction, int irqnumber)
if (!((1 << sig) & ALLOWED_SIGS)) return -EPERM;
if (invalid_vm86_irq(irq)) return -EPERM;
if (vm86_irqs[irq].tsk) return -EPERM;
ret = request_irq(irq, &irq_handler, 0, VM86_IRQNAME, 0);
ret = request_irq(irq, &irq_handler, 0, VM86_IRQNAME, NULL);
if (ret) return ret;
vm86_irqs[irq].sig = sig;
vm86_irqs[irq].tsk = current;
......
......@@ -464,7 +464,7 @@ static void pmc_setup_one_p4_counter(unsigned int ctr)
unsigned int escr = 0;
unsigned int high = 0;
unsigned int counter_bit;
struct p4_event_binding * ev = 0;
struct p4_event_binding *ev = NULL;
unsigned int stag;
stag = get_stagger();
......
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