Skip to content

Commit

Permalink
ACPI: Fix sparse warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Randy Dunlap authored and Len Brown committed Feb 16, 2007
1 parent f3ccb06 commit 70c0846
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/tables/tbxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 70c0846

Please sign in to comment.