[PATCH 01/42] ACPICA: Linuxize: reduce divergences for 20151218 release

2015-12-28 Thread Lv Zheng
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 
---
 drivers/acpi/acpica/dsfield.c |8 +-
 drivers/acpi/acpica/dsutils.c |4 +-
 drivers/acpi/acpica/exconvrt.c|4 +-
 drivers/acpi/acpica/excreate.c|5 +-
 drivers/acpi/acpica/exfield.c |2 +-
 drivers/acpi/acpica/exmutex.c |2 +-
 drivers/acpi/acpica/exoparg3.c|6 +-
 drivers/acpi/acpica/hwgpe.c   |1 +
 drivers/acpi/acpica/nsrepair2.c   |2 +-
 drivers/acpi/acpica/psopcode.c|  604 ++---
 drivers/acpi/acpica/rsmisc.c  |6 +-
 drivers/acpi/acpica/utobject.c|4 +-
 include/acpi/platform/aclinuxex.h |1 +
 13 files changed, 325 insertions(+), 324 deletions(-)

diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index 20de148..37e11a3 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -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,
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index e4293a8..cecba39 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -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);
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c
index 1e4c5b6..145de28 100644
--- a/drivers/acpi/acpica/exconvrt.c
+++ b/drivers/acpi/acpica/exconvrt.c
@@ -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;
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c
index ccb7219..95fe464 100644
--- a/drivers/acpi/acpica/excreate.c
+++ b/drivers/acpi/acpica/excreate.c
@@ -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
diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index 61fd9c7..c95fd18 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -439,7 +439,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object 
*source_desc,
 * same buffer)
 */

[PATCH 01/42] ACPICA: Linuxize: reduce divergences for 20151218 release

2015-12-28 Thread Lv Zheng
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 
---
 drivers/acpi/acpica/dsfield.c |8 +-
 drivers/acpi/acpica/dsutils.c |4 +-
 drivers/acpi/acpica/exconvrt.c|4 +-
 drivers/acpi/acpica/excreate.c|5 +-
 drivers/acpi/acpica/exfield.c |2 +-
 drivers/acpi/acpica/exmutex.c |2 +-
 drivers/acpi/acpica/exoparg3.c|6 +-
 drivers/acpi/acpica/hwgpe.c   |1 +
 drivers/acpi/acpica/nsrepair2.c   |2 +-
 drivers/acpi/acpica/psopcode.c|  604 ++---
 drivers/acpi/acpica/rsmisc.c  |6 +-
 drivers/acpi/acpica/utobject.c|4 +-
 include/acpi/platform/aclinuxex.h |1 +
 13 files changed, 325 insertions(+), 324 deletions(-)

diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index 20de148..37e11a3 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -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,
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index e4293a8..cecba39 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -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);
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c
index 1e4c5b6..145de28 100644
--- a/drivers/acpi/acpica/exconvrt.c
+++ b/drivers/acpi/acpica/exconvrt.c
@@ -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;
diff --git a/drivers/acpi/acpica/excreate.c b/drivers/acpi/acpica/excreate.c
index ccb7219..95fe464 100644
--- a/drivers/acpi/acpica/excreate.c
+++ b/drivers/acpi/acpica/excreate.c
@@ -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
diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index 61fd9c7..c95fd18 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -439,7 +439,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object 
*source_desc,
 * same buffer)
 */