Skip to content

Commit

Permalink
ACPICA: Linuxize: reduce divergences for 20151218 release
Browse files Browse the repository at this point in the history
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: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Lv Zheng authored and Rafael J. Wysocki committed Jan 1, 2016
1 parent b17629d commit 5431b65
Show file tree
Hide file tree
Showing 13 changed files with 325 additions and 324 deletions.
8 changes: 4 additions & 4 deletions drivers/acpi/acpica/dsfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/dsutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/exconvrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions drivers/acpi/acpica/excreate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/exfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/exmutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions drivers/acpi/acpica/exoparg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/acpica/hwgpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/nsrepair2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading

0 comments on commit 5431b65

Please sign in to comment.