Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350865
b: refs/heads/master
c: 0e770b3
h: refs/heads/master
i:
  350863: 1c54cd9
v: v3
  • Loading branch information
Bob Moore authored and Rafael J. Wysocki committed Jan 10, 2013
1 parent b345255 commit 65487c0
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 48 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 53938551c827d2016912ae5a431a7dad76c2426a
refs/heads/master: 0e770b3263816b4445e2c855f641b172aa26291a
8 changes: 4 additions & 4 deletions trunk/drivers/acpi/acpica/nsutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,17 +663,17 @@ void acpi_ns_terminate(void)

u32 acpi_ns_opens_scope(acpi_object_type type)
{
ACPI_FUNCTION_TRACE_STR(ns_opens_scope, acpi_ut_get_type_name(type));
ACPI_FUNCTION_ENTRY();

if (!acpi_ut_valid_object_type(type)) {
if (type > ACPI_TYPE_LOCAL_MAX) {

/* type code out of range */

ACPI_WARNING((AE_INFO, "Invalid Object Type 0x%X", type));
return_UINT32(ACPI_NS_NORMAL);
return (ACPI_NS_NORMAL);
}

return_UINT32(((u32)acpi_gbl_ns_properties[type]) & ACPI_NS_NEWSCOPE);
return (((u32)acpi_gbl_ns_properties[type]) & ACPI_NS_NEWSCOPE);
}

/*******************************************************************************
Expand Down
26 changes: 13 additions & 13 deletions trunk/drivers/acpi/acpica/utdelete.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list)
{
union acpi_operand_object **internal_obj;

ACPI_FUNCTION_TRACE(ut_delete_internal_object_list);
ACPI_FUNCTION_NAME(ut_delete_internal_object_list);

/* Walk the null-terminated internal list */

Expand All @@ -351,7 +351,7 @@ void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list)
/* Free the combined parameter pointer list and object array */

ACPI_FREE(obj_list);
return_VOID;
return;
}

/*******************************************************************************
Expand Down Expand Up @@ -484,7 +484,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
union acpi_generic_state *state;
u32 i;

ACPI_FUNCTION_TRACE_PTR(ut_update_object_reference, object);
ACPI_FUNCTION_NAME(ut_update_object_reference);

while (object) {

Expand All @@ -493,7 +493,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
if (ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED) {
ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS,
"Object %p is NS handle\n", object));
return_ACPI_STATUS(AE_OK);
return (AE_OK);
}

/*
Expand Down Expand Up @@ -643,7 +643,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
}
}

return_ACPI_STATUS(AE_OK);
return (AE_OK);

error_exit:

Expand All @@ -657,7 +657,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
acpi_ut_delete_generic_state(state);
}

return_ACPI_STATUS(status);
return (status);
}

/*******************************************************************************
Expand All @@ -676,12 +676,12 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
void acpi_ut_add_reference(union acpi_operand_object *object)
{

ACPI_FUNCTION_TRACE_PTR(ut_add_reference, object);
ACPI_FUNCTION_NAME(ut_add_reference);

/* Ensure that we have a valid object */

if (!acpi_ut_valid_internal_object(object)) {
return_VOID;
return;
}

ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS,
Expand All @@ -691,7 +691,7 @@ void acpi_ut_add_reference(union acpi_operand_object *object)
/* Increment the reference count */

(void)acpi_ut_update_object_reference(object, REF_INCREMENT);
return_VOID;
return;
}

/*******************************************************************************
Expand All @@ -709,7 +709,7 @@ void acpi_ut_add_reference(union acpi_operand_object *object)
void acpi_ut_remove_reference(union acpi_operand_object *object)
{

ACPI_FUNCTION_TRACE_PTR(ut_remove_reference, object);
ACPI_FUNCTION_NAME(ut_remove_reference);

/*
* Allow a NULL pointer to be passed in, just ignore it. This saves
Expand All @@ -718,13 +718,13 @@ void acpi_ut_remove_reference(union acpi_operand_object *object)
*/
if (!object ||
(ACPI_GET_DESCRIPTOR_TYPE(object) == ACPI_DESC_TYPE_NAMED)) {
return_VOID;
return;
}

/* Ensure that we have a valid object */

if (!acpi_ut_valid_internal_object(object)) {
return_VOID;
return;
}

ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS,
Expand All @@ -737,5 +737,5 @@ void acpi_ut_remove_reference(union acpi_operand_object *object)
* of all subobjects!)
*/
(void)acpi_ut_update_object_reference(object, REF_DECREMENT);
return_VOID;
return;
}
40 changes: 18 additions & 22 deletions trunk/drivers/acpi/acpica/utstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,13 @@ void
acpi_ut_push_generic_state(union acpi_generic_state **list_head,
union acpi_generic_state *state)
{
ACPI_FUNCTION_TRACE(ut_push_generic_state);
ACPI_FUNCTION_ENTRY();

/* Push the state object onto the front of the list (stack) */

state->common.next = *list_head;
*list_head = state;

return_VOID;
return;
}

/*******************************************************************************
Expand All @@ -124,7 +123,7 @@ union acpi_generic_state *acpi_ut_pop_generic_state(union acpi_generic_state
{
union acpi_generic_state *state;

ACPI_FUNCTION_TRACE(ut_pop_generic_state);
ACPI_FUNCTION_ENTRY();

/* Remove the state object at the head of the list (stack) */

