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