提交 5431b654 编写于 作者: L Lv Zheng 提交者: Rafael J. Wysocki

ACPICA: Linuxize: reduce divergences for 20151218 release

The patch reduces source code differences between the Linux kernel and the
ACPICA upstream so that the linuxized ACPICA 20151218 release can be
applied with reduced human intervention.

The pscode.c has already been out of sync for months, and it becomes more
and more difficult to merge pscode.c changes, so instead of update the
affected lines of pscode.c, this patch synchronizes entire pscode.c file.
Signed-off-by: NLv Zheng <lv.zheng@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 b17629db
......@@ -310,8 +310,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
switch (arg->common.aml_opcode) {
case AML_INT_RESERVEDFIELD_OP:
position = (u64) info->field_bit_position
+ (u64) arg->common.value.size;
position = (u64)info->field_bit_position
+ (u64)arg->common.value.size;
if (position > ACPI_UINT32_MAX) {
ACPI_ERROR((AE_INFO,
......@@ -425,8 +425,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
/* Keep track of bit position for the next field */
position = (u64) info->field_bit_position
+ (u64) arg->common.value.size;
position = (u64)info->field_bit_position
+ (u64)arg->common.value.size;
if (position > ACPI_UINT32_MAX) {
ACPI_ERROR((AE_INFO,
......
......@@ -504,8 +504,8 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
if ((walk_state->deferred_node) &&
(walk_state->deferred_node->type == ACPI_TYPE_BUFFER_FIELD)
&& (arg_index ==
(u32) ((walk_state->opcode ==
AML_CREATE_FIELD_OP) ? 3 : 2))) {
(u32)((walk_state->opcode ==
AML_CREATE_FIELD_OP) ? 3 : 2))) {
obj_desc =
ACPI_CAST_PTR(union acpi_operand_object,
walk_state->deferred_node);
......
......@@ -355,8 +355,8 @@ acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width)
/* Get one hex digit, most significant digits first */
string[k] =
(u8) acpi_ut_hex_to_ascii_char(integer,
ACPI_MUL_4(j));
(u8)acpi_ut_hex_to_ascii_char(integer,
ACPI_MUL_4(j));
k++;
}
break;
......
......@@ -492,10 +492,9 @@ acpi_ex_create_method(u8 * aml_start,
* Disassemble the method flags. Split off the arg_count, Serialized
* flag, and sync_level for efficiency.
*/
method_flags = (u8) operand[1]->integer.value;
method_flags = (u8)operand[1]->integer.value;
obj_desc->method.param_count =
(u8) (method_flags & AML_METHOD_ARG_COUNT);
(u8)(method_flags & AML_METHOD_ARG_COUNT);
/*
* Get the sync_level. If method is serialized, a mutex will be
......
......@@ -439,7 +439,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
* same buffer)
*/
status = acpi_ex_access_region(obj_desc, 0,
(u64 *) buffer, function);
(u64 *)buffer, function);
acpi_ex_release_global_lock(obj_desc->common_field.field_flags);
*result_desc = buffer_desc;
......
......@@ -254,7 +254,7 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
return_ACPI_STATUS(AE_AML_MUTEX_ORDER);
}
status = acpi_ex_acquire_mutex_object((u16) time_desc->integer.value,
status = acpi_ex_acquire_mutex_object((u16)time_desc->integer.value,
obj_desc,
walk_state->thread->thread_id);
if (ACPI_SUCCESS(status) && obj_desc->mutex.acquisition_depth == 1) {
......
......@@ -96,9 +96,9 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"FatalOp: Type %X Code %X Arg %X <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n",
(u32) operand[0]->integer.value,
(u32) operand[1]->integer.value,
(u32) operand[2]->integer.value));
(u32)operand[0]->integer.value,
(u32)operand[1]->integer.value,
(u32)operand[2]->integer.value));
fatal = ACPI_ALLOCATE(sizeof(struct acpi_signal_fatal_info));
if (fatal) {
......
......@@ -298,6 +298,7 @@ acpi_hw_gpe_enable_write(u8 enable_mask,
gpe_register_info->enable_mask = enable_mask;
status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address);
return (status);
}
......
......@@ -710,7 +710,7 @@ acpi_ns_repair_PSS(struct acpi_evaluate_info *info,
elements = (*outer_elements)->package.elements;
obj_desc = elements[1]; /* Index1 = power_dissipation */
if ((u32) obj_desc->integer.value > previous_value) {
if ((u32)obj_desc->integer.value > previous_value) {
ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname,
info->node_flags,
"SubPackage[%u,%u] - suspicious power dissipation values",
......
此差异已折叠。
......@@ -446,7 +446,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
/* Round the resource struct length up to the next boundary (32 or 64) */
resource->length =
(u32) ACPI_ROUND_UP_TO_NATIVE_WORD(resource->length);
(u32)ACPI_ROUND_UP_TO_NATIVE_WORD(resource->length);
}
return_ACPI_STATUS(AE_OK);
}
......@@ -551,8 +551,8 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,
ACPI_SET8(destination, item_count);
aml_length =
(u16) (aml_length +
(info->value * (item_count - 1)));
(u16)(aml_length +
(info->value * (item_count - 1)));
break;
case ACPI_RSC_COUNT16:
......
......@@ -253,7 +253,7 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size)
buffer = ACPI_ALLOCATE_ZEROED(buffer_size);
if (!buffer) {
ACPI_ERROR((AE_INFO, "Could not allocate size %u",
(u32) buffer_size));
(u32)buffer_size));
acpi_ut_remove_reference(buffer_desc);
return_PTR(NULL);
}
......@@ -305,7 +305,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size)
string = ACPI_ALLOCATE_ZEROED(string_size + 1);
if (!string) {
ACPI_ERROR((AE_INFO, "Could not allocate size %u",
(u32) string_size));
(u32)string_size));
acpi_ut_remove_reference(string_desc);
return_PTR(NULL);
}
......
......@@ -136,6 +136,7 @@ static inline acpi_status acpi_os_initialize_command_signals(void)
static inline void acpi_os_terminate_command_signals(void)
{
return;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册