Commit 0791e035 authored by Mika Kukkonen's avatar Mika Kukkonen Committed by Linus Torvalds

[PATCH] sparse: NULL vs 0 - drivers/acpi/*

parent 98189db7
...@@ -496,14 +496,14 @@ acpi_ns_delete_namespace_subtree ( ...@@ -496,14 +496,14 @@ acpi_ns_delete_namespace_subtree (
/* Check if this node has any children */ /* Check if this node has any children */
if (acpi_ns_get_next_node (ACPI_TYPE_ANY, child_node, 0)) { if (acpi_ns_get_next_node (ACPI_TYPE_ANY, child_node, NULL)) {
/* /*
* There is at least one child of this node, * There is at least one child of this node,
* visit the node * visit the node
*/ */
level++; level++;
parent_node = child_node; parent_node = child_node;
child_node = 0; child_node = NULL;
} }
} }
else { else {
......
...@@ -352,7 +352,7 @@ acpi_ns_delete_subtree ( ...@@ -352,7 +352,7 @@ acpi_ns_delete_subtree (
parent_handle = start_handle; parent_handle = start_handle;
child_handle = 0; child_handle = NULL;
level = 1; level = 1;
/* /*
...@@ -373,14 +373,14 @@ acpi_ns_delete_subtree ( ...@@ -373,14 +373,14 @@ acpi_ns_delete_subtree (
/* Check if this object has any children */ /* Check if this object has any children */
if (ACPI_SUCCESS (acpi_get_next_object (ACPI_TYPE_ANY, child_handle, if (ACPI_SUCCESS (acpi_get_next_object (ACPI_TYPE_ANY, child_handle,
0, &dummy))) { NULL, &dummy))) {
/* /*
* There is at least one child of this object, * There is at least one child of this object,
* visit the object * visit the object
*/ */
level++; level++;
parent_handle = child_handle; parent_handle = child_handle;
child_handle = 0; child_handle = NULL;
} }
} }
else { else {
......
...@@ -183,7 +183,7 @@ acpi_ns_walk_namespace ( ...@@ -183,7 +183,7 @@ acpi_ns_walk_namespace (
/* Null child means "get first node" */ /* Null child means "get first node" */
parent_node = start_node; parent_node = start_node;
child_node = 0; child_node = NULL;
child_type = ACPI_TYPE_ANY; child_type = ACPI_TYPE_ANY;
level = 1; level = 1;
...@@ -258,14 +258,14 @@ acpi_ns_walk_namespace ( ...@@ -258,14 +258,14 @@ acpi_ns_walk_namespace (
* maximum depth has been reached. * maximum depth has been reached.
*/ */
if ((level < max_depth) && (status != AE_CTRL_DEPTH)) { if ((level < max_depth) && (status != AE_CTRL_DEPTH)) {
if (acpi_ns_get_next_node (ACPI_TYPE_ANY, child_node, 0)) { if (acpi_ns_get_next_node (ACPI_TYPE_ANY, child_node, NULL)) {
/* /*
* There is at least one child of this * There is at least one child of this
* node, visit the onde * node, visit the onde
*/ */
level++; level++;
parent_node = child_node; parent_node = child_node;
child_node = 0; child_node = NULL;
} }
} }
} }
......
...@@ -101,7 +101,7 @@ acpi_bus_get_power_flags ( ...@@ -101,7 +101,7 @@ acpi_bus_get_power_flags (
struct acpi_device *device) struct acpi_device *device)
{ {
acpi_status status = 0; acpi_status status = 0;
acpi_handle handle = 0; acpi_handle handle = NULL;
u32 i = 0; u32 i = 0;
ACPI_FUNCTION_TRACE("acpi_bus_get_power_flags"); ACPI_FUNCTION_TRACE("acpi_bus_get_power_flags");
...@@ -799,8 +799,8 @@ static int acpi_bus_scan (struct acpi_device *start) ...@@ -799,8 +799,8 @@ static int acpi_bus_scan (struct acpi_device *start)
acpi_status status = AE_OK; acpi_status status = AE_OK;
struct acpi_device *parent = NULL; struct acpi_device *parent = NULL;
struct acpi_device *child = NULL; struct acpi_device *child = NULL;
acpi_handle phandle = 0; acpi_handle phandle = NULL;
acpi_handle chandle = 0; acpi_handle chandle = NULL;
acpi_object_type type = 0; acpi_object_type type = 0;
u32 level = 1; u32 level = 1;
...@@ -843,7 +843,7 @@ static int acpi_bus_scan (struct acpi_device *start) ...@@ -843,7 +843,7 @@ static int acpi_bus_scan (struct acpi_device *start)
if (type == ACPI_TYPE_LOCAL_SCOPE) { if (type == ACPI_TYPE_LOCAL_SCOPE) {
level++; level++;
phandle = chandle; phandle = chandle;
chandle = 0; chandle = NULL;
continue; continue;
} }
...@@ -883,11 +883,11 @@ static int acpi_bus_scan (struct acpi_device *start) ...@@ -883,11 +883,11 @@ static int acpi_bus_scan (struct acpi_device *start)
*/ */
if (child->status.present) { if (child->status.present) {
status = acpi_get_next_object(ACPI_TYPE_ANY, chandle, status = acpi_get_next_object(ACPI_TYPE_ANY, chandle,
0, NULL); NULL, NULL);
if (ACPI_SUCCESS(status)) { if (ACPI_SUCCESS(status)) {
level++; level++;
phandle = chandle; phandle = chandle;
chandle = 0; chandle = NULL;
parent = child; parent = child;
} }
} }
......
...@@ -92,7 +92,7 @@ acpi_system_read_dsdt ( ...@@ -92,7 +92,7 @@ acpi_system_read_dsdt (
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
struct acpi_buffer dsdt = {ACPI_ALLOCATE_BUFFER, NULL}; struct acpi_buffer dsdt = {ACPI_ALLOCATE_BUFFER, NULL};
void *data = 0; void *data = NULL;
size_t size = 0; size_t size = 0;
ACPI_FUNCTION_TRACE("acpi_system_read_dsdt"); ACPI_FUNCTION_TRACE("acpi_system_read_dsdt");
...@@ -135,7 +135,7 @@ acpi_system_read_fadt ( ...@@ -135,7 +135,7 @@ acpi_system_read_fadt (
{ {
acpi_status status = AE_OK; acpi_status status = AE_OK;
struct acpi_buffer fadt = {ACPI_ALLOCATE_BUFFER, NULL}; struct acpi_buffer fadt = {ACPI_ALLOCATE_BUFFER, NULL};
void *data = 0; void *data = NULL;
size_t size = 0; size_t size = 0;
ACPI_FUNCTION_TRACE("acpi_system_read_fadt"); ACPI_FUNCTION_TRACE("acpi_system_read_fadt");
......
...@@ -286,7 +286,7 @@ acpi_get_table_header_early ( ...@@ -286,7 +286,7 @@ acpi_get_table_header_early (
*header = (void *) __acpi_map_table(fadt->V1_dsdt, *header = (void *) __acpi_map_table(fadt->V1_dsdt,
sizeof(struct acpi_table_header)); sizeof(struct acpi_table_header));
} else } else
*header = 0; *header = NULL;
if (!*header) { if (!*header) {
printk(KERN_WARNING PREFIX "Unable to map DSDT\n"); printk(KERN_WARNING PREFIX "Unable to map DSDT\n");
......
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