ACPI: Fix sparse warnings
authorRandy Dunlap <randy.dunlap@oracle.com>
Wed, 14 Feb 2007 00:11:36 +0000 (16:11 -0800)
committerLen Brown <len.brown@intel.com>
Fri, 16 Feb 2007 03:19:07 +0000 (22:19 -0500)
Use NULL for pointers

drivers/acpi/osl.c:208:10: warning: Using plain integer as NULL pointer
drivers/acpi/tables/tbxface.c:411:49: warning: Using plain integer as NULL pointer
drivers/acpi/processor_core.c:1008:10: warning: Using plain integer as NULL pointer

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/osl.c
drivers/acpi/processor_core.c
drivers/acpi/tables/tbxface.c

index 0f6f3bcbc8ebc2d4b0c06cb8f1443d1fb5e6e9b6..63060a17f7ed60fae9e9bf6f0c3422e4eb393697 100644 (file)
@@ -205,7 +205,7 @@ void __iomem *acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
 {
        if (phys > ULONG_MAX) {
                printk(KERN_ERR PREFIX "Cannot map memory that high\n");
-               return 0;
+               return NULL;
        }
        if (acpi_gbl_permanent_mmap)
                /*
index 61d976e7af5ad8017022a380fcc97691d2e8bb2c..4b3d15fa507afe74268a18e56895e69e4a542bf7 100644 (file)
@@ -1005,7 +1005,7 @@ static int __init acpi_processor_init(void)
 #ifdef CONFIG_SMP
        if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_MADT, 0,
                                (struct acpi_table_header **)&madt)))
-               madt = 0;
+               madt = NULL;
 #endif
 
        acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir);
index 807978d5381abb34767687de505600b0e8d6aa8a..81937003fd538c5b480418da6056c620294f22a2 100644 (file)
@@ -408,7 +408,7 @@ acpi_get_table(char *signature,
                }
 
                if (!acpi_gbl_permanent_mmap) {
-                       acpi_gbl_root_table_list.tables[i].pointer = 0;
+                       acpi_gbl_root_table_list.tables[i].pointer = NULL;
                }
 
                return (status);