Commit 70c0846e authored by Randy Dunlap's avatar Randy Dunlap Committed by Len Brown

ACPI: Fix sparse warnings

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: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent f3ccb06f
...@@ -205,7 +205,7 @@ void __iomem *acpi_os_map_memory(acpi_physical_address phys, acpi_size size) ...@@ -205,7 +205,7 @@ void __iomem *acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
{ {
if (phys > ULONG_MAX) { if (phys > ULONG_MAX) {
printk(KERN_ERR PREFIX "Cannot map memory that high\n"); printk(KERN_ERR PREFIX "Cannot map memory that high\n");
return 0; return NULL;
} }
if (acpi_gbl_permanent_mmap) if (acpi_gbl_permanent_mmap)
/* /*
......
...@@ -1005,7 +1005,7 @@ static int __init acpi_processor_init(void) ...@@ -1005,7 +1005,7 @@ static int __init acpi_processor_init(void)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_MADT, 0, if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_MADT, 0,
(struct acpi_table_header **)&madt))) (struct acpi_table_header **)&madt)))
madt = 0; madt = NULL;
#endif #endif
acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir); acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir);
......
...@@ -408,7 +408,7 @@ acpi_get_table(char *signature, ...@@ -408,7 +408,7 @@ acpi_get_table(char *signature,
} }
if (!acpi_gbl_permanent_mmap) { 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); return (status);
......
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