]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparse: NULL vs 0 - arch/i386/*
authorMika Kukkonen <mika@osdl.org>
Wed, 30 Jun 2004 08:50:31 +0000 (01:50 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 30 Jun 2004 08:50:31 +0000 (01:50 -0700)
arch/i386/kernel/acpi/boot.c
arch/i386/kernel/i8259.c
arch/i386/kernel/irq.c
arch/i386/kernel/ldt.c
arch/i386/kernel/reboot.c
arch/i386/kernel/setup.c
arch/i386/kernel/smp.c
arch/i386/kernel/vm86.c
arch/i386/oprofile/op_model_p4.c

index f5edc775fe6a8c8c37ba5c3bcdbb6d134fd4fc2b..e54aefaa8e0d50269129c842dd2280168d409b71 100644 (file)
@@ -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) {
index fc991989284ba82fd654c341bc5d6b1bceb3fa8b..efd5dc817128344f3759b27e3d1b5f8cbad6b8f1 100644 (file)
@@ -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) {
index ba2055a3959b84afdef5b2ff7f1a060ccc43cccb..7f52bc0d079ffbc8f17449096a69162766043d8c 100644 (file)
@@ -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);
index c07c21df769d7a70ecbf45f0f780ba77e3de5e5c..038d30034a807f66b95cdf5e943d8a7ea8323bd0 100644 (file)
@@ -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);
index c8936c4e5de7f1d551b7efa4b4d6f9538469e197..87b966248ac4caa358f8b58419a598d5b0af7bfc 100644 (file)
@@ -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();
 }
index 00d8120909387fe717cf3f04d8f109d9b2ae3ef3..375fd076159d8f6767e1d7dbd3be5741b4ef6ca3 100644 (file)
@@ -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.
index 5e3ac93253d2293105d5804b8b5260e67fa14138..bb5960134f673a2f233e4f7735b960cd54fc0b3d 100644 (file)
@@ -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);
 }
 
 /*
index 1dcef3d476411bf0919338b831172bac0a60673a..a4f5a20a263f64526269e6d27f73695c6f2e756a 100644 (file)
@@ -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;
index 8b932b1b3f143deaebfcbbabf0cc9a8cd8da4408..e92eaed25f1bac996609501ab281ccf89c07a5e5 100644 (file)
@@ -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();