Commit edc5935e authored by Bob Moore's avatar Bob Moore Committed by Rafael J. Wysocki

ACPICA: Results from Clang

ACPICA commit 1f08279b3eb13f17004159c28c391a390cd68feb

Changes/fixes From Clang V5.0.1.  Mostly "set but never read"
warnings.

Link: https://github.com/acpica/acpica/commit/1f08279bSigned-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarErik Schmauss <erik.schmauss@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent d6d5df1d
...@@ -513,7 +513,6 @@ void acpi_db_display_results(void) ...@@ -513,7 +513,6 @@ void acpi_db_display_results(void)
return; return;
} }
obj_desc = walk_state->method_desc;
node = walk_state->method_node; node = walk_state->method_node;
if (walk_state->results) { if (walk_state->results) {
...@@ -565,7 +564,6 @@ void acpi_db_display_calling_tree(void) ...@@ -565,7 +564,6 @@ void acpi_db_display_calling_tree(void)
return; return;
} }
node = walk_state->method_node;
acpi_os_printf("Current Control Method Call Tree\n"); acpi_os_printf("Current Control Method Call Tree\n");
while (walk_state) { while (walk_state) {
......
...@@ -689,7 +689,6 @@ acpi_db_command_dispatch(char *input_buffer, ...@@ -689,7 +689,6 @@ acpi_db_command_dispatch(char *input_buffer,
param_count = acpi_db_get_line(input_buffer); param_count = acpi_db_get_line(input_buffer);
command_index = acpi_db_match_command(acpi_gbl_db_args[0]); command_index = acpi_db_match_command(acpi_gbl_db_args[0]);
temp = 0;
/* /*
* We don't want to add the !! command to the history buffer. It * We don't want to add the !! command to the history buffer. It
......
...@@ -321,6 +321,10 @@ acpi_status acpi_db_disassemble_method(char *name) ...@@ -321,6 +321,10 @@ acpi_status acpi_db_disassemble_method(char *name)
walk_state->parse_flags |= ACPI_PARSE_DISASSEMBLE; walk_state->parse_flags |= ACPI_PARSE_DISASSEMBLE;
status = acpi_ps_parse_aml(walk_state); status = acpi_ps_parse_aml(walk_state);
if (ACPI_FAILURE(status)) {
return (status);
}
(void)acpi_dm_parse_deferred_ops(op); (void)acpi_dm_parse_deferred_ops(op);
/* Now we can disassemble the method */ /* Now we can disassemble the method */
......
...@@ -464,7 +464,6 @@ void acpi_db_decode_arguments(struct acpi_walk_state *walk_state) ...@@ -464,7 +464,6 @@ void acpi_db_decode_arguments(struct acpi_walk_state *walk_state)
u8 display_args = FALSE; u8 display_args = FALSE;
node = walk_state->method_node; node = walk_state->method_node;
obj_desc = walk_state->method_desc;
/* There are no arguments for the module-level code case */ /* There are no arguments for the module-level code case */
......
...@@ -149,7 +149,6 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op, ...@@ -149,7 +149,6 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,
if (walk_state->deferred_node) { if (walk_state->deferred_node) {
node = walk_state->deferred_node; node = walk_state->deferred_node;
status = AE_OK;
} else { } else {
/* Execute flag should always be set when this function is entered */ /* Execute flag should always be set when this function is entered */
...@@ -636,8 +635,6 @@ acpi_ds_init_field_objects(union acpi_parse_object *op, ...@@ -636,8 +635,6 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
} }
/* Name already exists, just ignore this error */ /* Name already exists, just ignore this error */
status = AE_OK;
} }
arg->common.node = node; arg->common.node = node;
......
...@@ -110,6 +110,9 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block) ...@@ -110,6 +110,9 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
status = status =
acpi_hw_disable_gpe_block(gpe_block->xrupt_block, gpe_block, NULL); acpi_hw_disable_gpe_block(gpe_block->xrupt_block, gpe_block, NULL);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
if (!gpe_block->previous && !gpe_block->next) { if (!gpe_block->previous && !gpe_block->next) {
...@@ -359,10 +362,10 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, ...@@ -359,10 +362,10 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
walk_info.gpe_device = gpe_device; walk_info.gpe_device = gpe_device;
walk_info.execute_by_owner_id = FALSE; walk_info.execute_by_owner_id = FALSE;
status = acpi_ns_walk_namespace(ACPI_TYPE_METHOD, gpe_device, (void)acpi_ns_walk_namespace(ACPI_TYPE_METHOD, gpe_device,
ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK, ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
acpi_ev_match_gpe_method, NULL, acpi_ev_match_gpe_method, NULL, &walk_info,
&walk_info, NULL); NULL);
/* Return the new block */ /* Return the new block */
......
...@@ -156,8 +156,6 @@ acpi_status acpi_ev_gpe_initialize(void) ...@@ -156,8 +156,6 @@ acpi_status acpi_ev_gpe_initialize(void)
* GPE0 and GPE1 do not have to be contiguous in the GPE number * GPE0 and GPE1 do not have to be contiguous in the GPE number
* space. However, GPE0 always starts at GPE number zero. * space. However, GPE0 always starts at GPE number zero.
*/ */
gpe_number_max = acpi_gbl_FADT.gpe1_base +
((register_count1 * ACPI_GPE_REGISTER_WIDTH) - 1);
} }
} }
...@@ -169,7 +167,6 @@ acpi_status acpi_ev_gpe_initialize(void) ...@@ -169,7 +167,6 @@ acpi_status acpi_ev_gpe_initialize(void)
ACPI_DEBUG_PRINT((ACPI_DB_INIT, ACPI_DEBUG_PRINT((ACPI_DB_INIT,
"There are no GPE blocks defined in the FADT\n")); "There are no GPE blocks defined in the FADT\n"));
status = AE_OK;
goto cleanup; goto cleanup;
} }
......
...@@ -230,11 +230,15 @@ void acpi_ev_terminate(void) ...@@ -230,11 +230,15 @@ void acpi_ev_terminate(void)
/* Disable all GPEs in all GPE blocks */ /* Disable all GPEs in all GPE blocks */
status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block, NULL); status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block, NULL);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status,
"Could not disable GPEs in GPE block"));
}
status = acpi_ev_remove_global_lock_handler(); status = acpi_ev_remove_global_lock_handler();
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_ERROR((AE_INFO, ACPI_EXCEPTION((AE_INFO, status,
"Could not remove Global Lock handler")); "Could not remove Global Lock handler"));
} }
acpi_gbl_events_initialized = FALSE; acpi_gbl_events_initialized = FALSE;
...@@ -250,6 +254,10 @@ void acpi_ev_terminate(void) ...@@ -250,6 +254,10 @@ void acpi_ev_terminate(void)
/* Deallocate all handler objects installed within GPE info structs */ /* Deallocate all handler objects installed within GPE info structs */
status = acpi_ev_walk_gpe_list(acpi_ev_delete_gpe_handlers, NULL); status = acpi_ev_walk_gpe_list(acpi_ev_delete_gpe_handlers, NULL);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status,
"Could not delete GPE handlers"));
}
/* Return to original mode if necessary */ /* Return to original mode if necessary */
......
...@@ -836,11 +836,11 @@ acpi_ev_orphan_ec_reg_method(struct acpi_namespace_node *ec_device_node) ...@@ -836,11 +836,11 @@ acpi_ev_orphan_ec_reg_method(struct acpi_namespace_node *ec_device_node)
objects[1].type = ACPI_TYPE_INTEGER; objects[1].type = ACPI_TYPE_INTEGER;
objects[1].integer.value = ACPI_REG_CONNECT; objects[1].integer.value = ACPI_REG_CONNECT;
status = acpi_evaluate_object(reg_method, NULL, &args, NULL); (void)acpi_evaluate_object(reg_method, NULL, &args, NULL);
exit: exit:
/* We ignore all errors from above, don't care */ /* We ignore all errors from above, don't care */
status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); (void)acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
return_VOID; return_VOID;
} }
...@@ -198,7 +198,6 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, ...@@ -198,7 +198,6 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
* root bridge. Still need to return a context object * root bridge. Still need to return a context object
* for the new PCI_Config operation region, however. * for the new PCI_Config operation region, however.
*/ */
status = AE_OK;
} else { } else {
ACPI_EXCEPTION((AE_INFO, status, ACPI_EXCEPTION((AE_INFO, status,
"Could not install PciConfig handler " "Could not install PciConfig handler "
......
...@@ -291,7 +291,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, ...@@ -291,7 +291,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
for (i = 0; for (i = 0;
(i < obj_desc->buffer.length (i < obj_desc->buffer.length
&& i < 12); i++) { && i < 12); i++) {
acpi_os_printf(" %.2hX", acpi_os_printf(" %2.2X",
obj_desc->buffer. obj_desc->buffer.
pointer[i]); pointer[i]);
} }
...@@ -404,7 +404,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, ...@@ -404,7 +404,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
case ACPI_TYPE_LOCAL_BANK_FIELD: case ACPI_TYPE_LOCAL_BANK_FIELD:
case ACPI_TYPE_LOCAL_INDEX_FIELD: case ACPI_TYPE_LOCAL_INDEX_FIELD:
acpi_os_printf(" Off %.3X Len %.2X Acc %.2hd\n", acpi_os_printf(" Off %.3X Len %.2X Acc %.2X\n",
(obj_desc->common_field. (obj_desc->common_field.
base_byte_offset * 8) base_byte_offset * 8)
+ +
......
...@@ -480,9 +480,8 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state, ...@@ -480,9 +480,8 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state,
acpi_ps_get_opcode_info((*op)->common.aml_opcode); acpi_ps_get_opcode_info((*op)->common.aml_opcode);
walk_state->opcode = (*op)->common.aml_opcode; walk_state->opcode = (*op)->common.aml_opcode;
status = walk_state->ascending_callback(walk_state); (void)walk_state->ascending_callback(walk_state);
status = (void)acpi_ps_next_parse_state(walk_state, *op, status);
acpi_ps_next_parse_state(walk_state, *op, status);
status2 = acpi_ps_complete_this_op(walk_state, *op); status2 = acpi_ps_complete_this_op(walk_state, *op);
if (ACPI_FAILURE(status2)) { if (ACPI_FAILURE(status2)) {
......
...@@ -660,7 +660,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module) ...@@ -660,7 +660,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)
case ACPI_DESC_TYPE_PARSER: case ACPI_DESC_TYPE_PARSER:
acpi_os_printf acpi_os_printf
("AmlOpcode 0x%04hX\n", ("AmlOpcode 0x%04X\n",
descriptor->op.asl. descriptor->op.asl.
aml_opcode); aml_opcode);
break; break;
......
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