Expand All @@ -136,7 +135,7 @@ union acpi_generic_state *acpi_ut_pop_generic_state(union acpi_generic_state
*list_head = state->common.next;
}

return_PTR(state);
return (state);
}

/*******************************************************************************
Expand Down Expand Up @@ -186,13 +185,13 @@ struct acpi_thread_state *acpi_ut_create_thread_state(void)
{
union acpi_generic_state *state;

ACPI_FUNCTION_TRACE(ut_create_thread_state);
ACPI_FUNCTION_ENTRY();

/* Create the generic state object */

state = acpi_ut_create_generic_state();
if (!state) {
return_PTR(NULL);
return (NULL);
}

/* Init fields specific to the update struct */
Expand All @@ -207,7 +206,7 @@ struct acpi_thread_state *acpi_ut_create_thread_state(void)
state->thread.thread_id = (acpi_thread_id) 1;
}

return_PTR((struct acpi_thread_state *)state);
return ((struct acpi_thread_state *)state);
}

/*******************************************************************************
Expand All @@ -230,22 +229,21 @@ union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_object
{
union acpi_generic_state *state;

ACPI_FUNCTION_TRACE_PTR(ut_create_update_state, object);
ACPI_FUNCTION_ENTRY();

/* Create the generic state object */

state = acpi_ut_create_generic_state();
if (!state) {
return_PTR(NULL);
return (NULL);
}

/* Init fields specific to the update struct */

state->common.descriptor_type = ACPI_DESC_TYPE_STATE_UPDATE;
state->update.object = object;
state->update.value = action;

return_PTR(state);
return (state);
}

/*******************************************************************************
Expand All @@ -267,13 +265,13 @@ union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object,
{
union acpi_generic_state *state;

ACPI_FUNCTION_TRACE_PTR(ut_create_pkg_state, internal_object);
ACPI_FUNCTION_ENTRY();

/* Create the generic state object */

state = acpi_ut_create_generic_state();
if (!state) {
return_PTR(NULL);
return (NULL);
}

/* Init fields specific to the update struct */
Expand All @@ -283,8 +281,7 @@ union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object,
state->pkg.dest_object = external_object;
state->pkg.index = index;
state->pkg.num_packages = 1;

return_PTR(state);
return (state);
}

/*******************************************************************************
Expand All @@ -304,21 +301,20 @@ union acpi_generic_state *acpi_ut_create_control_state(void)
{
union acpi_generic_state *state;

ACPI_FUNCTION_TRACE(ut_create_control_state);
ACPI_FUNCTION_ENTRY();

/* Create the generic state object */

state = acpi_ut_create_generic_state();
if (!state) {
return_PTR(NULL);
return (NULL);
}

/* Init fields specific to the control struct */

state->common.descriptor_type = ACPI_DESC_TYPE_STATE_CONTROL;
state->common.state = ACPI_CONTROL_CONDITIONAL_EXECUTING;

return_PTR(state);
return (state);
}

/*******************************************************************************
Expand All @@ -336,12 +332,12 @@ union acpi_generic_state *acpi_ut_create_control_state(void)

void acpi_ut_delete_generic_state(union acpi_generic_state *state)
{
ACPI_FUNCTION_TRACE(ut_delete_generic_state);
ACPI_FUNCTION_ENTRY();

/* Ignore null state */

if (state) {
(void)acpi_os_release_object(acpi_gbl_state_cache, state);
}
return_VOID;
return;
}
16 changes: 8 additions & 8 deletions trunk/drivers/acpi/acpica/uttrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,10 @@ acpi_ut_remove_allocation(struct acpi_debug_mem_block *allocation,
struct acpi_memory_list *mem_list;
acpi_status status;

ACPI_FUNCTION_TRACE(ut_remove_allocation);
ACPI_FUNCTION_NAME(ut_remove_allocation);

if (acpi_gbl_disable_mem_tracking) {
return_ACPI_STATUS(AE_OK);
return (AE_OK);
}

mem_list = acpi_gbl_global_list;
Expand All @@ -450,12 +450,12 @@ acpi_ut_remove_allocation(struct acpi_debug_mem_block *allocation,
ACPI_ERROR((module, line,
"Empty allocation list, nothing to free!"));

return_ACPI_STATUS(AE_OK);
return (AE_OK);
}

status = acpi_ut_acquire_mutex(ACPI_MTX_MEMORY);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
return (status);
}

/* Unlink */
Expand All @@ -470,15 +470,15 @@ acpi_ut_remove_allocation(struct acpi_debug_mem_block *allocation,
(allocation->next)->previous = allocation->previous;
}

ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "Freeing %p, size 0%X\n",
&allocation->user_space, allocation->size));

/* Mark the segment as deleted */

ACPI_MEMSET(&allocation->user_space, 0xEA, allocation->size);

ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "Freeing size 0%X\n",
allocation->size));

status = acpi_ut_release_mutex(ACPI_MTX_MEMORY);
return_ACPI_STATUS(status);
return (status);
}

/*******************************************************************************
Expand Down

0 comments on commit 65487c0

Please sign in to comment.