Skip to contentSkip to conversation

ACPI: use NULL for ptrs

PATCH Applied Randy Dunlap 2 participants 2 messages Feb 14, 2007 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: use NULL for ptrs

From: Randy Dunlap <[email protected]>

Fix sparse warnings in ACPI:
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

---
 drivers/acpi/osl.c            |    2 +-
 drivers/acpi/processor_core.c |    2 +-
 drivers/acpi/tables/tbxface.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/acpi/osl.c +1 -1
@@ -205,7 +205,7 @@ void __iomem *acpi_os_map_memory(acpi_ph
 {
 	if (phys > ULONG_MAX) {
 		printk(KERN_ERR PREFIX "Cannot map memory that high\n");
-		return 0;
+		return NULL;
 	}
 	if (acpi_gbl_permanent_mmap)
 		/*
drivers/acpi/processor_core.c +1 -1
@@ -1005,7 +1005,7 @@ static int __init acpi_processor_init(vo
 #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);
drivers/acpi/tables/tbxface.c +1 -1
@@ -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);
reviewer Applied
#1 lore raw

Applied.

thanks,
-Len

Quoted 52 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

Fix sparse warnings in ACPI:
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

---
 drivers/acpi/osl.c            |    2 +-
 drivers/acpi/processor_core.c |    2 +-
 drivers/acpi/tables/tbxface.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/acpi/osl.c +1 -1
@@ -205,7 +205,7 @@ void __iomem *acpi_os_map_memory(acpi_ph
 {
 	if (phys > ULONG_MAX) {
 		printk(KERN_ERR PREFIX "Cannot map memory that high\n");
-		return 0;
+		return NULL;
 	}
 	if (acpi_gbl_permanent_mmap)
 		/*
drivers/acpi/processor_core.c +1 -1
@@ -1005,7 +1005,7 @@ static int __init acpi_processor_init(vo
 #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);
drivers/acpi/tables/tbxface.c +1 -2
@@ -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);
-

To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html